Jump to content


Photo

Registration activation


  • Please log in to reply
2 replies to this topic

#1 zombie_002

zombie_002
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 26 September 2006 - 10:34 PM

Hi, I am starting a new website with php (DUH" lets not state the obvious here") and when someone comes to register on my website it says thank you for registering and you will recieve and email with 24 hours. my wife tried and i tried with 3 different email accounts (yahoo, hotmail, and vcn.com) and none of them recieved any emails back at all for registering on my website. Could someone please help me figure this out. The only that has been installed from the begining is phpnuke7.9 and 1 new theme. I would appreciate anyone's help thank you.

#2 AdRock

AdRock
  • Members
  • PipPipPip
  • Advanced Member
  • 911 posts

Posted 26 September 2006 - 10:49 PM

Have a look at this tutorial

http://www.phpfreaks...orials/40/0.php

It's a members system that sends an activation emial
If your topic has been solved, please mark the topic as SOLVED.

This helps others from identifying which topics need help still

#3 zombie_002

zombie_002
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 26 September 2006 - 10:50 PM

I was looking through your forums and found this

<?php

// connect to database
$conn = mysql_connect("localhost","www2","accuoffice");

//select the database
$db = mysql_select_db("accu") or die( "Unable to select database");

// Create variables from URL.

$userid = $_GET['id'];
$code = $_GET['code'];

$query = "SELECT * FROM users WHERE userid='$userid' AND password='$code' LIMIT 1";
$result = mysql_query($query) or die("There's some problem with the query.");
$row = mysql_fetch_assoc($result);

if (!$row)
{
echo "<strong><font color=red>Your account could not be activated!</font></strong>";
}
elseif ($row['activated'] == 0)
{
echo "<strong>Your account has been activated!</strong> You may login below!<br />";
}
else
{
mysql_query("UPDATE users SET activated='1' WHERE userid='$userid' AND password='$code'");
    echo "<strong>Your account has been activated!</strong> You may login below!<br />";
}

?>


was just wondering if that would work, for registering and activating a user. if it would work how do i use it ????




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users