gaptrast
Member
- Messages
- 123
- Reaction score
- 0
- Points
- 16
Hi,
I have a form, and want to transfer all info typed into another php document as variables!
Here is the form:
But this php code just writes "0" to the file:
Is there a way to solve this?
I have a form, and want to transfer all info typed into another php document as variables!
Here is the form:
HTML:
<form action=".index.php" method="get" class="form">
<input type="text" name="title" />
<input type="text" name="brief" />
<input type="submit" />
</form>
But this php code just writes "0" to the file:
PHP:
$myFile = "../phpprofiles/pahhh.php";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = '
<?php
$title = "'+ $_GET["title"] +'";
$description = "'+$_GET["info"]+'";
$image = "'+$_GET["screenshot"]+'";
$name = "'+str_replace( " ", "", $_GET["title"] )+'";
$howtostop = "'+ $_GET["stop"] +'";
$tags="'+ $_GET["tags"] +'","'+ $_GET["tags2"] +'","'+ $_GET["tags3"] +'";
$producer="'+ $_GET["producer"] +'";
?>
';
fwrite($fh, $stringData);
fclose($fh);
Is there a way to solve this?