Jump to content

Archived

This topic is now archived and is closed to further replies.

brown2005

Uploading image to directory on my website

Recommended Posts

Hi i have the form below:-

<table width="100%" border="0" cellpadding="0" cellspacing="0" class="form">
<form name="contact" action="buy_confirm.php" method="post">
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td align="right" width="40%" class="text">Name:&nbsp;&nbsp;</td><td align="left" width="60%">&nbsp;&nbsp;<input type="text" class="text" name="name" size="35"></td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td align="right" width="40%" class="text">Email:&nbsp;&nbsp;</td><td align="left" width="60%">&nbsp;&nbsp;<input type="text" class="text" name="email" size="35"></td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td align="right" width="40%" class="text">Image:&nbsp;&nbsp;</td><td align="left" width="60%">&nbsp;&nbsp;<input type="file" class="text" name="image" size="35"></td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td align="right" width="40%" class="text">Website:&nbsp;&nbsp;</td><td align="left" width="60%">&nbsp;&nbsp;<input type="text" class="text" name="website" size="35">&nbsp;( without the [a href=\"http://www\" target=\"_blank\"]http://www[/a]. )</td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td align="right" width="40%" class="text">Message Box:&nbsp;&nbsp;</td><td align="left" width="60%">&nbsp;&nbsp;<input type="text" class="text" name="message" size="35" maxlength="100">&nbsp;( 100 characters )</td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td align="right" width="40%" class="text">Price:&nbsp;&nbsp;</td><td align="left" width="60%">&nbsp;&nbsp;£100</td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td align="center" valign="top" colspan="2"><input class="text" type="submit" name="submit" value="Submit">&nbsp;&nbsp;&nbsp;&nbsp;<input class="text" type="reset" name="reset" value="Reset"></td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
</form>
</table>

what i want to do is once they click submit i want the image to be uploaded onto my website in a folder called images.

can any one help please?

Share this post


Link to post
Share on other sites
Please refer to the numerous tutorials on this site regarding file uploads, or look in the manual, there is several pages devoted to file uploads.

[a href=\"http://www.php.net/manual/en/features.file-upload.php\" target=\"_blank\"]http://www.php.net/manual/en/features.file-upload.php[/a]
[a href=\"http://www.phpfreaks.com/tutorials/36/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/36/0.php[/a]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.