masgas Posted October 15, 2006 Share Posted October 15, 2006 hi...I've got a forum where you need to confirm your registration. I send an html email to the user with a code which he has to return. He does that by clicking on a submit button of form which is part of the email. Some how, when I click send, the script that has to run the confirmation in the server runs ok, but I don't get the variable sent from the form in the mail. Is there any normal limitation to receiving variables from mails?this is the script that processes the form data:<?php$con = mysql_connect("host","","") or die ("No con");@mysql_select_db("fsoa", $con) or die ("no db");//this lines I placed to check wether I get anything from the mail, and nothing happens just prints "HI"//$randpass = $_GET['randpass'];//echo $randpass;//echo "<br />HI";//echo $_GET['randpass'];if (!$randpass){ header ("Location: error_conf_reg.php"); exit; }else { $sql = "UPDATE usu_reg SET randpass = '' WHERE randpass = '$randpass'"; header ("Location: reg_confirmd.php"); exit;}?>THANKS Quote Link to comment Share on other sites More sharing options...
Orio Posted October 15, 2006 Share Posted October 15, 2006 1) Why did you make the line $randpass = $_GET['randpass'] to a comment?2) If uncommenting that line doesnt help, can you show the HTML of the mail?Orio. Quote Link to comment Share on other sites More sharing options...
masgas Posted October 15, 2006 Author Share Posted October 15, 2006 :D :DWOW!I had some major errors! one of them was that I had not changed dreamweaver's form field name and of course I wasn't getting any variable with the name of randpass :( once I psichologically overcame this error :) I rewrote the code like this and it worked:else { $sql = "UPDATE usu_regis SET randpass = FALSE WHERE randpass = '$randpass'"; mysql_query ($sql) or die (mysql_error ($con)); if ($sql){ header ("Location: registro_confirmd.php"); exit;}}THANKS A LOT FOR YOUR HELP Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.