Jump to content

email form variable


masgas

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
Link to comment
https://forums.phpfreaks.com/topic/24001-email-form-variable/
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
Link to comment
https://forums.phpfreaks.com/topic/24001-email-form-variable/#findComment-109043
Share on other sites

Archived

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

×
×
  • 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.