PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm working on some code that will serve as a function of a bigger script. I couldn't get the function working, so I put the query in it's own php file just to test it... heres the code:
<?php
$username = "*****";
$password = "*****";
$database = "quahog5news_com_-_information";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die("Unable to select database");
$query = "SELECT epname FROM episodeguide WHERE epcode = $epcode";
$output = mysql_query($query);
echo $output;
?>
all I want to do is pull the information from the field "epname" where the epcode is equal to $epcode. $epcode will be passed into the function and is dynamic... what am I doing wrong? this script doesn't return errors, but outputs nothing.