Foser Posted July 4, 2007 Share Posted July 4, 2007 heres my error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in C:\WAMP\www\Projects\LogiPlan\main\admin\user.php on line 21 part of code with problems. if (isset($_POST['delete'])){ echo "Are you sure you want to delete {$username}?<br>"; echo "<form id=\"form1\" name=\"form1\" method=\"post\" action=""> <label> <input type=\"submit\" name=\"yes\" id=\"yes\" value=\"Yes\" /> </label> <label> <input type=\"submit\" name=\"no\" id=\"no\" value=\"No\" /> </label> </form>"; if(isset($_POST['yes'])) { echo "You have deleted this user. Click <p><a href=\"index.php\">here</a></p> to go back to the admin CP." mysql_query("DELETE * FROM user_info WHERE username = '$username'"); } if(isset($POST['no'])){ header("Location: user.php?user={$_GET['user']}"); exit; }} </form>"; that is the the line. Quote Link to comment Share on other sites More sharing options...
Yesideez Posted July 4, 2007 Share Posted July 4, 2007 The line looks to be this as it gets treated as one line even though its is spread over more than one line: echo "<form id=\"form1\" name=\"form1\" method=\"post\" action=""> <label> <input type=\"submit\" name=\"yes\" id=\"yes\" value=\"Yes\" /> </label> <label> <input type=\"submit\" name=\"no\" id=\"no\" value=\"No\" /> </label> </form>"; Looks like you forgot to escape the two quotes in action: echo "<form id=\"form1\" name=\"form1\" method=\"post\" action=\"\"> <label> <input type=\"submit\" name=\"yes\" id=\"yes\" value=\"Yes\" /> </label> <label> <input type=\"submit\" name=\"no\" id=\"no\" value=\"No\" /> </label> </form>"; 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.