Jump to content

Change form data before I store it


refiking

Recommended Posts

I am working on allowing my users to paste a code snippet from You Tube on my site and store it as their "viedopic".  I already have the "videopic" coded.  What I need help with is changing the code they input before I store it to fit my parameters.  For example, here is a snippet of code from a You Tube video:

 

<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/CoiFGva_JoY&rel=0&color1=0x5d1719&color2=0xcd311b&border=0"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/CoiFGva_JoY&rel=0&color1=0x5d1719&color2=0xcd311b&border=0" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>

 

I'd like to change to make the following changes on the fly (before I add it to the db):

 

1) Change width to 400

2) Change height to 400

3) Replace everything from the "&" to the quotes with this:

 

&autoplay=1&rel=0&color1="black"&color2="black"

 

Link to comment
https://forums.phpfreaks.com/topic/87505-change-form-data-before-i-store-it/
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.