RE: [PHP] Please Help Me ASAP

2009-04-10 Thread abdulazeez alugo


 

 Date: Fri, 10 Apr 2009 08:33:10 +0530
 From: usang...@gmail.com
 To: php-general@lists.php.net
 Subject: [PHP] Please Help Me ASAP
 
 Hello,
 I'm building my own website without any knowledge of PHP,  i'm almost done
 with that..as my website works fine on my local server
 i:e WAMPSERVER 2.0,
 but the same code is not working on server...n i'm rilli 'd of coz of
 that...
 
 The error is :PHP Parse error: syntax error, unexpected $end in
 /home/usang2me/public_html/sign_up.php on line 145
 
 145 happens to be last line i:e ? , but here becoz of pattern..itz not
 into its proper way...
 
 
 After filling the sign up form correctly . it says ALL FIELD ARE
 MANDATORYi dont understand ...y soi'm pasting my code here...please
 help me asap ...
 each and every suggestion will be appreciat'd
 
 
 
 Here Is The Code:
 
 ?php
 $username = $_POST['username'];
 $password1 = $_POST['password1'];
 $password2 = $_POST['password2'];
 $name = $_POST['name'];
 $address = $_POST['address'];
 $city = $_POST['city'];
 $state = $_POST['state'];
 $code = $_POST['code'];
 $phone = $_POST['phone'];
 $email = $_POST['email'];
 //$bankname = $_POST['bankname'];
 //$bankbranch = $_POST['bankbranch'];
 //$accountnumber = $_POST['bankac'];
 $refer_id = $_POST['refer_id'];
 //$country = $_POST['country'];
 // Connects to your Database
 include('database_connect_local.php');
 //This makes sure they did not leave any fields blank
 $minuser_len = 6; //username minimum length
 $minpass_len = 6; //password minimum length
 $mincode_len = 6; //code minimum length
 $minphone_len = 10; //phone minimum length
 //$refer_id_len = 6; //refer_id minimum length
 
 if (strlen($username)  $minuser_len || strlen($password1)  $minpass_len ||
 strlen($code)  $mincode_len || strlen($phone)  $minphone_len)
 {
 echo html;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo table align=center border=1 cellpadding=0 cellspacing=0
 bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
 echo tr td align=centerp font color=black span
 style=font-size:11pt;bMinimum length values for Username or Password or
 Pincode or Mobile is missing. Please try again with correct
 values./b/span/font/p/td /tr /table /html;
 include 'signup.php';
 exit;
 //die(User/password was not long enough!);
 }elseif (!is_numeric($code) || !is_numeric($phone)){
 echo html;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo table align=center border=1 cellpadding=0 cellspacing=0
 bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
 echo tr td align=centerp font color=black span
 style=font-size:11pt;bNon Numeric Character Where only Numeric Value is
 Allowed./b/span/font/p/td /tr /table /html;
 include 'signup.php';
 exit;
 //}elseif (empty($username)|| empty($password1) || empty($password2) ||
 empty($name) || empty($address) || empty($city) || empty($state) ||
 empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
 //echo html;
 //echo nbsp;;
 //echo nbsp;;
 //echo nbsp;;
 //echo nbsp;;
 //echo nbsp;;
 //echo nbsp;;
 //echo nbsp;;
 //echo nbsp;;
 //echo nbsp;;
 //echo table align=center border=1 cellpadding=0 cellspacing=0
 bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
 //echo tr td align=centerp font color=black span
 style=font-size:11pt;bAll fields are Mandatory/b/span/font/p/td
 /tr /table ///html;
 //include 'signup.php';
 }else{
 // checks if the username is in use
 $checkuser = mysql_query(SELECT username FROM id_users WHERE
 username='$username');
 $username_exist = mysql_num_rows($checkuser);
 $referid = mysql_query(SELECT username FROM id_users WHERE
 username='$refer_id');
 $referid_exist = mysql_num_rows($referid);
 if($username_exist != 0){
 echo html;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo table align=center border=1 cellpadding=0 cellspacing=0
 bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
 echo tr td align=centerp font color=black span
 style=font-size:11pt;bI'm sorry but the username you specified has
 already been taken. Please pick another one./b/span/font/p/td
 /tr /table /html;
 unset($username);
 include 'signup.php';
 }elseif($referid_exist  0){
 echo html;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo table align=center border=1 cellpadding=0 cellspacing=0
 bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
 echo tr td align=centerp font color=black span
 style=font-size:11pt;bI'm sorry but the referral id doesn't exist. Please
 check the referral id or enter the valid one./b/span/font/p/td
 /tr /table /html;
 unset($username);
 include 'signup.php';
 }else{
 // this makes sure both passwords entered match
 if ($password1 != $password2) {
 die('Your passwords did not match.');
 }else{
 //}
 // now

Re: [PHP] Please Help Me ASAP

2009-04-10 Thread Bipin Upadhyay

kunal sharma wrote:

 Hello,
I'm building my own website without any knowledge of PHP,  i'm almost done
with that..as my website works fine on my local server
i:e WAMPSERVER 2.0,
but the same code is not working on server...n i'm rilli 'd of coz of
that...

The error is :PHP Parse error: syntax error, unexpected $end in
/home/usang2me/public_html/sign_up.php on line 145

145 happens to be last line i:e ? , but here becoz of pattern..itz not
into its proper way...


After filling the sign up form correctly . it says ALL FIELD ARE
MANDATORYi dont understand ...y soi'm pasting my code here...please
help me asap ...
each and every suggestion will be appreciat'd



Here Is The Code:

?php
$username = $_POST['username'];
$password1 = $_POST['password1'];
$password2 = $_POST['password2'];
$name = $_POST['name'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$code = $_POST['code'];
$phone = $_POST['phone'];
$email = $_POST['email'];
//$bankname = $_POST['bankname'];
//$bankbranch = $_POST['bankbranch'];
//$accountnumber = $_POST['bankac'];
$refer_id = $_POST['refer_id'];
//$country = $_POST['country'];
// Connects to your Database
include('database_connect_local.php');
//This makes sure they did not leave any fields blank
$minuser_len = 6; //username minimum length
$minpass_len = 6; //password minimum length
$mincode_len = 6; //code minimum length
$minphone_len = 10; //phone minimum length
//$refer_id_len = 6; //refer_id minimum length

if (strlen($username)  $minuser_len || strlen($password1)  $minpass_len ||
strlen($code)  $mincode_len || strlen($phone)  $minphone_len)
{
echo html;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo table align=center border=1 cellpadding=0 cellspacing=0
bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
echo tr td align=centerp font color=black span
style=font-size:11pt;bMinimum length values for Username or Password or
Pincode or Mobile is missing. Please try again with correct
values./b/span/font/p/td /tr /table /html;
include 'signup.php';
exit;
//die(User/password was not long enough!);
}elseif (!is_numeric($code) || !is_numeric($phone)){
echo html;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo table align=center border=1 cellpadding=0 cellspacing=0
bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
echo tr td align=centerp font color=black span
style=font-size:11pt;bNon Numeric Character Where only Numeric Value is
Allowed./b/span/font/p/td /tr /table /html;
include 'signup.php';
exit;
//}elseif (empty($username)|| empty($password1) || empty($password2) ||
empty($name) || empty($address) || empty($city) || empty($state) ||
empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
//echo html;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo table align=center border=1 cellpadding=0 cellspacing=0
bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
//echo tr td align=centerp font color=black span
style=font-size:11pt;bAll fields are Mandatory/b/span/font/p/td
/tr /table ///html;
//include 'signup.php';
}else{
// checks if the username is in use
$checkuser = mysql_query(SELECT username FROM id_users WHERE
username='$username');
$username_exist = mysql_num_rows($checkuser);
$referid = mysql_query(SELECT username FROM id_users WHERE
username='$refer_id');
$referid_exist = mysql_num_rows($referid);
if($username_exist != 0){
echo html;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo table align=center border=1 cellpadding=0 cellspacing=0
bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
echo tr td align=centerp font color=black span
style=font-size:11pt;bI'm sorry but the username you specified has
already been taken. Please pick another one./b/span/font/p/td
/tr /table /html;
unset($username);
include 'signup.php';
}elseif($referid_exist  0){
echo html;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo table align=center border=1 cellpadding=0 cellspacing=0
bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
echo tr td align=centerp font color=black span
style=font-size:11pt;bI'm sorry but the referral id doesn't exist. Please
check the referral id or enter the valid one./b/span/font/p/td
/tr /table /html;
unset($username);
include 'signup.php';
}else{
// this makes sure both passwords entered match
if ($password1 != $password2) {
die('Your passwords did not match.');
}else{
//}
// now we insert it into the database
//$password3 = md5($_POST['password1']);//
$insert = INSERT INTO id_users (username, password, name, address, city,
state, code, phone, email, payment_status, member_status, total_member,
refer_id)
VALUES ('$username', '$password1', '$name', 

Re: [PHP] Please Help Me ASAP

2009-04-10 Thread Jignesh Thummar
whenever you want to print HTMLs in your code you don't need to call echo or
print everytime.
You can use plain HTML in your php code this way.

?php
//php code
?
your HTML code
?php
//php code
?
your HTML code

or you can use HEREDOC to print long string ( http://in.php.net/types.string)

- Jignesh

On Fri, Apr 10, 2009 at 12:37 PM, Bipin Upadhyay muxical.g...@gmail.comwrote:

 kunal sharma wrote:

  Hello,
 I'm building my own website without any knowledge of PHP,  i'm almost
 done
 with that..as my website works fine on my local server
 i:e WAMPSERVER 2.0,
 but the same code is not working on server...n i'm rilli 'd of coz of
 that...

 The error is :PHP Parse error: syntax error, unexpected $end in
 /home/usang2me/public_html/sign_up.php on line 145

 145 happens to be last line i:e ? , but here becoz of pattern..itz
 not
 into its proper way...

 
 After filling the sign up form correctly . it says ALL FIELD ARE
 MANDATORYi dont understand ...y soi'm pasting my code
 here...please
 help me asap ...
 each and every suggestion will be appreciat'd



 Here Is The Code:

 ?php
 $username = $_POST['username'];
 $password1 = $_POST['password1'];
 $password2 = $_POST['password2'];
 $name = $_POST['name'];
 $address = $_POST['address'];
 $city = $_POST['city'];
 $state = $_POST['state'];
 $code = $_POST['code'];
 $phone = $_POST['phone'];
 $email = $_POST['email'];
 //$bankname = $_POST['bankname'];
 //$bankbranch = $_POST['bankbranch'];
 //$accountnumber = $_POST['bankac'];
 $refer_id = $_POST['refer_id'];
 //$country = $_POST['country'];
 // Connects to your Database
 include('database_connect_local.php');
 //This makes sure they did not leave any fields blank
 $minuser_len = 6; //username minimum length
 $minpass_len = 6; //password minimum length
 $mincode_len = 6; //code minimum length
 $minphone_len = 10; //phone minimum length
 //$refer_id_len = 6; //refer_id minimum length

 if (strlen($username)  $minuser_len || strlen($password1)  $minpass_len
 ||
 strlen($code)  $mincode_len || strlen($phone)  $minphone_len)
 {
 echo html;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo table align=center border=1 cellpadding=0 cellspacing=0
 bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
 echo tr td align=centerp font color=black span
 style=font-size:11pt;bMinimum length values for Username or Password or
 Pincode or Mobile is missing. Please try again with correct
 values./b/span/font/p/td /tr /table /html;
 include 'signup.php';
 exit;
 //die(User/password was not long enough!);
 }elseif (!is_numeric($code) || !is_numeric($phone)){
 echo html;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo table align=center border=1 cellpadding=0 cellspacing=0
 bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
 echo tr td align=centerp font color=black span
 style=font-size:11pt;bNon Numeric Character Where only Numeric Value is
 Allowed./b/span/font/p/td /tr /table /html;
 include 'signup.php';
 exit;
 //}elseif (empty($username)|| empty($password1) || empty($password2) ||
 empty($name) || empty($address) || empty($city) || empty($state) ||
 empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
 //echo html;
 //echo nbsp;;
 //echo nbsp;;
 //echo nbsp;;
 //echo nbsp;;
 //echo nbsp;;
 //echo nbsp;;
 //echo nbsp;;
 //echo nbsp;;
 //echo nbsp;;
 //echo table align=center border=1 cellpadding=0 cellspacing=0
 bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
 //echo tr td align=centerp font color=black span
 style=font-size:11pt;bAll fields are
 Mandatory/b/span/font/p/td
 /tr /table ///html;
 //include 'signup.php';
 }else{
 // checks if the username is in use
 $checkuser = mysql_query(SELECT username FROM id_users WHERE
 username='$username');
 $username_exist = mysql_num_rows($checkuser);
 $referid = mysql_query(SELECT username FROM id_users WHERE
 username='$refer_id');
 $referid_exist = mysql_num_rows($referid);
 if($username_exist != 0){
 echo html;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo table align=center border=1 cellpadding=0 cellspacing=0
 bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
 echo tr td align=centerp font color=black span
 style=font-size:11pt;bI'm sorry but the username you specified has
 already been taken. Please pick another one./b/span/font/p/td
 /tr /table /html;
 unset($username);
 include 'signup.php';
 }elseif($referid_exist  0){
 echo html;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo nbsp;;
 echo table align=center border=1 cellpadding=0 cellspacing=0
 bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
 echo tr td align=centerp font color=black span
 style=font-size:11pt;bI'm sorry but the referral id doesn't exist.
 Please
 check the 

[PHP] Please Help Me ASAP

2009-04-09 Thread kunal sharma
 Hello,
I'm building my own website without any knowledge of PHP,  i'm almost done
with that..as my website works fine on my local server
i:e WAMPSERVER 2.0,
but the same code is not working on server...n i'm rilli 'd of coz of
that...

The error is :PHP Parse error: syntax error, unexpected $end in
/home/usang2me/public_html/sign_up.php on line 145

145 happens to be last line i:e ? , but here becoz of pattern..itz not
into its proper way...


After filling the sign up form correctly . it says ALL FIELD ARE
MANDATORYi dont understand ...y soi'm pasting my code here...please
help me asap ...
each and every suggestion will be appreciat'd



Here Is The Code:

?php
$username = $_POST['username'];
$password1 = $_POST['password1'];
$password2 = $_POST['password2'];
$name = $_POST['name'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$code = $_POST['code'];
$phone = $_POST['phone'];
$email = $_POST['email'];
//$bankname = $_POST['bankname'];
//$bankbranch = $_POST['bankbranch'];
//$accountnumber = $_POST['bankac'];
$refer_id = $_POST['refer_id'];
//$country = $_POST['country'];
// Connects to your Database
include('database_connect_local.php');
//This makes sure they did not leave any fields blank
$minuser_len = 6; //username minimum length
$minpass_len = 6; //password minimum length
$mincode_len = 6; //code minimum length
$minphone_len = 10; //phone minimum length
//$refer_id_len = 6; //refer_id minimum length

if (strlen($username)  $minuser_len || strlen($password1)  $minpass_len ||
strlen($code)  $mincode_len || strlen($phone)  $minphone_len)
{
echo html;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo table align=center border=1 cellpadding=0 cellspacing=0
bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
echo tr td align=centerp font color=black span
style=font-size:11pt;bMinimum length values for Username or Password or
Pincode or Mobile is missing. Please try again with correct
values./b/span/font/p/td /tr /table /html;
include 'signup.php';
exit;
//die(User/password was not long enough!);
}elseif (!is_numeric($code) || !is_numeric($phone)){
echo html;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo table align=center border=1 cellpadding=0 cellspacing=0
bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
echo tr td align=centerp font color=black span
style=font-size:11pt;bNon Numeric Character Where only Numeric Value is
Allowed./b/span/font/p/td /tr /table /html;
include 'signup.php';
exit;
//}elseif (empty($username)|| empty($password1) || empty($password2) ||
empty($name) || empty($address) || empty($city) || empty($state) ||
empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
//echo html;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo table align=center border=1 cellpadding=0 cellspacing=0
bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
//echo tr td align=centerp font color=black span
style=font-size:11pt;bAll fields are Mandatory/b/span/font/p/td
/tr /table ///html;
//include 'signup.php';
}else{
// checks if the username is in use
$checkuser = mysql_query(SELECT username FROM id_users WHERE
username='$username');
$username_exist = mysql_num_rows($checkuser);
$referid = mysql_query(SELECT username FROM id_users WHERE
username='$refer_id');
$referid_exist = mysql_num_rows($referid);
if($username_exist != 0){
echo html;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo table align=center border=1 cellpadding=0 cellspacing=0
bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
echo tr td align=centerp font color=black span
style=font-size:11pt;bI'm sorry but the username you specified has
already been taken. Please pick another one./b/span/font/p/td
/tr /table /html;
unset($username);
include 'signup.php';
}elseif($referid_exist  0){
echo html;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo table align=center border=1 cellpadding=0 cellspacing=0
bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
echo tr td align=centerp font color=black span
style=font-size:11pt;bI'm sorry but the referral id doesn't exist. Please
check the referral id or enter the valid one./b/span/font/p/td
/tr /table /html;
unset($username);
include 'signup.php';
}else{
// this makes sure both passwords entered match
if ($password1 != $password2) {
die('Your passwords did not match.');
}else{
//}
// now we insert it into the database
//$password3 = md5($_POST['password1']);//
$insert = INSERT INTO id_users (username, password, name, address, city,
state, code, phone, email, payment_status, member_status, total_member,
refer_id)
VALUES ('$username', '$password1', '$name', '$address', '$city', 

Re: [PHP] Please Help Me ASAP

2009-04-09 Thread Jason Pruim



Jason Pruim

On Apr 9, 2009, at 11:03 PM, kunal sharma usang...@gmail.com wrote:


Hello,
I'm building my own website without any knowledge of PHP,  i'm  
almost done

with that..as my website works fine on my local server
i:e WAMPSERVER 2.0,
but the same code is not working on server...n i'm rilli 'd of  
coz of

that...

The error is :PHP Parse error: syntax error, unexpected $end in
/home/usang2me/public_html/sign_up.php on line 145

145 happens to be last line i:e ? , but here becoz of  
pattern..itz not

into its proper way...


After filling the sign up form correctly . it says ALL FIELD ARE
MANDATORYi dont understand ...y soi'm pasting my code  
here...please

help me asap ...
each and every suggestion will be appreciat'd



Here Is The Code:

?php
$username = $_POST['username'];
$password1 = $_POST['password1'];
$password2 = $_POST['password2'];
$name = $_POST['name'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$code = $_POST['code'];
$phone = $_POST['phone'];
$email = $_POST['email'];
//$bankname = $_POST['bankname'];
//$bankbranch = $_POST['bankbranch'];
//$accountnumber = $_POST['bankac'];
$refer_id = $_POST['refer_id'];
//$country = $_POST['country'];
// Connects to your Database
include('database_connect_local.php');
//This makes sure they did not leave any fields blank
$minuser_len = 6; //username minimum length
$minpass_len = 6; //password minimum length
$mincode_len = 6; //code minimum length
$minphone_len = 10; //phone minimum length
//$refer_id_len = 6; //refer_id minimum length

if (strlen($username)  $minuser_len || strlen($password1)   
$minpass_len ||

strlen($code)  $mincode_len || strlen($phone)  $minphone_len)
{
echo html;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo table align=center border=1 cellpadding=0 cellspacing=0
bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
echo tr td align=centerp font color=black span
style=font-size:11pt;bMinimum length values for Username or  
Password or

Pincode or Mobile is missing. Please try again with correct
values./b/span/font/p/td /tr /table /html;
include 'signup.php';
exit;
//die(User/password was not long enough!);
}elseif (!is_numeric($code) || !is_numeric($phone)){
echo html;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo table align=center border=1 cellpadding=0 cellspacing=0
bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
echo tr td align=centerp font color=black span
style=font-size:11pt;bNon Numeric Character Where only Numeric  
Value is

Allowed./b/span/font/p/td /tr /table /html;
include 'signup.php';
exit;
//}elseif (empty($username)|| empty($password1) || empty($password2)  
||

empty($name) || empty($address) || empty($city) || empty($state) ||
empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
//echo html;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo nbsp;;
//echo table align=center border=1 cellpadding=0 cellspacing=0
bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
//echo tr td align=centerp font color=black span
style=font-size:11pt;bAll fields are Mandatory/b/span/font/ 
p/td

/tr /table ///html;
//include 'signup.php';
}else{
// checks if the username is in use
$checkuser = mysql_query(SELECT username FROM id_users WHERE
username='$username');
$username_exist = mysql_num_rows($checkuser);
$referid = mysql_query(SELECT username FROM id_users WHERE
username='$refer_id');
$referid_exist = mysql_num_rows($referid);
if($username_exist != 0){
echo html;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo table align=center border=1 cellpadding=0 cellspacing=0
bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
echo tr td align=centerp font color=black span
style=font-size:11pt;bI'm sorry but the username you specified has
already been taken. Please pick another one./b/span/font/p/ 
td

/tr /table /html;
unset($username);
include 'signup.php';
}elseif($referid_exist  0){
echo html;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo nbsp;;
echo table align=center border=1 cellpadding=0 cellspacing=0
bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10;
echo tr td align=centerp font color=black span
style=font-size:11pt;bI'm sorry but the referral id doesn't  
exist. Please
check the referral id or enter the valid one./b/span/font/p/ 
td

/tr /table /html;
unset($username);
include 'signup.php';
}else{
// this makes sure both passwords entered match
if ($password1 != $password2) {
die('Your passwords did not match.');
}else{
//}
// now we insert it into the database
//$password3 = md5($_POST['password1']);//
$insert = INSERT INTO id_users (username, password, name, address,  
city,
state, code, phone, email,