yep, i planned on doing somthing like that.. i think eriksmoen was just using what he's got for an example.

Thanks alot for your input! Right now just have to make sure the file gets into the database...

Thank-you.

    is there somthing in mysql that doesn't like the $image var??

    i am getting this error
    You have an error in your SQL syntax near '©©B%-?£²³´µ¶·‹T@A9YYUÁ=PªÇ©5 ±¸ÎÏÐÑÒ‚LCØÙÚÚ)$GÆÈª% Óåæçè’ÛëìÙ6Gá©7 é÷ø' at line 1
    for this query
    $query = "INSERT INTO files VALUES ('$name','$image')";

    Thanks

      Try

      $query = "INSERT INTO table (column_name_1,column_name_2) VALUES ('$column_value_1','$column_value_2')";
      

        then i get

        You have an error in your SQL syntax near ''img_name', 'img_image') VALUES ('50183.gif','GIF89a,d' at line 1
        for the query
        $query = "INSERT INTO files('img_name', 'img_image') VALUES ('$name','$image')";

          what is img_image supposed to contain? you cant start the actual file in an SQL database... you can store refrences to it, the image, if being called locally, still has to be on your server somewhere.

            if im following the script right, then it should be, and at the point of step two i can see it in the directory, then it disapears when the script moves to step 3

              it won't let me view the sorce, don't know why but it's hidden?
              I don't have any scripts or settings changed on my server or personal computer...??

                7 days later

                sorry it took so long to reply... the school made us reformat after the semester, so i had to set up everything again...

                anyhow, "unlink" in step 3 removes the file from the temporary directory

                  5 months later

                  Further to the earlier discussion about using the unix date as the file name, you could make it a little neater by using the original file name with a number, like doc.txt, doc1.txt, doc2.txt etc.

                  Code:

                  				if(file_exists($directory.$original_filename))
                  {	    $path_bits=pathinfo($original_filename);	$name=basename($original_filename,".".$path_bits['extension']);	while(file_exists($directory.$name.$x.".".$path_bits['extension']))
                  {
                  	$x++;
                  }		$final_filename=$name.$x.".".$path_bits['extension'];
                  }
                  
                  This is th code I used for my image upload bit: [url]http://www.astronomyforbeginners.com/yourimages/submitimage.php[/url]
                  
                    Write a Reply...