Jump to content

Archived

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

marcus

FTP Upload w/ Form

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]

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
like it submits information about the file being submitted and what not

Share this post


Link to post
Share on other sites
well like i said, a simple mysql query can have whatever you want in the db, in there.  (gotta have a database of course) 

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.