Jump to content

URL as an Form Input


samnping

Recommended Posts

Hi, I have a form which would accept 2 fields. One of which is a URL. I am trying to save this URL to a text file and access it later. However when it is passed through the form, the URL is messed up.

 

From this:

<embed flashvars="autoplay=false&brand=embed" width="400" height="320" allowfullscreen="true" allowscriptaccess="always" src="http://www.ustream.tv/flash/live/252928" type="application/x-shockwave-flash" /><a href="http://www.ustream.tv/" style="padding:2px 0px 4px;width:400px;background:#FFFFFF;display:block;color:#000000;font-weight:normal;font-size:10px;text-decoration:underline;text-align:center;" target="_blank">Live video by Ustream</a>

 

 

To this:

 

<embed

flashvars=\"autoplay=false&brand=embed\"

width=\"400\" height=\"320\"

allowfullscreen=\"true\"

allowscriptaccess=\"always\"

src=\"http://www.ustream.tv/flash/live/252928\"

type=\"application/x-shockwave-flash\"

/><a

href=\"http://www.ustream.tv/\"

style=\"padding:2px 0px

4px;width:400px;background:#FFFFFF;display:block;color:#000000;font-weight:normal;font-size:10px;text-decoration:underline;text-align:center;\"

target=\"_blank\">Live video

by Ustream</a>

 

"\" are added and lines are broken, is there anywhere I could pass the URL as a String without it being torn down?

Please help... Thanks..

 

:'( ??? :'(

Link to comment
https://forums.phpfreaks.com/topic/117625-url-as-an-form-input/
Share on other sites

Thanks! That really helped to remove the "\"

I used http://us3.php.net/manual/en/function.stripcslashes.php stripcslashes to remove the slashes...

:D

 

 

But one problem still exist, see...

 

From this:

 

<embed flashvars="autoplay=false&brand=embed" width="400" height="320" allowfullscreen="true" allowscriptaccess="always" src="http://www.ustream.tv/flash/live/252928" type="application/x-shockwave-flash" /><a href="http://www.ustream.tv" style="padding:2px 0px 4px;width:300px;background:#FEEDB9;display:block;color:#000000;font-weight:normal;font-size:10px;text-decoration:underline;text-align:center;" target="_blank">

 

to this:

 

<embed

flashvars="autoplay=false&brand=embed"

width="400" height="320"

allowfullscreen="true"

allowscriptaccess="always"

src="http://www.ustream.tv/flash/live/252928"

type="application/x-shockwave-flash"

/><a

href="http://www.ustream.tv" style="padding:2px

0px

4px;width:300px;background:#FEEDB9;display:block;color:#000000;font-weight:normal;font-size:10px;text-decoration:underline;text-align:center;"

target="_blank">

 

The lines are appended to the next line... The spaces are converted to newlines... The processing php page refused to read it the way it should be, like a embedded link... ??? :-\

 

Would appreciate your help!

 

Link to comment
https://forums.phpfreaks.com/topic/117625-url-as-an-form-input/#findComment-605512
Share on other sites

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.