|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Random password via email
hi can someone help me bout the random password i dnt it really heres my code in core.php
Code:
$rform = "<small>$errl</small><br/><br/>"; $rform .= "$ue UserID: <input name=\"tfuid\" format=\"*x\" maxlength=\"15\"/><br/>"; $rform .= "$pe Password: <input type=\"password\" name=\"tfpwd\" format=\"*m\" maxlength=\"30\"/><br/>"; $rform .= "$ce Password: <input type=\"password\" name=\"tfcpw\" format=\"*m\" maxlength=\"30\"/><br/>"; $rform .= "Birthday: <input name=\"tfbdy\" format=\"NNNN\-NN\-NN\"/><br/>"; $rform .= "Sex:"; $rform .= "<select name=\"opsex\" value=\"M\">"; $rform .= "<option value=\"M\">Male</option>"; $rform .= "<option value=\"F\">Female</option>"; $rform .= "</select><br/>"; $rform .= "Charater type:"; $rform .= "<select name=\"opchar\" value=\"M\">"; $rform .= "<option value=\"M\">Swordsman-Pow</option>"; $rform .= "<option value=\"F\">Shaman-Pow</option>"; $rform .= "<option value=\"A\">Brawler-Pow</option>"; $rform .= "<option value=\"B\">Archer-Pow</option>"; $rform .= "<option value=\"c\">Swordsman-Int</option>"; $rform .= "<option value=\"D\">Shaman-Int</option>"; $rform .= "<option value=\"E\">Brawler-Int</option>"; $rform .= "<option value=\"N\">Archer-Int</option>"; $rform .= "<option value=\"G\">Swordsman-Dex</option>"; $rform .= "<option value=\"H\">Shaman-Dex</option>"; $rform .= "<option value=\"I\">Brawler-Dex</option>"; $rform .= "<option value=\"J\">Archer-Dex</option>"; $rform .= "</select><br/>"; $rform .= "Email: <input name=\"temail\" maxlength=\"85\"/><br/>"; $rform .= "Location: <input name=\"tfloc\" maxlength=\"100\"/><br/>"; $rform .= "Mobile no +639: <input name=\"tmno\" format=\"NNNNNNNNNNN\"/><br/>"; $rform .= "<anchor>Register"; $rform .= "<go href=\"register.php\" method=\"post\">"; $rform .= "<postfield name=\"uid\" value=\"$(tfuid)\"/>"; $rform .= "<postfield name=\"pwd\" value=\"$(tfpwd)\"/>"; $rform .= "<postfield name=\"cpw\" value=\"$(tfcpw)\"/>"; $rform .= "<postfield name=\"bdy\" value=\"$(tfbdy)\"/>"; $rform .= "<postfield name=\"usx\" value=\"$(opsex)\"/>"; $rform .= "<postfield name=\"char\" value=\"$(opchar)\"/>"; $rform .= "<postfield name=\"mail\" value=\"$(temail)\"/>"; $rform .= "<postfield name=\"ulc\" value=\"$(tfloc)\"/>"; $rform .= "<postfield name=\"mno\" value=\"$(tmno)\"/>"; $rform .= "</go></anchor>"; return $rform; and now my register.php Code:
<?php
////////////////////////////////////////////////////
/*
*/
//////////////////////////////////////////////////////////
header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-store, no-cache, must-revalidate");
print "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"(URL address blocked: See forum rules)\">";
?>
<wml>
<?php
$uid = $_POST["uid"];
$pwd = $_POST["pwd"];
$cpw = $_POST["cpw"];
include ("config.php");
include ("core.php");
connectdb();
$brws = explode(" ",$HTTP_USER_AGENT);
$ubr = $brws[0];
echo "<card id=\"Registration\" title=\"Cryptic World\">\n";
$ipr = getip();
$uip = explode(".",$ipr);
$bip[0] = '72.36.222.125';
$bip[1] = '64.92.167.26';
$bip[1] = '209.9.228.194';
for($i=0;$i<count($bip);$i++)
{
if($ipr==$bip[$i])
{
echo "<p>";
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Registration for this IP range is disabled at the moment, please check later";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
}
if($uip[0]=="196"&&$uip[1]=="207")
{
$phone = "Nokia6100/1.0";
$phone2 = "MOT-V550/0E.66.0ER";
$phone3 = "Opera/8.52";
if($phone==$ubr||$phone2==$ubr||$phone3==$ubr)
{
echo "<p>";
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Registration for this IP range is disabled at the moment, please check later";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
}
if(!canreg())
{
echo "<p>";
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Registration for this IP range is disabled at the moment, please check later";
echo "</p>";
}else{
echo "<p>";
?>
<small>
<img src="images/point.gif" alt="!"/>
Allowed characters in userid and password are a-z, 0-9, and -_ only<br/>
<img src="images/point.gif" alt="!"/>
No vulgar words are accepted in UserID<br/>
<img src="images/point.gif" alt="!"/>
UserID and Password must contain at least 4 characters<br/>
<img src="images/point.gif" alt="!"/>
UserID must begin with a letter<br/>
<img src="images/point.gif" alt="!"/>
Birthday must be in this format YYYY-MM-DD<br/>
<img src="images/point.gif" alt="!"/>
Type your mobile number (SMART users)<br/><br/>
</small>
<?php
$tolog = false;
if(trim($uid)=="")
{
echo registerform(1);
}else if(trim($pwd)=="")
{
echo registerform(2);
}else if(trim($cpw)=="")
{
echo registerform(3);
}else if(spacesin($uid)||scharin($uid))
{
echo registerform(4);
}else if(spacesin($pwd)||scharin($pwd))
{
echo registerform(5);
}else if($pwd!=$cpw)
{
echo registerform(6);
}else if(strlen($uid)<4)
{
echo registerform(7);
}else if(strlen($pwd)<4)
{
echo registerform(8);
}else if(isdigitf($uid))
{
echo registerform(11);
}else if(checknick($uid)==1)
{
echo registerform(12);
}else if(checknick($uid)==2)
{
echo registerform(13);
}else if(register($uid,$pwd,$usx,$char,$bdy,$ulc,$mno,$mail, $ubr)==1)
{
echo registerform(9);
}else if(register($uid,$pwd,$usx,$char,$bdy,$ulc,$mno,$mail, $ubr)==2)
{
echo registerform(10);
}else{
//$brws = explode(" ",$HTTP_USER_AGENT);
//$ubr = $brws[0];
//$fp = fopen("gallery/info.txt","a+");
//fwrite ($fp, "\n".$uid."-".$pwd."-".$ipr."-".$ubr."\n");
//fclose($fp);
echo "Registration Completed Successfully!<br/>";
$tolog = true;
}
echo "</p>";
}
echo "<p align=\"center\">";
if($tolog)
{
echo "<a href=\"login.php?loguid=$uid&logpwd=$pwd&type=send\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Login</a>";
}else{
echo "<a href=\"index.php?type=send\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
}
echo "</p>";
echo "</card>";
?>
</wml>
|
|
#2
|
||||
|
||||
|
Hi denverporia19, welcome to Dev Shed.
I assume that you used a browser to write up this question - not a phone. Please don't ask questions in text speak - it is just annoying. So what exactly is the problem??? You have a few (server) variables that may require globalized (eg: $HTTP_USER_AGENT should be $_SERVER['HTTP_USER_AGENT'] to work with registered globals off). Please explain what you actual problem is... what part isn't working and what you are actually trying to achieve. TQ ![]()
__________________
Cheers, Jamie # mdb4u | mobile movie database] | Please help to test and promote # skiFFie | Home of the 'accessibility module' for Drupal # Jamie Burns [me] Accessibility Module [drupal] # guidelines | search | wap resources | not getting help | fold to cure __________________ Let the might of your compassion arise to bring a quick end to the flowing stream of the blood and tears ..... Please hear my anguished words of truth. ![]() __________________ |
|
#3
|
|||
|
|||
|
im using my pc not a phone.. can u help me bout the code to send the password to thier email add of the user after they finish registering
|
|
#4
|
||||
|
||||
|
So what happens exactly?
Have you modified the $_SERVER variables? Have you tried print_r($_POST) on the processing page to see what is actually coming from the form? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Mobile Programming > Random password via email |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|