Inserting YouTube embed link
Posted 01 October 2006 - 07:18 PM
The issue is all the quotes. . .I'm not sure how to deal with them. Manually, I would just use \ to handle the internal quotes.
Here is an example: <object width="425" height="350"><param name="movie" value="http://www.youtube.c...></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.c.../v/gZ5Weo7Gqws" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
I want users to be able to insert these with a form, but when I try to pull them out of the db with PHP, I don't know how to deal with all the quotes.
Posted 01 October 2006 - 07:30 PM
mysql_real_escape_string ( $tube_html_data );
Then you don't have to worry about the quotes! But I would not insert all that html, I would only insert the unique data, then fill a generic html object template with that data!
Posted 01 October 2006 - 07:35 PM
As such, I guess I need to escape everything so the PHP can read it, then 'unescape' everything when it is written in as HTML. Not sure how this can be done. . .
Thanks for your quick response.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users