PDA

View Full Version : I Need Some Php Help


punkguitar412
04-26-2003, 02:20 AM
ho do i make it so it submits the movie to a specfic page(c i want it to be all auto) and make it so u can only sub mit swf?


<form enctype="multipart/form-data" action="_URL_" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="30000">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>
theres the code what do i edit

Phantom
04-26-2003, 04:29 AM
If I understand your question and the code you put down, you want "userfile" to be submitted to another page? Well, I'd do it by

<form action=file.php>

And in file.php

echo $_GET['userfile'];

That is, if I understand what you're asking - which most of the time I get mixed up in my head...

Ökii
04-26-2003, 08:56 AM
you'd either want to change the action of the form element through javascript...

document.formname.action = 'pagename.php';

or send it to itself (useful for included form scripts as you'd have access to the other page variables including a ref id) - often the best option.

action="<?php echo $_SERVER['REQUEST_URI']; ?>"

or add a hidden form element containing a reference for use on the receiving page

<input type="hidden" name="ref" value="swf234" />

note:
since php4.1 you'd have to use
$_FILES['element_name']['tmp_name']
$_FILES['element_name']['name']
$_FILES['element_name']['size']
$_FILES['element_name']['type']
on the receiving page.

Mhtml
04-26-2003, 05:53 PM
Please make sure that you assig your threads a more descriptive name. That rule is covered in the posting guidelines which you should have already read... If not it can be found here: http://www.codingforums.com/postguide.htm

Lamper
07-01-2004, 06:46 PM
If I understand your question and the code you put down, you want "userfile" to be submitted to another page? Well, I'd do it by

<form action=file.php>

And in file.php

echo $_GET['userfile'];

That is, if I understand what you're asking - which most of the time I get mixed up in my head...

I think you mean

echo $_POST['userfile'];