Hi Guys, I am having issues with this bit of code: I keep getting this error on the line of code I have made bold. function get_proxy() { require_once('../Connections/Proxys.php'); mysql_connect($hostname_Proxys, $username_Proxys, $password_Proxys) or die(mysql_error()); mysql_select_db($database_Proxys) or die(mysql_error()); $sql = "SELECT address FROM proxy ORDER BY rand() LIMIT 1"; $q = mysql_query($sql); $r = mysql_fetch_array($q); if (empty($r) || empty($r["address"])) { echo 'You have run out of proxys. <a href="addproxys.php">Click Here</a> to add some more.'; die; } return $r["address"]; } function delete_proxy($address) { require_once('../Connections/Proxys.php'); mysql_connect($hostname_Proxys, $username_Proxys, $password_Proxys) or die(mysql_error()); mysql_select_db($database_Proxys) or die(mysql_error()); $sql = "DELETE FROM proxy WHERE address = '" . mysql_escape_string($address) . "'"; mysql_query($sql); } PHP: Can anybody help?
Find the require_once include../Connections/Proxys.php, and be sure the variable $hostname_Proxys is initialized to a proper string (localhost?) and is spelled correctly with proper case!
The variable $hostname_Proxys is not set, set it within the file ../Connections/Proxys.php to resolve the issue.
hostname_Proxys ( variable ) isn't preset ( you need to create it ) or is a local variable ( you need to make it global ).