Jump to content

lutrella@gmail.com

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

lutrella@gmail.com's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I was wondering could i add a progress bar or stat bar for the file upload to this code below? ftp form: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .style4 {font-size: x-small} .style6 {font-size: xx-small} .style7 {font-size: x-small; color: #000000; } --> </style> </head> <body> <code> <form enctype="multipart/form-data" action="upload.php" method="post"> <p><br> <input type="hidden" name="MAX_FILE_SIZE" value="2000000000000" /> <br> Send this file:</p> <p> <input name="userfile" type="file" /> </p> <p><br> <input type="submit" value="Send File" /> <br> </p> </form></code> --> </body> </html> the php file: <?php // In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead // of $_FILES. In PHP versions earlier than 4.0.3, use copy() and // is_uploaded_file() instead of move_uploaded_file. $ftp_server = "tttt"; $ftp_user = "ttt"; $ftp_pass = "tt"; // set up a connection or die $conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server"); // try to login if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) { echo "Connected as $ftp_user@$ftp_server\n"; } else { echo "Couldn't connect as $ftp_user\n"; } $remote_file = $_FILES['userfile']['name'];; //I used these for debugging echo $_FILES['userfile']['name']; echo "<br>"; echo $_FILES['userfile']['type']; echo "<br>"; echo $_FILES['userfile']['size']; echo "<br>"; echo $_FILES['userfile']['tmp_name']; echo "<br>"; echo $_FILES['userfile']['error']; echo "<br>"; //v important this one as you have to use the tmp_file created for the actual upload $file = $_FILES['userfile']['tmp_name']; if (ftp_put($conn_id, $remote_file, $file, FTP_BINARY)) { echo "successfully uploaded $file\n"; } else { echo "There was a problem while uploading $file\n"; } // close the connection ftp_close($conn_id); ?> could i add a progress bar or stat bar for the file upload to this code below?
  2. Is there anyway to add a staus bar or precentage stat, to let the user see the upload status?
  3. okay i will! I get this error message after the file has uploaded: Connected as test@test.com White River Outdoors Business Card.jpg image/jpeg 338120 /tmp/phpyCWAfm 0 successfully uploaded /tmp/phpyCWAfm
  4. I didnt see anything about file size limits set of execution time_out set.
  5. well! when i'm uploading its to a go daddy server account. my site is on go daddy.com.
  6. Ftp Form help-- when the file uploads to the server, it doesnt upload the full file to the server? When it uploads a 1mb file only uploads 330k! the form is the code below in a file named = ftpupload.htm : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <code> <form enctype="multipart/form-data" action="upload.php" method="post"> <p><br> <input type="hidden" name="MAX_FILE_SIZE" value="200000000" /> <br> Send this file:</p> <p> <input name="userfile" type="file" /> </p> <p><br> <input type="submit" value="Send File" /> <br> </p> </form></code> </body> </html> the php is the code below in a file named = upload.php : <?php // In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead // of $_FILES. In PHP versions earlier than 4.0.3, use copy() and // is_uploaded_file() instead of move_uploaded_file. $ftp_server = "mysite.com"; $ftp_user = "name"; $ftp_pass = "pass"; // set up a connection or die $conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server"); // try to login if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) { echo "Connected as $ftp_user@$ftp_server\n"; } else { echo "Couldn't connect as $ftp_user\n"; } $remote_file = $_FILES['userfile']['name'];; //I used these for debugging echo $_FILES['userfile']['name']; echo "<br>"; echo $_FILES['userfile']['type']; echo "<br>"; echo $_FILES['userfile']['size']; echo "<br>"; echo $_FILES['userfile']['tmp_name']; echo "<br>"; echo $_FILES['userfile']['error']; echo "<br>"; //v important this one as you have to use the tmp_file created for the actual upload $file = $_FILES['userfile']['tmp_name']; if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) { echo "successfully uploaded $file\n"; } else { echo "There was a problem while uploading $file\n"; } // close the connection ftp_close($conn_id); ?> thanks!
  7. I have a flash form which all of the fields are sending correctly through the php code. The flash radio buttons I added with the groupname == topic, doesnt send with the rest of the information that is being sent to the email. My question is how do I get the flash radio button info to submit with the rest of the form. The code for the send button on my flash file: on (release) { // send variables in form movieclip (the textfields) // to email PHP page which will send the mail form.loadVariables("form.php", "POST"); } =============================================== =============================================== Form.php: <?php $to = "Contactus@test.com"; $subject = "Contact Page Information for Today"; $headers = "From: " . $_POST["name"]; $headers .= "<" . $_POST["email"] . ">rn"; $headers .= "Reply-To: " . $_POST["email"] . "rn"; $headers .= "Return-Path: " . $_POST["email"]; $message .= "nn"; $message .= "Subject: " . $_POST["topic"] . "rn"; $message .= "Email: " . $_POST["email"] . "rn"; $message .= "Name: " . $_POST["name"] . "rn"; $message .= "Address: " . $_POST["address"] . "rn"; $message .= "City: " . $_POST["city"] . "rn"; $message .= "State: " . $_POST["state"] . "rn"; $message .= "Zip Code: " . $_POST["zip"] . "rn"; $message .= "Phone: " . $_POST["phone"] . "rnn"; $message .= "Message: " . $_POST["message"] . "rn"; mail($to, $subject, $message, $headers); ?>
×
×
  • 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.