Jump to content

Archived

This topic is now archived and is closed to further replies.

masgas

email form variable

Recommended Posts

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

Share this post


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

Share this post


Link to post
Share on other sites
:D :D

WOW!

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

Share this post


Link to post
Share on other sites

×

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.