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!
) it works fine. But as soon as I use post to get the data from a HTML form it refuses to insert it. But if I echo the variable $write after it has been posted from a HTML form it echos fine.
Didn't work. I don't know the difference between $_REQUEST & $_POST but I can echo out the variable that I get from $_REQUEST so the problem must lay within the fwrite function of not posting a variable that's been passed from a HTML form. I can't get my head around why though. If I do
impulse() wrote:Didn't work. I don't know the difference between $_REQUEST & $_POST
$_POST contains only variables submitted via post (IE: <form method="post") $_REQUEST is a composition of the superglobal arrays $_POST (which contains posted data), $_GET (ie: <form method="get"> or http://yoursite.com/index.php?this=a_get_variable) and $_COOKIE which is data pulled from a user cookie.
It's as if fwrite is clever enough to know that the data contained within the variable I want it to write was passed into the variable from a HTML text box and therefor is refusing to write it. If I hardcode the same data into the same variable name it works fine.