Jump to content

Confirmation problem, really confusing


robert_gsfame

Recommended Posts

this is the problem: i have a confirmation link to be sent to their email address once users have registered themselves.

 

<html>

</head>

 

<body onLoad=window.refresh>

<?

include('configuration.php');

 

 

$pass=$_GET['pass'];

 

$table="not_member";

 

$sql="SELECT * FROM $table WHERE confirmationcode ='$pass'";

$mysql=mysql_query($sql);

 

 

if($mysql){

 

 

$letcountrow=mysql_num_rows($mysql);

 

 

if($letcountrow==1){

 

$findrows=mysql_fetch_array($mysql);

$data1=$findrows['data1'];

$data2=$findrows['data2'];

 

 

$table2="members_registered";

 

$sql2="INSERT INTO $table2(data1,data2)VALUES('$data1l', '$data2')";

$mysql2=mysql_query($sql2);

}else {

 

echo "ERROR";

}

 

if($mysql2){

 

echo "Yeah, you're registered";

 

$sql3="DELETE FROM $table1 WHERE confirmationcode = '$pass'";

$mysql3=mysql_query($sql3);

 

}

}

?>

</body>

</html>

 

What i want to ask : sometimes i've found that a confirmation link didn't do like what written on the script...and only blank page appear. No INSERT and DELETE happen <==Nothing was happened

 

What is wrong with the script?? :confused:

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/176651-confirmation-problem-really-confusing/
Share on other sites

You said sometimes a confirmation link didn't work. Now my experience in PHP is that something always works or never works.

 

It could be possible that your server is having lag issues and is dropping to send the email or something along that lines. But if its a query thats failing add "or mysql_error();" to find out whats wrong as far as the mysql goes.

i have more or less 500 members.... one of them tell me that he has problem in activating his account together with his confirmation link, then i checked it out and tried to click on the link and i find only blank page shown up...

 

later i tried to register myself and i found that everything is okay including the confirmation link...I tried his confirmation link again and still only blank page that shown up..

 

 

Well, through my logical conclusion, I think there must be a problem in the database. If that code works with everyone else, something in the database must not work for your code such as missing data.

 

Check everything in your DB that is related to that code and to that users account. Make sure everything is matching as it should be. If that doesn't help any, I don't know what else to say but I'm sure someone else more knowledgeable will come around.

 

Firstly (here we go,, php is not meant for sending loads of emails to people you should implement a mailing list program to independently send emails.

 

secondly looking at your code, you got no error information on the query's...

 

or die(mysql_error()); <<<< help to determine why it lagging out...

 

 

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.