Jump to content

Archived

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

zombie_002

Registration activation

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Have a look at this tutorial

http://www.phpfreaks.com/tutorials/40/0.php

It's a members system that sends an activation emial

Share this post


Link to post
Share on other sites
I was looking through your forums and found this

[quote]<?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 />";
}

?>[/quote]

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

Share this post


Link to post
Share on other sites

×

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.