justinh Posted October 30, 2008 Share Posted October 30, 2008 hey guys, im back again I'm making less and less errors now so that's a plus. I've ran into a problem and can't seem to find the error. <?php session_start(); if($_SESSION['loggedin'] == 1){ switch($_SESSION['rank']){ case "1": //User Doesn't have permissions for this action echo " "; break; case "2": // User doesn't have permission for this action echo " "; break; case "3": // User does have permissions for this action echo "<html> <head> <title>HuntReserver - Login </title> </head> <body bgcolor=\"black\"> <p align=\"Center\"><img src=\"logo.jpeg\"><br><table><tr><td colspan=\"4\"><font color=\"white\" size=\"3\"> <b><p align=\"center\">Admin</font></b></td><td colspan=\"4\"><p align=\"right\"><a href=\"logout.php\">Logout</a></p> </tr><tr><td><font color=\"white\" size=\"2\">Edit Reservation</td><td><font color=\"white\" size=\"2\">Delete Reservation</td> <td><font color=\"white\" size=\"2\">Add Reservation</td><td><font color=\"white\" size=\"2\">View Reservations</td></tr><tr> <td><font color=\"white\" size=\"2\">Hunt Reports</td><td><font color=\"white\" size=\"2\"><i>Add Ranch Manager</i></td><td><font color=\"white\" size=\"2\"> Delete Ranch Manager</td><td><font color=\"white\" size=\"2\">Add Reservation Specialist</td></tr><tr><td> <font color=\"white\" size=\"2\">Delete Ranch Specialist</td> </tr></table><br><br><font size=\"2\" color=\"white\"><form name=\"addranchmanager\" method=\"POST\" action=\"$_SERVER['PHP_SELF']\"> <TABLE><TR><TD COLSPAN=\"2\"><P ALIGN=\"CENTER\"><B>Add Ranch Manager</b></p></td></tr> <tr><td><font size=\"2\" color=\"white\">Username</font><font size=\"2\" color=\"red\">*</font><font size=\"2\" color=\"white\">:</td></tr> <td><form input=\"text\" name=\"username\" tabindex=\"1\"></td></tr> <tr><td><font size=\"2\" color=\"white\">Password</font><font size=\"2\" color=\"red\">*</font><font size=\"2\" color=\"white\">:</td> <td><form input=\"password\" name=\"password\"></td></tr><tr><td><font size=\"2\" color=\"white\">Confirm Password</font><font size=\"2\" color=\"red\">*</font><font size=\"2\" color=\"white\">:</td><td><form input=\"password\" name=\"confirmpassword\"></td></tr> <tr><td><font size=\"2\" color=\"white\">First Name</font><font size=\"2\" color=\"red\">*</font><font size=\"2\" color=\"white\">:</font></td><td><form input=\"text\" name=\"firstname\"></td></tr> <tr><td><font size=\"2\" color=\"white\">Last Name</font><font size=\"2\" color=\"red\">*</font><font size=\"2\" color=\"white\">:</td><td><form input=\"text\" name=\"lastname\"></td></tr> <tr><td></td></tr><tr><td colspan=\"2\"><p align=\"right\"><form input=\"submit\" value=\"Create\"></td></tr><tr><td colspan=\"2\"><p align=\"center\"><font size=\"2\" color=\"white\">Fields indicated with a </font><font size=\"2\" color=\"red\">*</font><font size=\"2\" color=\"white\"> are required.</font></td></tr></table> </body> </html>"; break; } else { echo "You must be logged in to view this page. Please click <a href=\"login.php\">here</a> to login"; } ?> This page returns an error of "Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /homepages/29/d119570661/htdocs/wmptest.com/HuntReserver/add_ranch_manager.php on line 53" Thanks in advance, You guys are great and always are a big help to me. Link to comment https://forums.phpfreaks.com/topic/130679-parse-error/ Share on other sites More sharing options...
xtopolis Posted October 30, 2008 Share Posted October 30, 2008 Line 53, your \"$_SERVER['PHP_SELF']\" needs to have ending quotes and concatenators ". ." \"".$_SEVER['PHP_SELF']."\" Link to comment https://forums.phpfreaks.com/topic/130679-parse-error/#findComment-678155 Share on other sites More sharing options...
justinh Posted October 30, 2008 Author Share Posted October 30, 2008 Thanks so much! Link to comment https://forums.phpfreaks.com/topic/130679-parse-error/#findComment-678157 Share on other sites More sharing options...
justinh Posted October 30, 2008 Author Share Posted October 30, 2008 so this is correct <form name=\"addranchmanager\" method=\"POST\" action=\"".$_SERVER['PHP_SELF']."\"> I made the change but the form isn't showing up, just the labeling text next to the form i.e. Username: (no form here) etc.. o_0 Link to comment https://forums.phpfreaks.com/topic/130679-parse-error/#findComment-678162 Share on other sites More sharing options...
justinh Posted October 30, 2008 Author Share Posted October 30, 2008 Nevermind fixed problem. Sorry for double-posting. Link to comment https://forums.phpfreaks.com/topic/130679-parse-error/#findComment-678163 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.