passwrd through email (xhmtl), for login

Started on the old forum in January 2010 · view the original in the archive · old links redirect here

27 replies · 1,791 views · started 16 years ago · 1 min read

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.

10 participants
sharil Junior · 44 posts #1

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..;(

-PeaCe-

comando Developer · 68 posts #2

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!

riderz Lead · 975 posts #3

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

sharil Junior · 44 posts #4

hello riderz... that why i need your help guyz... i try used wml code but when i reg using my email, the passwrd are not send to my email..

-PeaCe-

riderz Lead · 975 posts #5

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 Junior · 44 posts #6

i will try it..

-PeaCe-

sharil Junior · 44 posts #7

i have try using your code and the passwrd has been send to my email... but, i got blank passwrd... how make a random pass?

-PeaCe-

sharil Junior · 44 posts #8

i have found the error... anyway, thanks for your help...

-PeaCe-

sharil Junior · 44 posts #9

riderz, do you how to make 1 user for 1 email only?

-PeaCe-

morency Senior · 488 posts #10

search in db if is any user signed up with that email

Unamos los corazones,hoy todos somos multicolores!

sharil Junior · 44 posts #11

N0, what i meant is, after user is register with that email, he or she cann0t register with that email anym0re.. They have to used new email to reg..

-PeaCe-

revenge Junior · 12 posts #12

lolz i code it by myself but no useful for Indian coz so many indian dont have email id so how he get his password if he/she registered so i removd it from my site

Erro occured when error file create

djlee Developer · 224 posts #13

set the email field in your users table to unique

kei_ki7 Senior · 431 posts #14

try to use COUNT in your database

Did I help you? You can help me too Your donations will help me finance my studies.

ksg91 Developer · 162 posts #16

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

sharil Junior · 44 posts #17

anyone can help?

-PeaCe-

revenge Junior · 12 posts #18

yes i can help u pm me for code

Erro occured when error file create

manavworld Developer · 118 posts #19
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..

sharil Junior · 44 posts #20

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-

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