Jump to content

zombie

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

zombie's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I've been following a tutorial on making a fairly simple login script. It's my first time really playing with php and sticking with it and so far so good. But I can't figure this one out. It's using a fairly simple email activation thing but the activation link isn't working. It echos that it was successful, but the database hasn't been updated at all. I double checked and the ID and activation code are both correct, but the 'group' is still set to 0. Help? <?php $title = "Account Activation"; require_once('header.php'); $id = $_GET['id']; $code = $_GET['code']; if ($id&&$code) { $check = mysql_query("SELECT * FROM users WHERE id='$id' AND actcode='$code'"); $checknum = mysql_num_rows($check); if ($checknum==1) { //activate the account $activate = mysql_query("UPDATE users SET group='1' WHERE id='$id'"); echo("Your account is activated. You may now log in."); require_once "footer.php"; } else echo("Invalid ID or activation code."); require_once "footer.php"; die(); } else echo("Data Missing!"); require_once "footer.php"; die(); require_once "footer.php"; ?>
×
×
  • 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.