phpfanphp Posted August 24, 2007 Share Posted August 24, 2007 When I input data, it brings me to a blank screen. I think PHP, Apache, and MySQL are set up right because I can run SIMPLE scripts that don't reference other files. Any ideas? Here is the HTML file: <html> <body> <h2>Search for a shop</h2> <br> <FORM ACTION="123.php" METHOD="POST"> Please enter the name, or part of the name, of the shop you are seeking: <br> <INPUT NAME="name" TYPE=TEXT> <br> <INPUT TYPE=SUBMIT VALUE="Search!"> </FORM> </body> </html> The PHP file, 123.php, located in the same directory: <?php echo $name; ?> Quote Link to comment https://forums.phpfreaks.com/topic/66589-solved-referencing-another-file-is-leaving-a-blank-screen/ Share on other sites More sharing options...
trq Posted August 24, 2007 Share Posted August 24, 2007 $name is not defined within 123.php, try.... <?php if (isset($_POST['name'])) { echo $_POST['name']; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/66589-solved-referencing-another-file-is-leaving-a-blank-screen/#findComment-333581 Share on other sites More sharing options...
HoTDaWg Posted August 25, 2007 Share Posted August 25, 2007 and please, use Code tags. Quote Link to comment https://forums.phpfreaks.com/topic/66589-solved-referencing-another-file-is-leaving-a-blank-screen/#findComment-333583 Share on other sites More sharing options...
phpfanphp Posted August 25, 2007 Author Share Posted August 25, 2007 Wow fast responses! Ok, I changed the 123.php file to <?php if (isset($_POST['name'])) { echo $_POST['name']; } ?> but now firefox asks me if I want to download the file 123.php when I hit submit. Any ideas?? Quote Link to comment https://forums.phpfreaks.com/topic/66589-solved-referencing-another-file-is-leaving-a-blank-screen/#findComment-333590 Share on other sites More sharing options...
phpfanphp Posted August 25, 2007 Author Share Posted August 25, 2007 and please, use Code tags. Also, what do you mean by code tags? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/66589-solved-referencing-another-file-is-leaving-a-blank-screen/#findComment-333591 Share on other sites More sharing options...
MadTechie Posted August 25, 2007 Share Posted August 25, 2007 use code tags means use the # button so [code.] my code blar [/code.] without the .'s run it again, you may of ran it while the server was busy uploading or something Quote Link to comment https://forums.phpfreaks.com/topic/66589-solved-referencing-another-file-is-leaving-a-blank-screen/#findComment-333594 Share on other sites More sharing options...
phpfanphp Posted August 25, 2007 Author Share Posted August 25, 2007 SOLVED THANKS!!!!!!! I think I was using an old PHP version code Quote Link to comment https://forums.phpfreaks.com/topic/66589-solved-referencing-another-file-is-leaving-a-blank-screen/#findComment-333595 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.