Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: php script has wrong link
01-11-2013, 06:51 PM #1
- Join Date
- Oct 2012
- Thanked 0 Times in 0 Posts
php script has wrong link
Hi, I am hoping someone can help me with a line of code I think is wrong.
Basically I have a script and when users signup they have one last step. That is to activate there account by clicking on a link that is sent to them in an email.
Now everything else works.
But the link appears to be joined up here is my example. Lets say a user has signed up and there name is mark and they have said there website address is "www.makeup.com"
I need them to click on the link which will take them to the active.php page
Email looks like below.
Hello mark,<BR>Get ready to start getting the hits you deserve. Now here is your login info
<BR><BR>username: computing<BR>password: computing<BR><BR><B>The next step is to click on this link to activate your account:
<a href=http://www.makeup.comactivate.php?username=mark>CLICK HERE</a></b>
Just look at the link above you can see it is wrong because there is nothing to separate the URL from the activate.php
The code line I think is wrong is this below.
"<B>The next step is to click on this link to activate your account: <a href=".$siteUrl."activate.php?username=".$signup[username].">CLICK HERE</a></b>";
01-12-2013, 04:32 AM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,660 Times in 2,629 Posts
It needs some work. The line that you have there for the code isn't setting up a valid attribute, but the bigger problem is its simply missing the /.
Would give you what you want. The markup itself isn't very good, but browsers should understand it.PHP Code:
'<B>The next step is to click on this link to activate your account: <a href="'.$siteUrl.'/activate.php?username=' .$signup['username'].'">CLICK HERE</a></b>';