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>"; ?> 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 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 ) Link to comment https://forums.phpfreaks.com/topic/256775-unexpected-t_string/#findComment-1316363 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.