...

View Full Version : How to use #



elitis
11-01-2010, 07:16 AM
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:


<form>
<input type="text" name="decallink" value="Decal Link" />
<input type="submit" value="Submit" />
</form>


The Video Embed 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?

djh101
11-01-2010, 11:16 AM
<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).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum