note 70090 rejected from features.file-upload by bobby

From: Date: Mon, 02 Oct 2006 21:45:23 +0000
Subject: note 70090 rejected from features.file-upload by bobby
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-117969@lists.php.net to get a copy of this message
Note Submitter: timi80 at hotmail dot com ---- i have done whatever had told and could upload the files.. but my problem is i have to put the file names on mysql to recall them when the page will be shown... my codes: <?php if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $data = addslashes(fread(fopen($pictures, "r"),filesize($pictures))); $insertSQL = sprintf("INSERT INTO info (category, parag_01_00, parag_01_01, .... aciklama, dosya_adi, boyut, resimdata, dosyatip) VALUES (%s, %s, .... % s, '$pictures_name','$pictures_name','$pictures_size', '$pictures_data','$pictures_type')", //bu kisimlar anlasilacagi gibi form bilgilerini aliyor GetSQLValueString($_POST['category'], "text"), GetSQLValueString($_POST['parag_01_00'], "text"), GetSQLValueString($_POST['parag_01_01'], "text"), .... ... ... GetSQLValueString($_POST['pictures'], "text")); mysql_select_db($database_tf, $tf); $Result1 = mysql_query($insertSQL, $tf) or die(mysql_error()); } foreach ($_FILES["pictures"]["error"] as $key => $error) { if ($error == UPLOAD_ERR_OK) { $tmp_name = $_FILES["pictures"]["tmp_name"][$key]; $name = $_FILES["pictures"]["name"][$key]; move_uploaded_file($tmp_name, "data/$name"); } } ?> /////////////////////////////////////// <form action="<?php echo $editFormAction; ?>" method="POST" enctype="multipart/form-data" name="form1"> .. <td>Picture</td> <td><input type="file" name="pictures[]" /> <input type="file" name="pictures[]" /> <input type="file" name="pictures[]" /> <input type="submit" value="Send" /> </td> </tr> <input type="submit" name="Submit" value="SUBMIT"> </div></td></tr> how can i add the file names of uploaded files to use them in the page=???

« previous php.notes (#117969) next »