Reply to Processing in an array?

Processing in an array? new!
by Tim Gavin, 16 years, 11 months ago
My form is for a newsletter script that will have many articles on it, with each article having an image. The number of articles is determined by the user.

EXAMPLE
// process the form
for($i=1; $i<=count($_POST['art_headline']); $i++){
  $headline = strip_tags($_POST['art_headline']);
  $article = strip_tags($_POST['article']);
  $art_img = $_FILES['art_img'];
  $sql = mysql_query("INSERT INTO articles (art_headline, art_txt, art_img) VALUES ('{$art_headline[$i]}','{$art_txt[$i]}','{$art_img[$i}')") or die(mysql_error());
}

<form method="post" enctype="multipart/form-data">
headline: <input type="text" name="art_headline[]" />
article: <textarea name="art_text[]"></textarea>
image: <input type="file" name="art_img[]" />
</form>


How would I go about using the upload class to process the form, plus get its name and insert it into the db?Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important