Jump to content

paulgc34

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

paulgc34's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body>
  2. heres the code: [color=red]<?php[/color] 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"); } } header("Location: http://www.escortlobby.com/"); [color=red]?>[/color]
  3. I'm getting this error: Warning: Cannot modify header information - headers already sent by (output started at /home/paulgc34/public_html/uploadphotos.php:6) in /home/paulgc34/public_html/uploadphotos.php on line 259
  4. I'm adding the: header("Location: http://www.escortlobby.com/"); line to the code but it doesnt seem to be doing anything.
  5. How would I use the header() method. Can anyone show me what the code would be. I cant get the print messages method to work.
  6. using this code for image uploads: <form action="" method="post" enctype="multipart/form-data"> <input type="file" name="pictures[]"/> <input type="file" name="pictures[]"/> <input type="file" name="pictures[]"/> <input type="submit" value="Send Photos >>"/> </form> <?php 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"); } } ?> How do I print a "successful" message to the browser when it's done uploading and is there a way to dispay a "UPLOADING" MESSAGE WHILE IT'S IN PROGRESS?
  7. I want my visitors to be able to upload multiple image files. the script I'm using is: <form action="" method="post" enctype="multipart/form-data"> <input type="file" name="pictures[]" /> <input type="file" name="pictures[]" /> <input type="file" name="pictures[]" /> <input type="submit" value="Send" /> </p> </form> <?php 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"); } } ?> When I goto the form this error is displayed at the bottom: [font=Verdana][color=red]Warning: Invalid argument supplied for foreach() in /home/...[/color][/font]  using this script the files do upload successfuly and after uploading the files just once the error then goes away. what do I need to do to rid the error when you first goto the page?
  8. I'm want a form with text input with multiple image uploads with the results sent to my email. Can anyone point me to a source for this. Thanks. :-\
×
×
  • 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.