topflight Posted November 3, 2008 Share Posted November 3, 2008 I am receiving the following error. Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\fileloa.php on line 25 This is my code <?php if(!$_COOKIE['login']) { header("Location:login.php"); } ?> <?php if(isset($_GET['login'])){ include 'db.php'; $sql = "SELECT status FROM pilots WHERE login = '{$_GET['login']}'"; $query = mysql_query($sql) or die("Problem with the query: $sql<br>" . mysql_error()); $query = mysql_query($sql); if ($query){ $lrows = mysql_num_rows($query); if ($lrows == 3){ echo'You Are Already on L.O.A';} } if(isset($_POST['apply'])){ $update = "UPDATE pilots SET status = '3' WHERE login = '{$_GET['login']}'"; $result = mysql_query($update) or die mysql_error()); } } ?> <script>javascript:alert("You have now Filed an L.O.A")</script> <form action="<?php echo $_SERVER['php_self']; ?>" method="post"/> <input type="submit" name="apply" value="file L.O.A"/> </form> This is line 25 $result = mysql_query($update) or die mysql_error()); May somebody please tell me why I am always receiving these errors, an dhow to fix them in the future thanks. Link to comment https://forums.phpfreaks.com/topic/131151-t-string-error-please-help/ Share on other sites More sharing options...
F1Fan Posted November 3, 2008 Share Posted November 3, 2008 You're missing a } somewhere. Link to comment https://forums.phpfreaks.com/topic/131151-t-string-error-please-help/#findComment-680953 Share on other sites More sharing options...
topflight Posted November 3, 2008 Author Share Posted November 3, 2008 well if I was wouldn't I would get a $end error, also I wonder where I am missing it at. Link to comment https://forums.phpfreaks.com/topic/131151-t-string-error-please-help/#findComment-680954 Share on other sites More sharing options...
F1Fan Posted November 3, 2008 Share Posted November 3, 2008 I don't know what your code is supposed to do, I am only looking at the syntax. You have 5 if(){ and 4 }. Link to comment https://forums.phpfreaks.com/topic/131151-t-string-error-please-help/#findComment-680960 Share on other sites More sharing options...
kenrbnsn Posted November 3, 2008 Share Posted November 3, 2008 On this line: <?php $result = mysql_query($update) or die mysql_error()); ?> You are missing the opening "(" on the die statement. It should be: <?php $result = mysql_query($update) or die (mysql_error()); ?> Ken Link to comment https://forums.phpfreaks.com/topic/131151-t-string-error-please-help/#findComment-680963 Share on other sites More sharing options...
topflight Posted November 3, 2008 Author Share Posted November 3, 2008 thanks it works Link to comment https://forums.phpfreaks.com/topic/131151-t-string-error-please-help/#findComment-680966 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.