advancedfuture Posted January 8, 2008 Share Posted January 8, 2008 I keep getting the "Parse error: syntax error, unexpected $end in C:\wamp\www\index.php on line 24" error.... I have everything closed properly with brackets, etc... what am I missing? Thanks! <?php session_start(); $username = $_SESSION['username']; $token = $_SESSION['token']; //echo $username ."<br>"; debug code //echo $token ."<br>"; debug code include 'dbConnect.php'; $query = "SELECT token FROM users WHERE Username = '$username'"; $results = mysql_query($query); $num = mysql_num_rows($results); while($row=mysql_fetch_array($results)) { $dbtoken = $row[0]; } echo $dbtoken; echo $token; ?> Quote Link to comment https://forums.phpfreaks.com/topic/84945-solved-keep-getting-unexpected-end-error/ Share on other sites More sharing options...
fert Posted January 8, 2008 Share Posted January 8, 2008 you have an extra } Quote Link to comment https://forums.phpfreaks.com/topic/84945-solved-keep-getting-unexpected-end-error/#findComment-433142 Share on other sites More sharing options...
toplay Posted January 8, 2008 Share Posted January 8, 2008 Remove the right curly brace just before the end PHP tag. Change this: } ?> To this: ?> Quote Link to comment https://forums.phpfreaks.com/topic/84945-solved-keep-getting-unexpected-end-error/#findComment-433145 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.