Hello,
In my PHP script I am making a link for the user to follow which is sent out by e-mail. It contains some of their information. I make the link using:
hereHowever, when it comes to a space which was entered into the name field it gets confused as it is suposted to have a + where the spaces are.
Could someone please help me make it add + inpace of spaces.
Thanks
BBeenn
Comments
Otherwise you have to use the htmlentities function that is build in in php, just check out the syntax at http://www.php.net/manual/en/function.htmlentities.php
hope I unterstood your problem right
best regards,
sebastian mohrenstecher
executive secretary
net::allies
www.net-allies.de
info@net-allies.de
I think you understood me. Looking at the like you gave it lookes like it should make it work, however it doesn't change anything. I have tried spaces, , , etc and it changes none of them.
The line to make the variable is:
$clickhere2 = htmlentities("http://www.mysite.com/mail/news/subscribeconf.php?address=$address&username=$username&version=$version");
To make the link I use:
here
What comes out the the e-mail that is sent out is:
here
As you can see it does not change the spaces.
If you or anyone else could help, that would be great.
Thanks
: In my PHP script I am making a link for the user to follow which is sent out by e-mail. It contains some of their information. I make the link using:
:
: here
:
: However, when it comes to a space which was entered into the name field it gets confused as it is suposted to have a + where the spaces are.
: Could someone please help me make it add + inpace of spaces.
: Thanks
: BBeenn
:
Hi,
Have you tried using ereg_replace?
$variableURL = "address=$address&username=$username&version=$version";
$withpluses = ereg_replace(" ","+",$variableURL);
$finalAddress = "here";
Hope this helps.
Jeff
It sounds to me like you want to make use of the PHP function, "urlencode".
You can find the syntax at http://www.zend.com/manual/function.urlencode.php.