Page 1 of 1

Registration: User Activation & Running script online

Posted: Sun Apr 27, 2014 11:32 am
by salrathor1
Hey guys, I hope you're all doing well.

I have two problems.

1. I've followed the tutorials for creating a registration/login system with the activation codes. It all seems to work fine but when I enter the activation code it doesn't seem to delete the row in the `user_activations` table.

2. I tried to run my register/login script online via bluehost and when I submit the page turns blank.

Any ideas?

Thanks.

user.inc.php

//activates the account related to given code.
function activate_account($aid) {
	$aid = mysql_real_escape_string($aid);
	
	mysql_query("DELETE FROM `user_activations` WHERE `activation_code` = '{$aid}'");

activate.php
<?php

include('/core/init.inc.php');


if (isset($_GET['$aid'])) {
	activate_account($_GET['aid']);
}

?>


<p>

	Your account has been activated, you can now <a href="login.php"> log in</a>
</p>

Re: Registration: User Activation & Running script online

Posted: Sun Jun 28, 2015 8:15 pm
by Temor
This reply is way late, but for future reference:

If your MySQL queries return null, or won't do what you want them to, try echoing mysql_error()
like so:
[syntax=php]echo mysql_error();[/syntax]