Go Back   Free website templates > Web Template Help > PHP and MySQL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Join now to share free website templates or post on the forum. If you have never been on a forum before read the FAQ. It's quick, easy and free to join!
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-18-2009, 03:44 PM
vareside's Avatar
Senior Member
 
Join Date: Jul 2007
Posts: 254
vareside is on a distinguished road
Default PHP Form Input Filtering

Howdy,

I just have a small problem on one of my latest, small projects (EYC). We have the following situation: User enters a page, sees a form, pastes the Embed Code into a <textarea> and clicks on the "Proceed" button. Now: how can I filter out a specific part from the embed code?

Example - this is the embed code the user enters/pastes in:
Code:
<object width="800" height="440"><param name="movie" value="http://www.megavideo.com/v/Z12IQXAL46215bbe9383"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.megavideo.com/v/Z12IQXAL46215bbe9383" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="800" height="440"></embed></object>
Now I want to fetch ONLY
http://www.megavideo.com/v/Z12IQXAL46215bbe9383
from the code. BUT the embed codes may variee on positions like width, height etc. How can I filter out the part between <param name="movie" value=" and "></param> or src=" " ?

I'd be very thankful for every single suggestion.
Reply With Quote
  #2 (permalink)  
Old 11-19-2009, 03:04 AM
bmcoll3278's Avatar
Senior Member
 
Join Date: Jun 2009
Posts: 303
bmcoll3278 is on a distinguished road
Default

need more info.

you want to read the form input into a var and then pull the url from that string. and display just the url?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:18 AM.



mouseover mouseover mouseover