Jump to content


Photo

uploading and viewing.


  • Please log in to reply
3 replies to this topic

#1 cle13

cle13
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 17 August 2006 - 05:14 AM

Hello people. Could anyone help me with code for uploading documents to a database and viewing them after uploading them? I would like to include a part in my site where people upload cvs and they are able to view them after uploading. Thanx.

#2 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 17 August 2006 - 06:36 AM

I dont understand 100%. Are you asking for someone to provide you with pre-written code, or are you asking for assistance on a script your are currently working on? I hope it's the latter, if not, post in our freelancing forum or check out a site like hotscripts.com or something.

#3 cle13

cle13
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 17 August 2006 - 07:45 AM

The code Im using is here.

Uloading
function upload()
{
$upload="<br><center><strong>Upload Your Curriculum Vitae</strong>
<hr color=gray><br>
<form action=?process=upload  method=post enctype=multipart/form-data name=uploadform> 
      <input type=hidden name=MAX_FILE_SIZE value=2000000>
      <input name=userfile type=file id=userfile><br><br> 
      <input name=upload type=submit value=Upload style='border:solid 1 gray;'>
</form></center>";
return $upload;
}
viewing

function upload()
{
$upload="<br><center><strong>Upload Your Curriculum Vitae</strong>
<hr color=gray><br>
<form action=?process=upload  method=post enctype=multipart/form-data name=uploadform> 
      <input type=hidden name=MAX_FILE_SIZE value=2000000>
      <input name=userfile type=file id=userfile><br><br> 
      <input name=upload type=submit value=Upload style='border:solid 1 gray;'>
</form></center>";
return $upload;
}


#4 ScottRiley

ScottRiley
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 17 August 2006 - 08:06 AM

You posted your upload function twice, instead of your upload and viewing functions.

Don't the properties of a form need to be in inverted commas? i.e. <form name=upload> should be <form name="upload">?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users