Jump to content

Need help to make these work.


theblackswan

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.