why its said Name Required when login?

Started on the old forum in June 2013 · view the original in the archive · old links redirect here

1 reply · 1,399 views · started 13 years ago · 1 min read

2 participants
shohel Junior · 19 posts #1
<?php 
include_once("../includes/globals.php"); 
$body->html_head(); 

$ses = $body->protect($ses); 

$body->html_title($title); 
$body->div_open(style_header); 
echo"<img src='/images/logo.png' alt='*'/><br/>"; 

$active = $setup->sitename_lang($ses,'lp'); 

$body->div_close(); 

$body->div_open(center); 
echo "<br/>"; 
$body->div_close(); 

switch($o) 
{ 

case 'log': 

if(empty($name)){ 

echo "+ Name Required!<br/>"; 

}else if(empty($pwd)){ 

echo "+ Password Required!<br/>"; 
} 
else{ 

$name = $body->protect($name); 
$pwd = $body->protect($pwd); 

$pcheck = "SELECT COUNT(*) FROM `user_sites` WHERE `sub`='".$name."' and `password`='".$pwd."' AND domain='".$subdomain."'"; 
$checkx = $db->Query($pcheck); 
$pass = $db->FetchArray($checkx); 

$check = "SELECT COUNT(*) FROM `user_sites` WHERE `sub`='".$name."' AND domain='".$subdomain."'"; 
$emcheck = $db->Query($check); 
$capture = $db->FetchArray($emcheck); 
if($capture[0]=="1"){ 
echo "Invalid Username/Sitename<br/>"; 
} 

else if($pass[0]=="1") 

{ 

echo "Please go back and check your Domain or Password or you can<br/>"; 
echo "<a href='/mods/request.php'>Do a password Request</a><br/>"; 
} 
else{ 

$var = time(); 
$ses = md5($var); 
$ses = substr($ses,0,-22); 
$ses = base64_encode($ses); 
 $ses = substr($ses,0,-6); 
    $exptime = time() + (30 * 60);  
$ses = mysql_real_escape_string($ses); 
$uownerid = $body->uniqueid_nick($name,$subdomain); 

$ses = "$ses$la"; 
$del = mysql_query("DELETE FROM user_sessions WHERE exptime < '".$var."'"); 
    $check = DB::FetchArray(DB::Query("SELECT COUNT(*) FROM `user_sessions` WHERE `ownerid`='".$uownerid."'")); 
            if($check[0]==1) 
            { 
            //insert 
                $res2 = DB::Query("INSERT INTO `user_sessions` SET `ses`='{$ses}', `ownerid`='".$uownerid."', `exptime`='{$exptime}'") or die(mysql_error()); 
         
            }else{ 
                //UPDATE 
                $res3 = DB::Query("UPDATE `user_sessions` SET `ses`='{$ses}', `exptime`='{$exptime}' WHERE `ownerid`='".$uownerid."'") or die(mysql_error());                         
            } 

echo "+ Login Successfully,  you will be redirected..."; 
echo "<a href='/editor/index.php?s=$ses'>here</a><br/>"; 
$body->redirect('3','../editor/index.php', $ses); 
} 

} 

break; 

default: 

echo "$active[trans1]<br/>"; 
$la = substr("$ses", 10, 2); 

$body->login_page($active[trans2],$active[trans3],$active[trans4],$la); 

break; 

} 
$body->div_open(center); 

echo "<a href='/index.php?s=$ses'>[ Home ]</a><br/>"; 

$body->div_close(); 

$body->div_open(style_footer); 
$body->page_foot(); 
$body->div_close(); 
$body->html_foot();     
?>
subzero Super moderator Fellow · 3,954 posts #2

This is why ...

if(empty($name)){  

echo "+ Name Required!<br/>";  

}else if(empty($pwd)){  

echo "+ Password Required!<br/>";  
}  
else{ 

Replace

if(empty($_REQUEST[name])){  

echo "+ Name Required!<br/>";  

}else if(empty($_REQUEST[pwd])){  

echo "+ Password Required!<br/>";  
}  
else{ 

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close