someone please help me.
I've been now messing with this for while and no matter what example I download from online it always has error.
here is my code
<?php
$host = "localhost";
$user = "neclord81";
$pass = "";
$dbname = "avabank";
$admin_id = 'admin';
$admin_pw = 'admin';
// Time (TimeStamp)
$time = time();
// Database Connection
if ($dbconn != 'n') {
$connect = mysql_connect($host,$user,$pass);
mysql_select_db($dbname,$connect);
}
$id_auth = $HTTP_COOKIE_VARS[id_auth];
$sex_auth = $HTTP_COOKIE_VARS[sex_auth];
function member_login () {
global $id_auth,$sex_auth;
if ($id_auth && $sex_auth)
return true;
else
return false;
}
function alert_box ($msg_str,$back,$refresh) {
print ("<script language='javascript'>\n");
print ("alert ('$msg_str')\n");
if ($back) : print ("history.go(-$back)\n");
endif;
print ("</script>");
if ($refresh) : print ("<meta http-equiv='Refresh' content='0;URL=$refresh'>\n");
endif;
}
if (!$id_auth) {
$sql = "SELECT sex FROM avatar_member WHERE id='$id'";
$query = mysql_query ($sql,$connect);
$row = mysql_fetch_array ($query);
$sex_auth = $row[sex];
}
if ($sex_auth == 1) {
$dir = 'm_img';
$a_page = 'm_avatar.htm';
}
else {
$dir = 'f_img';
$a_page = 'f_avatar.htm';
}
?>
With this code I get these errors
Notice: Undefined variable: dbconn in D:\WEB_SERVER\LOGIN\avatar_free\config.php on line 14
Notice: Use of undefined constant id_auth - assumed 'id_auth' in D:\WEB_SERVER\LOGIN\avatar_free\config.php on line 19
Notice: Undefined index: id_auth in D:\WEB_SERVER\LOGIN\avatar_free\config.php on line 19
Notice: Use of undefined constant sex_auth - assumed 'sex_auth' in D:\WEB_SERVER\LOGIN\avatar_free\config.php on line 20
Notice: Undefined index: sex_auth in D:\WEB_SERVER\LOGIN\avatar_free\config.php on line 20
Notice: Undefined variable: id in D:\WEB_SERVER\LOGIN\avatar_free\config.php on line 38
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in D:\WEB_SERVER\LOGIN\avatar_free\config.php on line 40
Notice: Use of undefined constant sex - assumed 'sex' in D:\WEB_SERVER\LOGIN\avatar_free\config.php on line 41