<?php
require ("../acfile/adex/site/acvar.php");
require ("../acfile/adex/site/acfunc.php");
require ("../acfile/adex/site/acload.php");
require ("../acfile/adex/site/actemp.php");
header("Content-type: text/html; charset=ISO-8859-1");
Adex_AcDoctype();
Adex_AcHeader('Registration',$Adex_AcStyle);
$Adex_AcDivTitle="Registration";
Adex_AcDivTitle($Adex_AcDivTitle);
$yes=$_GET['yes'];
$nickname=Adex_AcScan($_POST['userlog']);
$pass=Adex_AcScan($_POST['passme']);
$passc=Adex_AcScan($_POST['passmec']);
$mail=Adex_AcScan($_POST['email']);
$sex=Adex_AcScan($_POST['usersex']);
$fname=Adex_AcScan($_POST['firstn']);
$sname=Adex_AcScan($_POST['secondn']);
$count=Adex_AcScan($_POST['ucountry']);
if($yes==yes)
{
$Adex_AcCheckField=mysql_fetch_array(mysql_query(" SELET nickname FROM adeyemi_acmembers WHERE nickname = ".$nickname.""));
if($Adex_AcCheckField[0]==1)
{echo "The Nickname already exist.<br/>Please try another Nickname";}
if($pass!=$passc)
{echo "Your password did not match.<br/>Please try again!";
}else
$Adex_AcCheckFiel=mysql_fetch_array(mysql_query("S ELECT email FROM adeyemi_acmembers WHERE email = ".$mail.""));
if($Adex_AcCheckFiel[0]==1){
echo "email already exist.<br/>Please try anothe email";}
else if($nickname<3){
echo "Your username must not less than 3 alphabet.<br/>Please try again";}
else if($pass<6)
{echo "Your password is too short, must not less than 6 alphabet";}
else if(empty($nickname)){
echo "Nickname field must not be empty.<br/>Please try again and put your nickname";
}else
if(empty($pass)){
echo "Password field must not be empty.<br/>Please try again and put your Password";
}else
if(empty($mail)){
echo "Email field must not be empty.<br/>Please try again and put your Email";
}else
if($mail<4){
echo "Email must not less than 4.<br/>Please try again and put your valid email";
}
else if($Adex_AcCheckField[0]==0||$Adex_AcCheckFiel[0]==0||$pass=$passc||$pass>6||$nickname>3||!empty($n ickname)||!empty($pass)||!empty($mail)||$mail>4)
{
mysql_query("INSERT INTO adeyemi_acmembers (`acnickname` , `acpassme`, `acemail`, `acsex`, `acfname`, `acsname`, `accountry`, `ackey`) VALUES ('".$nickname."', '".Adex_AcScan(md5($_POST['password']))."', '".$mail."', '".$sex."', '".$fname."', '".$sname."', '".$count."', '".Adex_AcKey('alnum', 32)."'");
$Adex_User = mysql_num_row(mysql_query("SELECT acid, acnickname FROM adeyemi_acmembers WHERE acnickname = '".$nickname."'"));
echo "account has been registed successfully.<br/> Dont forget to tell your mates about this great site .<br/>";
echo "<a href=\"adex_aclog.php?userlog=$nickname&passme =$pass\">LOGIN NOW!</a><br /> ";
}
}else{
Adex_AcRegForm();
Adex_AcDivFooter($acmp);
Adex_AcFooter();
exit();
}
?>
when i upload my new file today the registration not work, sql not connected and i dont know why!
pls what happen to it and i have a valid sql table at database.
result error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/*****/public_html/******/adex_acreg/index.php on line 22
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/******/public_html/****/adex_acreg/index.php on line 28
Your username must not less than 3 alphabet.
Please try again
here is the table
CREATE TABLE IF NOT EXISTS `adeyemi_acmembers` (
`id` int(11) NOT NULL auto_increment,
`nickname` varchar(255) NOT NULL,
`passme` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`acactive` int(11) NOT NULL default '1',
`rank` int(11) NOT NULL default '0',
`ackey` varchar(32) default NULL,
`acfname` varchar(20) NOT NULL,
`age` varchar(2) NOT NULL,
`accountry` varchar(30) NOT NULL,
`status` varchar(20) NOT NULL,
`acsname` varchar(20) NOT NULL,
`acsex` varchar(6) NOT NULL,
`acinfo` varchar(100) NOT NULL,
`visits` text NOT NULL,
`forumban` varchar(1) NOT NULL default '0',
`chatban` varchar(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `acnickname` (`nickname`),
UNIQUE KEY `acemail` (`acemail`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
require ("../acfile/adex/site/acvar.php");
require ("../acfile/adex/site/acfunc.php");
require ("../acfile/adex/site/acload.php");
require ("../acfile/adex/site/actemp.php");
header("Content-type: text/html; charset=ISO-8859-1");
Adex_AcDoctype();
Adex_AcHeader('Registration',$Adex_AcStyle);
$Adex_AcDivTitle="Registration";
Adex_AcDivTitle($Adex_AcDivTitle);
$yes=$_GET['yes'];
$nickname=Adex_AcScan($_POST['userlog']);
$pass=Adex_AcScan($_POST['passme']);
$passc=Adex_AcScan($_POST['passmec']);
$mail=Adex_AcScan($_POST['email']);
$sex=Adex_AcScan($_POST['usersex']);
$fname=Adex_AcScan($_POST['firstn']);
$sname=Adex_AcScan($_POST['secondn']);
$count=Adex_AcScan($_POST['ucountry']);
if($yes==yes)
{
$Adex_AcCheckField=mysql_fetch_array(mysql_query(" SELET nickname FROM adeyemi_acmembers WHERE nickname = ".$nickname.""));
if($Adex_AcCheckField[0]==1)
{echo "The Nickname already exist.<br/>Please try another Nickname";}
if($pass!=$passc)
{echo "Your password did not match.<br/>Please try again!";
}else
$Adex_AcCheckFiel=mysql_fetch_array(mysql_query("S ELECT email FROM adeyemi_acmembers WHERE email = ".$mail.""));
if($Adex_AcCheckFiel[0]==1){
echo "email already exist.<br/>Please try anothe email";}
else if($nickname<3){
echo "Your username must not less than 3 alphabet.<br/>Please try again";}
else if($pass<6)
{echo "Your password is too short, must not less than 6 alphabet";}
else if(empty($nickname)){
echo "Nickname field must not be empty.<br/>Please try again and put your nickname";
}else
if(empty($pass)){
echo "Password field must not be empty.<br/>Please try again and put your Password";
}else
if(empty($mail)){
echo "Email field must not be empty.<br/>Please try again and put your Email";
}else
if($mail<4){
echo "Email must not less than 4.<br/>Please try again and put your valid email";
}
else if($Adex_AcCheckField[0]==0||$Adex_AcCheckFiel[0]==0||$pass=$passc||$pass>6||$nickname>3||!empty($n ickname)||!empty($pass)||!empty($mail)||$mail>4)
{
mysql_query("INSERT INTO adeyemi_acmembers (`acnickname` , `acpassme`, `acemail`, `acsex`, `acfname`, `acsname`, `accountry`, `ackey`) VALUES ('".$nickname."', '".Adex_AcScan(md5($_POST['password']))."', '".$mail."', '".$sex."', '".$fname."', '".$sname."', '".$count."', '".Adex_AcKey('alnum', 32)."'");
$Adex_User = mysql_num_row(mysql_query("SELECT acid, acnickname FROM adeyemi_acmembers WHERE acnickname = '".$nickname."'"));
echo "account has been registed successfully.<br/> Dont forget to tell your mates about this great site .<br/>";
echo "<a href=\"adex_aclog.php?userlog=$nickname&passme =$pass\">LOGIN NOW!</a><br /> ";
}
}else{
Adex_AcRegForm();
Adex_AcDivFooter($acmp);
Adex_AcFooter();
exit();
}
?>
when i upload my new file today the registration not work, sql not connected and i dont know why!
pls what happen to it and i have a valid sql table at database.
result error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/*****/public_html/******/adex_acreg/index.php on line 22
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/******/public_html/****/adex_acreg/index.php on line 28
Your username must not less than 3 alphabet.
Please try again
here is the table
CREATE TABLE IF NOT EXISTS `adeyemi_acmembers` (
`id` int(11) NOT NULL auto_increment,
`nickname` varchar(255) NOT NULL,
`passme` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`acactive` int(11) NOT NULL default '1',
`rank` int(11) NOT NULL default '0',
`ackey` varchar(32) default NULL,
`acfname` varchar(20) NOT NULL,
`age` varchar(2) NOT NULL,
`accountry` varchar(30) NOT NULL,
`status` varchar(20) NOT NULL,
`acsname` varchar(20) NOT NULL,
`acsex` varchar(6) NOT NULL,
`acinfo` varchar(100) NOT NULL,
`visits` text NOT NULL,
`forumban` varchar(1) NOT NULL default '0',
`chatban` varchar(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `acnickname` (`nickname`),
UNIQUE KEY `acemail` (`acemail`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
Comment