View previous topic :: View next topic |
Author |
Message |
mythix -
Joined: 13 Jun 2002 Posts: 20 Location: UK - Frome
|
Posted: Mon May 26, 2003 10:55 pm Post subject: php file upload functions |
|
|
Hi,
I am writing a PHP script to upload images and am testing it locally on my machine with Abyss.
The following is currently at the top of the script, so I could see if the file was uploading properly. The thing is, it NEVER prints 'moo'!!!
Code: | if ($uploadedfile) {
echo "moo";
} |
Here is the form
Code: | <form action="uploadimage.php" method="post" enctype="multipart/form-data">
<table width="100%" border="0" cellpadding="2" cellspacing="0" class="txt">
<tr valign="top">
<td>File:</td>
<td><input name="uploadedfile" type="file" class="txtform"></td>
</tr>
<tr>
<td> </td>
<td><input name="textid" type="hidden" id="textid" value="<?=$HTTP_GET_VARS[textid]?>">
<input name="submit" type="submit" class="txtform" id="submit" value="Submit"></td>
</tr>
</table>
</form> |
is there somthing wrong with my code, or does Abyss not support this, or os there a CGI environment variable I need to set for this to work???
Thanks |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed May 28, 2003 1:08 am Post subject: Re: php file upload functions |
|
|
mythix wrote: | Hi,
I am writing a PHP script to upload images and am testing it locally on my machine with Abyss.
The following is currently at the top of the script, so I could see if the file was uploading properly. The thing is, it NEVER prints 'moo'!!!
Code: | if ($uploadedfile) {
echo "moo";
} |
Here is the form
Code: | <form action="uploadimage.php" method="post" enctype="multipart/form-data">
<table width="100%" border="0" cellpadding="2" cellspacing="0" class="txt">
<tr valign="top">
<td>File:</td>
<td><input name="uploadedfile" type="file" class="txtform"></td>
</tr>
<tr>
<td> </td>
<td><input name="textid" type="hidden" id="textid" value="<?=$HTTP_GET_VARS[textid]?>">
<input name="submit" type="submit" class="txtform" id="submit" value="Submit"></td>
</tr>
</table>
</form> |
is there somthing wrong with my code, or does Abyss not support this, or os there a CGI environment variable I need to set for this to work???
Thanks |
This is a PHP coding problem. Use $_REQUEST['uploadedfile'] instead of just $uploadedfile. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
mythix -
Joined: 13 Jun 2002 Posts: 20 Location: UK - Frome
|
Posted: Wed May 28, 2003 8:12 pm Post subject: |
|
|
Thanks!!! |
|
Back to top |
|
|
|