Jump to content

Registration activation


zombie_002

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.
Link to comment
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 ????
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.