passwrd through email (xhmtl), for login
Started on the old forum in January 2010 · view the original in the archive · old links redirect here
TL;DR · summary of 27 replies
- Anyone can code for me??
- Create uses table now if don't know pm me
- manavworld: Where z code for code verification?
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
sharil wrote: can somebody give the code for register using email...once the user have register, the passwrd will go to the email... i need in html version..thanx... need your help guys..;(
go to a mobile site xhtml an get the source page if you dont need php
iengioi!
comando wrote: go to a mobile site xhtml an get the source page if you dont need php
typical noob coder if u dnt have the code just leave it
Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code
NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH
Oh is that what u wona do after registratiion ur password and username get to send to ur email i have that code i dnt have one where u get a password thru email without typing an email in
here are the code i have so it must be at bottom of the page just put it underneath
echo "<i>Registration completed successfully!</i> Now you are a proud member in <u>$stitle!</u><br/><br/><b>Bookmark next page</b> for auto login <br/>";
$tolog = true;
}
echo "</p>";
}
this part come up to the end of the page
echo "<p align=\"center\">";
if($tolog)
{
$msg = "\n Username: ".$uid." \n Password: ".$pwd." \n\n http://Retrivewap.co.za is a nice friendly chat community we are glad to hav u with us :o) pls feel free to bring ya m8s along \n\n Thank You\n";
$subj = "Registration details for Retrivewap.co.za";
$headers = 'From: noemail@retrivewap.co.za' . "\r\n" .
'Reply-To: noreply@retrivewap.co.za' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($email, $subj, $msg, $headers);
echo "<a href=\"login.php?loguid=$uid&logpwd=$pwd\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Login</a>";
}else{
echo "<a href=\"index.php\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code
NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH
sharil wrote: not working
try with this
<?php
$ec=mysql_query(SELECT COUNT(*) FROM table WHERE email='$email_variable';
if($ec>0)
{
$exist=true;
}
else
{
$exist=false;
}
?>
well, this long code was just to clear what you have to do. only thing important is query.
Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in
echo "an email has been sent to $_POST[email] with an activation pasword. please check your mail to complete the registration.";
##send activation email
$to = $POST[email];
$subject = "yoursite.com registration";
$message = "welcome to our website!\r\r you/ or avoid this mail if someone else using your email. your registration completed at mysite.com. you can complete registration by clicking the following link:
\rhttp://www.mysite.com/verify.php?$activationkey\r\rlf ,ignor this email if this registration not completed by you, we wil remove you from our malling list.\r\rRegards,\mysite.com team";
$headers = 'From:
no-reply@mysite.com'."\r\n"
'Reply to:
no-reply@mysite.com'."\r\n".
'X-maler: PHP/'
phpversion ();
mail($to, $subject, $message, $headers);
,, you have need to create verify.php and table for this, verify.php
<?php
mysql_connect("localhost",DATABASE, "PASWORD")
or die(mysql_error());
mysql_select_db
("USER_TABLENAME")
or die(mysql_error());
if ($_POST['form_submitted'] == '1')
{
##user is registerd, insert data until;
we can active it,
$activationkey = mt_rand() . mt_rand() . mt_rand() . mt_rand() . mt_rand() .
$sql="INTERT INTO users(username, password, email, activationkey, status)
VALUES
('$_POST[username]','$_POST[password]','$_POST[email]','activationkey','verify')
if (!mysql_query($spl))
{
die('Error: '. mysql_error());
}
} else {
}
?>
##user isn't registerd? Chnge activation key to null, for succes activation
$querystring = $_SERVER['QUERY_STRING'];
$query = "SELECT * FROM users",
$result = mysql_query($query) or die(mysql_erropq());
while($row = mysql_fetch_array($result))
{
if ($_querystring ==$row["activationkey"])
{
echo "Congratulations!" . $row["username"] ."is now the proud new user of mysite.com.";
$sql="UPDATE users SET activationkey = "status='activationkey' WHERE(id = $row[id])"
if (!mysql_query($sql))
{
die('Error: ' . mysql_error());
}
}
}
dont copy paste, its post by my ph0ne..
manavworld, thanks for your code..but what i meant is after a user register with one email, for example ab@gmail.com, he or she cannot reg with that email anymore.He or she need to reg with new email.
-PeaCe-
