Jump to content

FTP Upload w/ Form


marcus

Recommended Posts

Ok, I have like no experience using the ftp upload using php. So.. I was wondering if it would be possible to upload to a certain folder from where the user specifies the category (which would be the folder) and would also submit it into a db

i have this:

[code]
<?php $date = date("F j, Y"); ?>
Art Section... Coming Soon!
<br><br>
<form action="?page=art" method="post" name="art">
<table border=0 cellspacing=0 cellpadding=3>
<tr><td>
Name:<td><input type=text name=name value=''>
<tr><td>
Username:<td><input type=text name=neoname value=''>
<tr><td>
Picture:<td><input type=file name=pic value=''>
<tr><td>
Description:<td><textarea name=desc cols=30 rows=7></textarea>
<tr><td>
Date:<td><input type=text name=date value='<?=$date ?>' readonly>
<tr><td>
Category:<td><select name=cat>
<option value=1>CATID#1</option>
<option value=2>CATID#2</option>
</select>
<tr><td>
Drawing Tools:<td><input type=checkbox value='1'>Pencil and Paper<br><input type=checkbox value='2'>Paint Shop Pro<br><input type=checkbox value='3'>Photoshop<br><input type=checkbox value='4'>Other
<tr><td>
If Other:<td><input type=text name=other value=''>
<tr><td colspan=2><input type=submit value='Submit' name=submit><input type=reset value='Reset'>
</form>
</table>
[/code]
Link to comment
Share on other sites

As far as uploading files goes, I highly suggest reading this.  http://us3.php.net/features.file-upload
Its has everything you need to know for uploading the files.

Not quite sure what you meant by 'submit it into a db', im assuming you want the users data (name, etc) in the db.  Thats just a simple mysql query (ex. "insert into users (name, email, age) values ('$name', '$email', '$age')").  Hope it helps
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.