Jump to content
xisto Community
Sign in to follow this  
Imtay22

Question About Php Script [resolved] Read please

Recommended Posts

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"><title>Rune Mods</title></head><body><a href="?mode=idx">Home- Under Construction</a> - <a href="?mode=login">Login</a> - <a href="?mode=register">Register</a><br><?php$page=$_GET['mode'];switch($page){case 'login';include ("login.php");break;case 'register';include ("register.php");break;default:echo "Under Constrution<br /> Please <a href="?mode=login">Login</a> or <a href="?mode=register">Register</a>";break;}?></body></html>

And then I get the error-

Parse error: syntax error, unexpected '=' in /home/imtay22/public_html/index.php on line 19

Please help!

Oh wow I found the problem. Line 19 has the double quotes for the HTML and the php. So I just switched the php ones to single quotes!
Edited by Imtay22 (see edit history)

Share this post


Link to post
Share on other sites

Try this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"><title>Rune Mods</title></head><body><a href="?mode=idx">Home- Under Construction</a> - <a href="?mode=login">Login</a> - <a href="?mode=register">Register</a><br><?php$page=$_GET['mode'];switch($page){case 'login':include ("login.php");break;case 'register':include ("register.php");break;default:echo "Under Constrution<br /> Please <a href=\"?mode=login\">Login</a> or <a href=\"?mode=register\">Register</a>";break;}?></body></html>

You need to escape special characters in echo, and use : instead of ; in case
Edited by matak (see edit history)

Share this post


Link to post
Share on other sites

Well it works now, it was just the quote-double quote thing. SO now it works. This topic can be closed now!

this topic must be closed right now.. :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.