Jump to content

PHP registering problem (sorry for posting this again)


nikes

Recommended Posts

When i push register on the signup.php file, it gives me this:

 

Not found your email in our databaseCannot send Confirmation link to your e-mail address

 

What's wrong? ???

 

signup.php

 

 

<head>
<title>Noboredem::Registration</title>
</head>
<meta name="keywords" content="Social, chat, meet, friends, hangout, noboredem, fourm, profiles, teens, online networking" />

<meta name="description" content="Noboredem is a social networking website where you can make a profile, chat with friends, or make new friends!" />
<body>
<div align="center">

  <p align="center"><img src="http://graphamation.com/Noboredem/Noboredem%20logo%20regular.jpg" width="500" height="148" /></p>

  <p align="center"> </p>
  <p><h1 align="center">Register</h1>
  <table width="350" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><form name="form1" method="post" action="signup_ac.php">
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="76">username</td>
<td width="3">:</td>
<td width="305"><input name="username" type="text" id="name" size="30"></td>
</tr>
<tr>
<td width="76">gender(type either male or female)</td>
<td width="3">:</td>
<td width="305"><input name="gender" type="text" id="gender" size="30" ></td>
</tr>
<tr>
<td width="76">birthdate *MUST BE 14 YEARS-OLD OR OLDER(MM/DD/YYYY)</td>
<td width="3">:</td>
<td width="305"><input name="birthdate" type="text" id="birthdate" size="30" ></td>
</tr>
<tr>
<td>E-mail</td>
<td>:</td>
<td><input name="email" type="text" id="email" size="30"></td>
</tr>
<tr>
<td>password</td>
<td>:</td>
<td><input name="password" type="password" id="password" size="30"></td>
</tr>
<tr>
<td>Country</td>
<td>:</td>
<td><input name="country" type="text" id="country" size="30"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Submit">  
<input type="reset" name="Reset" value="Reset"></td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>

 

signup_ac.php

<?php

include('config.php');

// table name
$tbl_name="temp_members_db";

// Random confirmation code
$confirm_code=md5(uniqid(rand()));
// values sent from form
$username=$_POST['username'];
$email=$_POST['email'];
$country=$_POST['country'];
// Insert data into database
$sql="INSERT INTO $tbl_temp_members_db(confirm_code, username, gender, birthdate, email, password, country)VALUES('$confirm_code', '$username', '$gender', '$birthdate, '$email', '$password', '$country')";
$result=mysql_query($sql);
// if suceesfully inserted data into database, send confirmation link to email
if($result){
// send e-mail to ...
$to=$email;
// Your subject
$subject="Your confirmation link here";
// From
$header="from: Noboredem <[email protected]>";
// Your message
$message="Your Comfirmation link \r\n";
$message.="Click on this link to activate your account \r\n";
$message.="http://www.noboredem.graphamation/confirmation.php?passkey=$confirm_code";
// send email
$sentmail = mail($to,$subject,$message,$header);
}

// if not found
else {
echo "Not found your email in our database";
}
// if your email succesfully sent
if($sentmail){
echo "Your Confirmation link Has Been Sent To Your Email Address.";
}
else {
echo "Cannot send Confirmation link to your e-mail address";
}

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.