davidknag Posted January 9, 2011 Share Posted January 9, 2011 heres my PHP: i cant find the problem <?php $dbhost = 'localhost'; $dbname = 'games'; $dbuser = 'webuser'; $dbpass = 'MY PASSWORD IS HIDDEN '; $connect = mysql_connect($dbhost, $dbuser, $dbpass) or die(mysql_error()); mysql_select_db($dbname) or die(mysql_error()); if (isset($_GET['cat'])){ $cat = $_GET['cat']; $get_games = mysql_query("SELECT * FROM games WHERE category = '$cat'"); $get_games_rows = mysql_num_rows($get_games); if ($get_games_rows>=1){ while ($fetch = mysql_fetch_assoc($get_games)){ $id = $fetch['id']; $title = $fetch['title']; $thumb = $fetch['thumb']; $string4= '<div class='gamelisting'>'; $string4= '<a href='play.php?id=".$id."'>'; $string4= '<img src='thumbs/".$thumb."' width='80' height='60' alt='' /><br />'; $string4= '".$title."</a></div>'; <?php echo $string1.$string2.$string3.$string4; ?> } } } else echo "Category does not exist"; ?> Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted January 9, 2011 Share Posted January 9, 2011 Parse error: syntax error, unexpected T_STRING in /Users/lesbrown/Sites/site1/phpFreaks/test.php on line 22 do you have error reporting turned off entirely? Quote Link to comment Share on other sites More sharing options...
davidknag Posted January 9, 2011 Author Share Posted January 9, 2011 i cant change any php settings :/ but how would i fix this error in my script? Quote Link to comment 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.