Mobile Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreMobile Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 10th, 2007, 10:59 AM
denverporia19 denverporia19 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2007
Posts: 4 denverporia19 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 25 m 26 sec
Reputation Power: 0
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>

Reply With Quote
  #2  
Old March 10th, 2007, 06:46 PM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Click here for more information.
 
Join Date: Feb 2002
Location: Finland
Posts: 8,912 jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 3 Months 4 Weeks 1 Day 13 h 6 m 50 sec
Reputation Power: 1693
Send a message via ICQ to jabba_29 Send a message via AIM to jabba_29 Send a message via MSN to jabba_29 Send a message via Yahoo to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
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.



__________________

Reply With Quote
  #3  
Old March 12th, 2007, 06:18 AM
denverporia19 denverporia19 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2007
Posts: 4 denverporia19 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 25 m 26 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old March 12th, 2007, 06:54 AM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Click here for more information.
 
Join Date: Feb 2002
Location: Finland
Posts: 8,912 jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 3 Months 4 Weeks 1 Day 13 h 6 m 50 sec
Reputation Power: 1693
Send a message via ICQ to jabba_29 Send a message via AIM to jabba_29 Send a message via MSN to jabba_29 Send a message via Yahoo to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
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?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreMobile Programming > Random password via email


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT