Jump to content

snakez

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

snakez's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I already checked the database and it works fine. The files are in correct situation in the table... By the way all of those files are having the same ID number("ex. 00001") and if a form will be viewed with an ID number for example "00001" then all of them will be displayed... And i already made them displayed in correct sequence using an array... perhaps the only problem here i think is how to linked them in a correct file or sequence...
  2. Guys i need your help again pls... Just refer the code below and this is my explanation: Firstly the user can upload as many files as he want, then that uploaded files will be saved to the database after submit button was clicked. After that, a form will appear with the lists of the files uploaded(displayed in filenames only with links on each of them). If the user clicks to a particular filename, the file associated with that filename will be downloaded by the user. Ex. List of Files 1. First.doc 2. Second.txt 3. three.jpeg 4. four.gif Now, base on the example above, if i click the first.doc, the first.doc will be downloaded. but when i click others, still the first.doc will be downloaded. What should i do with my code below so that it will download the correct file that i clicked? By the way, the uploaded files was saved in an array. [code] <?php for($i=0;$i<count($_GET['id']);$i++){ $id=$_GET['id']; $filename=$_GET['filename']; $filetype=$_GET['filetype']; $filesize=$_GET['filesize']; $filecontent=$_GET['filecontent']; if (isset($id)) {         include "include/opendb.php";         $query="SELECT $filename,$filetype,$filesize,$filecontent FROM fileuploads WHERE tracking='$id'";         $result=mysql_query($query) or Die("Error locating file for tracking Number: ".$id." ".mysql_error());         list($addfileName,$addfileType,$addfileSize,$addcontent)=mysql_fetch_array($result);         header("Content-Disposition: attachment; filename=$addfileName");         header("Content-length: $addfileSize");         header("Content-type: $addfileType");         echo $addcontent;         exit; } } ?> [/code]
  3. Woohh... that was great guyz, thank you so much for the help...  :)
  4. Ey im just a newbie to php/mysql... i just like to ask a question regarding the sample queries below if i can assign/store a single (PHP)variable to all of it and how to do it. Insert Into Mytable1(fname,lname) values('nick','smith') Insert Into Mytable2(ProdID,ProdName) values('01','PC') Insert Into Mytable3(ORno,Date) values('01','01/01/01')
×
×
  • 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.