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

Link to comment
Share on other sites

How many is "all"? If we are talking about the thousands or hundreds (Or heck, even the tens), more than anything, the fault is the client and not yours. Does your client have an email that blocks mails it receives or filters them in a way?

Link to comment
Share on other sites

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

 

 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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

 

 

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.