samnping Posted July 31, 2008 Share Posted July 31, 2008 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 More sharing options...
trq Posted July 31, 2008 Share Posted July 31, 2008 Seams you have magic_quotes_gpc enabled. Simply use addslashes() to remove the slashes. Link to comment https://forums.phpfreaks.com/topic/117625-url-as-an-form-input/#findComment-605004 Share on other sites More sharing options...
samnping Posted August 1, 2008 Author Share Posted August 1, 2008 Thanks! That really helped to remove the "\" I used http://us3.php.net/manual/en/function.stripcslashes.php stripcslashes to remove the slashes... 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.