i have problem at php $_POST code. this is the my codes? what i do wrong?
this is index.php
<form action="upload.php" method="post" id="form">
<input type="text" name="fname" size="87" />
<input type="submit" style="display:none" />
if i click the submit, page going to upload.php and white screen. and i look at the sample.txt, it’s like a:
<h1></h1>
this is upload.php
$yazi=$_POST['fname'];
$fo = fopen("sample".".txt", "a");
fwrite($fo, '<h1>'.$yazi.'</h1>');
fclose($fo);
what can i do for fix?
and i using jquery submit. so not a problem display:none, i think.
There is nothing wrong happening, the white screen is how it should be working.
After you are done processing in
upload.php, you can redirect the browser somewhere with the Location header directive. For example:The empty $var problem, try using
"like: