Jump to content


Photo

FTP Upload w/ Form


  • Please log in to reply
3 replies to this topic

#1 marcus

marcus
  • Members
  • PipPipPip
  • Advanced Member
  • 1,842 posts
  • LocationRochester, NY

Posted 14 October 2006 - 05:16 PM

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:

<?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>


#2 Stooney

Stooney
  • Members
  • PipPipPip
  • Advanced Member
  • 1,093 posts
  • LocationLas Cruces, NM

Posted 14 October 2006 - 05:29 PM

As far as uploading files goes, I highly suggest reading this.  http://us3.php.net/f...res.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

<embed src='.wav' autostart='true' loop='false'
width='2' height='0'>
</embed>
i found that ERMMMMM thats called PHP!!!!


#3 marcus

marcus
  • Members
  • PipPipPip
  • Advanced Member
  • 1,842 posts
  • LocationRochester, NY

Posted 14 October 2006 - 05:31 PM

like it submits information about the file being submitted and what not

#4 Stooney

Stooney
  • Members
  • PipPipPip
  • Advanced Member
  • 1,093 posts
  • LocationLas Cruces, NM

Posted 14 October 2006 - 05:36 PM

well like i said, a simple mysql query can have whatever you want in the db, in there.  (gotta have a database of course) 

<embed src='.wav' autostart='true' loop='false'
width='2' height='0'>
</embed>
i found that ERMMMMM thats called PHP!!!!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users