robert_gsfame Posted October 6, 2009 Share Posted October 6, 2009 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?? Quote Link to comment Share on other sites More sharing options...
PugJr Posted October 6, 2009 Share Posted October 6, 2009 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. Quote Link to comment Share on other sites More sharing options...
robert_gsfame Posted October 6, 2009 Author Share Posted October 6, 2009 thx, i'm still trying to find out what is actually the problem. The code is correct and all of my users never have this kind of problem except for one user... Quote Link to comment Share on other sites More sharing options...
PugJr Posted October 6, 2009 Share Posted October 6, 2009 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? Quote Link to comment Share on other sites More sharing options...
robert_gsfame Posted October 6, 2009 Author Share Posted October 6, 2009 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.. Quote Link to comment Share on other sites More sharing options...
PugJr Posted October 6, 2009 Share Posted October 6, 2009 Did you check $table1 if his confirmationcode even exists? Quote Link to comment Share on other sites More sharing options...
robert_gsfame Posted October 6, 2009 Author Share Posted October 6, 2009 yeah it exists..like what i told u before that i've tried myself and no problem at all.. Do u have any clue on this, what can make this happen??? Quote Link to comment Share on other sites More sharing options...
PugJr Posted October 6, 2009 Share Posted October 6, 2009 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. Quote Link to comment Share on other sites More sharing options...
robert_gsfame Posted October 6, 2009 Author Share Posted October 6, 2009 thx for your help anyway....i've checked everything n nothing was missing Quote Link to comment Share on other sites More sharing options...
redarrow Posted October 6, 2009 Share Posted October 6, 2009 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... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.