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; ?> 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 } 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: ?> 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
Archived
This topic is now archived and is closed to further replies.