theblackswan Posted March 12, 2011 Share Posted March 12, 2011 Hey, Am a beginner, and am stuck here, <html> <head> <title> My Movie Site - <?php echo $_GET[‘favmovie’];?> </title> </head> <body> <?php echo ‘My favorite movie is ‘; echo $_GET[‘favmovie’]; echo ‘ < br/ > ’; $movierate = 5; echo ‘My movie rating for this movie is: ‘; echo $movierate; ?> </body> </html> <html> <head> <title> Find my Favorite Movie! </title > </head> <body> <?php echo ‘<a href=”C:\Program Files\Zend\Apache2\htdocs\moviesite.php?favmovie=Stripes” >’; echo ‘Click here to see information about my favorite movie!’; echo ‘</a> ’; ?> </body > </html > The book from which i got this says that if we run the second one, it will automatically get the first one. But all i get is a blank page Help me guys. Quote Link to comment Share on other sites More sharing options...
Alex1646 Posted March 12, 2011 Share Posted March 12, 2011 I would think that you would have to use include() instead of just echo'ing out the files. ? Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted March 12, 2011 Share Posted March 12, 2011 Try: echo ‘<a href="moviesite.php?favmovie=Stripes” >’;. instead of: ‘<a href=”C:\Program Files\Zend\Apache2\htdocs\moviesite.php?favmovie=Stripes” >’; Quote Link to comment Share on other sites More sharing options...
theblackswan Posted March 12, 2011 Author Share Posted March 12, 2011 Try: echo ‘<a href="moviesite.php?favmovie=Stripes” >’;. instead of: ‘<a href=”C:\Program Files\Zend\Apache2\htdocs\moviesite.php?favmovie=Stripes” >’; Yep thats how its mentioned in the book, it doesnt work either. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted March 12, 2011 Share Posted March 12, 2011 Just about every quote in your code is a curly/smart quote and won't work in php source code. Your quotes should look like - ' or " Quote Link to comment Share on other sites More sharing options...
theblackswan Posted March 12, 2011 Author Share Posted March 12, 2011 Just about every quote in your code is a curly/smart quote and won't work in php source code. Your quotes should look like - ' or " wow, i guess that happened because i copied that from a pdf. But still i see the click here thing and when i click it, i get this The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted March 12, 2011 Share Posted March 12, 2011 That error is generally due to a php page that has a fatal parse or runtime error and doesn't output anything. You should be learning php, developing php code, and debugging php code on a system with error_reporting set to E_ALL (or a -1) and display_errors set to ON in your master php.ini so that all the errors php detects will be reported and displayed. Setting those two settings in your script won't help for php parse errors, which is likely what you are currently getting from your code. Stop and start your web server to get any changed made to the master php.ini to take effect and confirm that the two settings got changed by using a phpinfo(); statement in case the php.ini that you are changing is not the one that php is using. Quote Link to comment Share on other sites More sharing options...
theblackswan Posted March 12, 2011 Author Share Posted March 12, 2011 I restarted mt web browser but still getting that. Quote Link to comment Share on other sites More sharing options...
theblackswan Posted March 12, 2011 Author Share Posted March 12, 2011 Don't bother guys, solved it finally thanks a ton.. Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted March 12, 2011 Share Posted March 12, 2011 That error is generally due to a php page that has a fatal parse or runtime error and doesn't output anything. You should be learning php, developing php code, and debugging php code on a system with error_reporting set to E_ALL (or a -1) and display_errors set to ON in your master php.ini so that all the errors php detects will be reported and displayed. Setting those two settings in your script won't help for php parse errors, which is likely what you are currently getting from your code. Stop and start your web server to get any changed made to the master php.ini to take effect and confirm that the two settings got changed by using a phpinfo(); statement in case the php.ini that you are changing is not the one that php is using. @blackswan. I use wamp(local server), in combination with netbeans(awesome editor), and that automatically will give all errors, with nice colours too I made a small manual how to set it up (5min work) although i am by far an expert (but that's why i use wamp ). Might want to try it out. good luck! Quote Link to comment Share on other sites More sharing options...
theblackswan Posted March 12, 2011 Author Share Posted March 12, 2011 That error is generally due to a php page that has a fatal parse or runtime error and doesn't output anything. You should be learning php, developing php code, and debugging php code on a system with error_reporting set to E_ALL (or a -1) and display_errors set to ON in your master php.ini so that all the errors php detects will be reported and displayed. Setting those two settings in your script won't help for php parse errors, which is likely what you are currently getting from your code. Stop and start your web server to get any changed made to the master php.ini to take effect and confirm that the two settings got changed by using a phpinfo(); statement in case the php.ini that you are changing is not the one that php is using. @blackswan. I use wamp(local server), in combination with netbeans(awesome editor), and that automatically will give all errors, with nice colours too I made a small manual how to set it up (5min work) although i am by far an expert (but that's why i use wamp ). Might want to try it out. good luck! I am using Zend and Notepad++, dont want wamp now, have no idea what its like. Did wamp point out this quote error as well? 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.