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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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