runnerjp Posted April 17, 2007 Author Share Posted April 17, 2007 ah yer...durr lol ... i will try this out in abit just of to lecture.... hope ur on cos uv been big big help Link to comment https://forums.phpfreaks.com/topic/47227-solved-emailing-users-when-signing-up/page/2/#findComment-231180 Share on other sites More sharing options...
runnerjp Posted April 17, 2007 Author Share Posted April 17, 2007 ok still not working lol $message="<a href='www.runnerselite.com/include/reg_success.inc.php?login=".$login."&password=".$password."&enabled=yes'>Please click to confirm</a>"; this is message that is sent then this is the success page ( all of it!!) <?php include("require/config.php"); $connection = @mysql_connect("$db_host", "$db_user", "$db_pass") or die("Couldn't connect."); $db = @mysql_select_db($db_name, $connection) or die("Couldn't select database."); if(isset($_GET["username"])) { $login=$_GET["login"]; $password=$_GET["password"]; $enabled=$_GET["yes"]; $res=mysql_query(update tblname set enabled='yes' where login='$login') } ?> now the membership area is under the table membership ( does that needed to be added into the connect part and if so how??) also the table names are login = thats the user name bit password = thats the users password enabled= thats the users yes or no part hopefully all that info might help u help me more lol Link to comment https://forums.phpfreaks.com/topic/47227-solved-emailing-users-when-signing-up/page/2/#findComment-231291 Share on other sites More sharing options...
suzzane2020 Posted April 17, 2007 Share Posted April 17, 2007 okie seems u have not gt the concept rite yet. no p-robs. heres hw when u use if(isset($_GET["username"])) the "username" or watever it is thts there inside the brackets shud be one of the parameters u sent ie in the link <a href='www.runnerselite.com/include/reg_success.inc.php?login=".$login."&password=".$password."&enabled=yes'>Please click to confirm</a>"; u have login=".$login."&password=".$password."&enabled=yes' so the values u can use to check in the bracket are either "login","password" or "enabled" ie the names that u assign for the parameters. so we are checkin if any one of these parameters are sent thru GET method so the code shud be if(isset($_GET["login"])) or password or enabled Link to comment https://forums.phpfreaks.com/topic/47227-solved-emailing-users-when-signing-up/page/2/#findComment-231311 Share on other sites More sharing options...
runnerjp Posted April 17, 2007 Author Share Posted April 17, 2007 lol still stuck i thought i have done it by duing this if(isset($_GET["username"])) { $login=$_GET["login"]; $password=$_GET["password"]; $enabled=$_GET["enabled"]; $res=mysql_query(update tblname set enabled='yes' where login='$login') } or do u mean if(isset($_GET["password"])) { $login=$_GET["login"]; $password=$_GET["password"]; $enabled=$_GET["enabled"]; if(isset($_GET["password"])) { $login=$_GET["password"]; $password=$_GET["password"]; $enabled=$_GET["enabled"]; if(isset($_GET["password"])) { $login=$_GET["enabled"]; $password=$_GET["password"]; $enabled=$_GET["enabled"]; $res=mysql_query(update tblname set enabled='yes' where login='$login') } is that right :S rlly sorry so confuzing lol Link to comment https://forums.phpfreaks.com/topic/47227-solved-emailing-users-when-signing-up/page/2/#findComment-231322 Share on other sites More sharing options...
suzzane2020 Posted April 17, 2007 Share Posted April 17, 2007 if(isset($_GET["password"])) { $login=$_GET["login"]; $password=$_GET["password"]; $enabled=$_GET["enabled"]; } use just this.dnt have to repeat u can use "login" or enabled" instead of password. any one of the parameter names passed Link to comment https://forums.phpfreaks.com/topic/47227-solved-emailing-users-when-signing-up/page/2/#findComment-231326 Share on other sites More sharing options...
runnerjp Posted April 17, 2007 Author Share Posted April 17, 2007 Parse error: syntax error, unexpected T_STRING in /home/runnerse/public_html/include/reg_success.inc.php on line 15 is what i get now thats 4 $res=mysql_query(update tblname set enabled='yes' where login='$login') Link to comment https://forums.phpfreaks.com/topic/47227-solved-emailing-users-when-signing-up/page/2/#findComment-231336 Share on other sites More sharing options...
suzzane2020 Posted April 17, 2007 Share Posted April 17, 2007 The query shud be in quotes $res=mysql_query("update tblname set enabled='yes' where login='$login' "); Link to comment https://forums.phpfreaks.com/topic/47227-solved-emailing-users-when-signing-up/page/2/#findComment-231341 Share on other sites More sharing options...
suzzane2020 Posted April 17, 2007 Share Posted April 17, 2007 and the tblname wud be the actual name of ur table in te databse where u have the username and passwords stored Link to comment https://forums.phpfreaks.com/topic/47227-solved-emailing-users-when-signing-up/page/2/#findComment-231343 Share on other sites More sharing options...
runnerjp Posted April 17, 2007 Author Share Posted April 17, 2007 ok i did a tester and we r gttin closer... or shud i say mostly u lol 'www.runnerselite.com/include/reg_success.inc.php?login=123&password=&enabled=yes' thats what i got... as u see i am missing the password bit :S Link to comment https://forums.phpfreaks.com/topic/47227-solved-emailing-users-when-signing-up/page/2/#findComment-231351 Share on other sites More sharing options...
suzzane2020 Posted April 17, 2007 Share Posted April 17, 2007 its fine if u dnt have the password or infact better since it is confidential. we can leave out the password since the username is anyways unique and we wud be using tht to update our query so no probs just remove the password bit from the link an d proceed and also since we are nt usin the password rem0ve it from the reg_success page Link to comment https://forums.phpfreaks.com/topic/47227-solved-emailing-users-when-signing-up/page/2/#findComment-231353 Share on other sites More sharing options...
runnerjp Posted April 17, 2007 Author Share Posted April 17, 2007 ahh ok thats gud then last few tweaks lol 1 when u say add table bit can i just have it like this $res=mysql_query("update members set enabled='yes' where login='$login' "); and also the link does not show up as a link in the email <a href='www.runnerselite.com/include/reg_success.inc.php?login=123&password=&enabled=yes'>Please click to confirm</a>http://www.runnerselite.com ty for all this i ow u big time¬! Link to comment https://forums.phpfreaks.com/topic/47227-solved-emailing-users-when-signing-up/page/2/#findComment-231357 Share on other sites More sharing options...
suzzane2020 Posted April 17, 2007 Share Posted April 17, 2007 for the table part it shud be the same table u insert the values at first and for the link try it in other emails too like gmail,yahoo usually yahoo has a probs in showin links ori guess it gmail.. im nt sure had come across this same prob before Link to comment https://forums.phpfreaks.com/topic/47227-solved-emailing-users-when-signing-up/page/2/#findComment-231358 Share on other sites More sharing options...
runnerjp Posted April 17, 2007 Author Share Posted April 17, 2007 ok did it all clicked link and it never actually changed the enable to yes :S Link to comment https://forums.phpfreaks.com/topic/47227-solved-emailing-users-when-signing-up/page/2/#findComment-231367 Share on other sites More sharing options...
runnerjp Posted April 17, 2007 Author Share Posted April 17, 2007 this is every thing up to date!!! $message="<a href='http://www.runnerselite.com/include/reg_success.inc.php?login=".$login."&enabled=yes'>Please click to confirm</a>"; this is the link sent in the email upon registration.... when a user is registered it starts with enabled="no" after the linked is clicked they are sent to this page <?php $connection = @mysql_connect("localhost", "MYUSERNAME", "MYPASSWORD") or die("Couldn't connect."); $db = @mysql_select_db(runnerse_profiles) or die("Couldn't select database."); if(isset($_GET["login"])) { $login=$_GET["login"]; $password=$_GET["password"]; $enabled=$_GET["enabled"]; } $res=mysql_query("update $tbl_members set enabled='yes' where login='$login' "); ?> it send you to the page yhet does not enable the person :S how comes? Link to comment https://forums.phpfreaks.com/topic/47227-solved-emailing-users-when-signing-up/page/2/#findComment-231380 Share on other sites More sharing options...
suzzane2020 Posted April 18, 2007 Share Posted April 18, 2007 ok cool we have reached till here if(isset($_GET["login"])) { $login=$_GET["login"]; $password=$_GET["password"]; $enabled=$_GET["enabled"]; } we can take out the password from here since its nt sent thru the link so it becomes if(isset($_GET["login"])) { $login=$_GET["login"]; $enabled=$_GET["enabled"]; } after this once the user comes to this page try echoin all the values to see if we got them echo $login; if yes then check the table to see if the login name has been entered initially Link to comment https://forums.phpfreaks.com/topic/47227-solved-emailing-users-when-signing-up/page/2/#findComment-232016 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.