Jump to content

[SOLVED] emailing users when signing up


runnerjp

Recommended Posts

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

 

okie  seems u have not gt the concept rite yet. no p-robs. :P

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

 

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

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

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¬!

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

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?

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

 

 

 

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.