Hi,
I have an PHP form that has a field that I enter HTML code in. The form sends the HTML content of that field to a PHP script that uses the print command to show the HTML code on the screen.
The code that appears on the screen looks fine, but it adds my current browser path before it in the link.
Here's an example.
I have a field on the php form that has the variable "minfo" by way of name="minfo". That field is used to enter HTML code just like this:
"<a href="http://www.disney.com/">Disney</a>"
Then on "submit" the content of that filed (minfo) is sent to the php script and then I "print" it to the screen with the following command:
print('Site Link: '.$_POST['minfo']);
[By the way, I also send this to a MYSQL database, and that works just fine. And, I use $_POST (rather than $minfo) because register_globals is set to off.]
It appears on the screen just as it should, and it goes into the database just fine.
However, when I click on the link on the screen, it has the url of the script directory immediately preceeding the disney link. So, it looks like this:
http://www.mydomainhere.com/thesites/\"http://www.disney.com/\"
I suppose this has to do with the quotes (") in the url...
How can I fix this? I will be pasting large sections of code into that field, and I will not be able to go through it all and put "\" with the quotes.
Please help...thanks.
B-truE