Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-01-2010, 06:16 AM   PM User | #1
elitis
Regular Coder

 
Join Date: Sep 2010
Posts: 319
Thanks: 9
Thanked 6 Times in 6 Posts
elitis is an unknown quantity at this point
How to use #

Maybe I should be a little more specific. Ok so this is what I'm doing: I'm trying to embed any video entered into a form on my site.

The form:
Code:
<form>
<input type="text" name="decallink" value="Decal Link" />
<input type="submit" value="Submit" />
</form>
The Video Embed Code
Code:
<div>
  <object
    type="video/avi"
    data="#"
    width="100%"
    height="100%">
    <param name="video" value="#">
  </object>
</div>

So say I entered http://www.youtube.com/watch?v=cSNVQzLMIIs as a link in the form. How would I get '#' in the video embed code (data and param) to change into http://www.youtube.com/watch?v=cSNVQzLMIIs?
elitis is offline   Reply With Quote
Old 11-01-2010, 10:16 AM   PM User | #2
djh101
Regular Coder

 
djh101's Avatar
 
Join Date: May 2009
Location: Santa Clarita
Posts: 603
Thanks: 48
Thanked 63 Times in 63 Posts
djh101 is an unknown quantity at this point
PHP Code:
 <object
    type="video/avi"
    data="<?php echo $_POST['formInputName']; ?>"
    width="100%"
    height="100%">
$_POST[''] is a PHP command that grabs the data from your submitted form and turns it into a variable. Although server side scripting is usually used to retrieve form data, you could also use a client side language (e.g. Javascript) if you are just inserting the data into your HTML and not using it anywhere on the server side (e.g. submitting it to a database).
__________________
"Yeah science!"
Online Science Tools
djh101 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 06:32 AM.


Advertisement
Log in to turn off these ads.