livethedead Posted February 9, 2012 Share Posted February 9, 2012 No clue what's wrong, line 9. <?php require '/opt/lampp/htdocs/PHP/PHP&MYSQL/scripts/database_connection.php'; // database connection file $query_text = $_REQUEST['query']; $result = mysql_query($query_text); if (!$result) { die("Error connecting to database:". $query_text . mysql_error() .); } echo "<p>Results from your query:</p>"; echo "<ul>"; while ($row = mysql_fetch_row($result)) { echo "<li>({$row[0]}</li>"; } echo "</ul>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/256775-unexpected-t_string/ Share on other sites More sharing options...
spiderwell Posted February 9, 2012 Share Posted February 9, 2012 the extra . after mysql error Quote Link to comment https://forums.phpfreaks.com/topic/256775-unexpected-t_string/#findComment-1316362 Share on other sites More sharing options...
spiderwell Posted February 9, 2012 Share Posted February 9, 2012 the . is used to concatenate strings together, so its expecting something like a string or variable, not a ) Quote Link to comment https://forums.phpfreaks.com/topic/256775-unexpected-t_string/#findComment-1316363 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.