phpfanphp Posted August 31, 2007 Share Posted August 31, 2007 Is this an old version of PHP because I keep getting blank screens. I know the code is correct because it came straight from a book, work for work. The book was written in 2002. I am running PHP5 and downgraded to PHP4. It didn't help. Here's the PHP file (file 1 of 2) <FORM ACTION="123.html" METHOD="POST"> Input a name <br> <INPUT NAME="name" TYPE=TEXT> <br> <INPUT TYPE=SUBMIT VALUE="Search!"> </FORM> Here's the HTML file 123.html (file 2 of 2) <?php echo $name; ?> Thanks! Quote Link to comment Share on other sites More sharing options...
Jessica Posted August 31, 2007 Share Posted August 31, 2007 Yes, it's old. It's relying on register_global being enabled, which it is not by default for security. Try $_POST['name']; Also, add this to the top of your pages for error_reporting: ini_set('display_errors', 1); error_reporting(E_ALL); Quote Link to comment Share on other sites More sharing options...
phpfanphp Posted August 31, 2007 Author Share Posted August 31, 2007 Wow thanks! Any idea what version I am running? Quote Link to comment Share on other sites More sharing options...
Jessica Posted August 31, 2007 Share Posted August 31, 2007 You just said you are running 5 or 4...I have no idea what version you have. The code is old, but it is not version specific. It is just poor code. Quote Link to comment Share on other sites More sharing options...
phpfanphp Posted August 31, 2007 Author Share Posted August 31, 2007 Cool, thanks again! Topic solved! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.