PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi, I am trying to pass the contents of a textarea of my html form to a php string variable however I am not sure how to do this. I have tried commands such as:
andys22 wrote:Hi, I am trying to pass the contents of a textarea of my html form to a php string variable however I am not sure how to do this. I have tried commands such as:
<?php
$filename = "wiki.data";
// Open the file for truncated writing
$fp = fopen($filename, "w") or die("Couldn't open file for writing");
$numBytes = fwrite($fp, $wiki_text) or die("Couldn't write values to file!");
fclose($fp);
echo "Wrote $numBytes bytes to wiki.data successfully!";
?>
This php cose is in another file. will the variable get lost and therfore I should include some code here to get the text into the variable?