GET and POST in one form?
Posted: Sun Apr 12, 2009 6:40 pm
I need to use GET and POST by either having two forms or one form using GET and POST both in it.
I have this code:
<form enctype="multipart/form-data" action="upload.php" method="POST">
Please choose a file: <input name="uploaded" type="file" /><br />
<input type="submit" value="Upload" /><input name="name" value="
<?php
$name = $_GET["name"];
echo $name
?>" type="hidden">
</form><br><br>
<?php
$name = $_GET["name"];
echo "Thanks for using File Fetchers, $name!";
?>
I need to get $name to upload.php using GET, but I need the file to be uploaded to upload.php
What can I do?
Thanks,
Alex
I have this code:
<form enctype="multipart/form-data" action="upload.php" method="POST">
Please choose a file: <input name="uploaded" type="file" /><br />
<input type="submit" value="Upload" /><input name="name" value="
<?php
$name = $_GET["name"];
echo $name
?>" type="hidden">
</form><br><br>
<?php
$name = $_GET["name"];
echo "Thanks for using File Fetchers, $name!";
?>
I need to get $name to upload.php using GET, but I need the file to be uploaded to upload.php
What can I do?
Thanks,
Alex