hi again. i have a script that sends an email to the admin about a new registration from a form. this registration gets 0 in the field in the database called confirm.
what i want to do is this. that on the email the admin receives, there should be a link to activate the new user i.e. updates the database table putting 1 on the confirm field. what i have now is this.
on the email that the admin receives.
//Send email to admin
$headers = "Content-Type: text/html";
mail ("admin@mysite.com", "Account activation", "<b>New Registration:</b>
<br><p>
<b>$name $surname</b> requested registration.<br><p>
<p>To activate this account click
<a href=http://www.mysite.com/activate.php?username=$user>here</a></p>",$headers);
then the activate.php is:
$db_host = 'xxx';
$db_user = 'xxx';
$db_pass = 'xxx';
$db_name = 'xxx';
$db_table = 'xxxxx';
$conn = mysql_connect($db_host,$db_user,$db_pass);
mysql_select_db($db_name,$conn);
$result = mysql_query ("UPDATE table SET confirm = '1'
WHERE username='$user'
",$conn);
what happens now admin gets the email but when he tries to click the link, he gets a blank page and the database is not updated! any help? thanks