This was originally a code that i used with an older version of php, and i changed it a bit to make it work with the new version, but as you can tell, it’s not working.
I have been struggling with this code for a few days now, and i can’t figure it out. Anyone see anything wrong with the following code? My database fields are: show, season, episode, code…
echo “You did not select a show!”;
<?php $dbhost = 'localhost'; $dbuser = '*********'; $dbpass = '*****'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = 'playmode_shows' or die ('Error: '.mysql_error ()); mysql_select_db($dbname); $query = "SELECT `episode`, `show`, `code` FROM `shows` WHERE `episode`='$episode' ORDER BY `episode`"; $result = mysql_query ('SELECT * FROM shows') or die ('Error: '.mysql_error ()); while($row = mysql_fetch_array($result, MYSQL_ASSOC)); ?>
I’m trying to use that code to pull up a list of my shows in my db with the link http://www.playmode.tv/index.php?page=shows&show=Scrubs
Also, this is the code for the page that I’m trying to link to, which is also not working…
echo “You did not select an episode!”;
<? echo $row['code']; ?>