Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-11-2013, 06:51 PM   PM User | #1
nigel12
New to the CF scene

 
Join Date: Oct 2012
Location: Birmingham
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
nigel12 is an unknown quantity at this point
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>";
nigel12 is offline   Reply With Quote
Old 01-12-2013, 04:32 AM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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 /.
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>'
Would give you what you want. The markup itself isn't very good, but browsers should understand it.
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Tags
link, php

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:30 PM.


Advertisement
Log in to turn off these ads.