I made a form and had it working without error's till I added a upload option and tried to set up my action.php to work with it.
My Web Site Form Address
My Error when I submit form with upload selected
My uploadaction.php
Thanks for any help to resolve this issue.
GD13,
=]
My Web Site Form Address
My Error when I submit form with upload selected
Code:
?> [B]Warning[/B]: chmod() [[URL="http://www.prairiefireservices.com/function.chmod"][COLOR=#810081]function.chmod[/COLOR][/URL]]: No such file or directory in [B]/home/dragons/public_html/prairiefireservices/uploadaction.php[/B] on line [B]53[/B] [B]Warning[/B]: Cannot modify header information - headers already sent by (output started at /home/dragons/public_html/prairiefireservices/uploadaction.php:9) in [B]/home/dragons/public_html/prairiefireservices/uploadaction.php[/B] on line [B]74[/B] ?>
My uploadaction.php
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Thank You</title> <meta name="AUTHOR" content="GoldDraco13"> <meta name="KEYWORDS" content="fireplace, gas, wood, service, install, house, build"> <meta http-equiv="Page-Enter" content="blendTrans(Duration=1)"> <meta name="GENERATOR" content="Created by BlueVoda"> <style type="text/css"> div#container { width: 800px; position: relative; margin-top: 0px; margin-left: auto; margin-right: auto; text-align: left; } body { text-align: center; margin: 0; } </style> ?> </head> <body bgcolor="#FFFFFF" text="#000000"> <?php // Receiving variables @$email = addslashes($_POST['email']); @$upload_Name = $_FILES['upload']['name']; @$upload_Size = $_FILES['upload']['size']; @$upload_Temp = $_FILES['upload']['tmp_name']; // Validation for max file size if ($upload_Size>0) { if( $upload_Size >100000000) { //delete file unlink($upload_Temp); header("Location: error.html"); exit; } $uploadFile = "uploads/".$upload_Name ; @move_uploaded_file( $upload_Temp , $uploadFile); chmod($uploadFile, 0644); $upload_URL = "<A href="http://www.dragonsofpern3.com/uploads/".$upload_Name">http://www.dragonsofpern3.com/uploads/".$upload_Name ; } //Sending Email to form owner $mailto = "[EMAIL="dragons@dragonsofpern3.com"]dragons@dragonsofpern3.com[/EMAIL]"; $mailsubj = "PF Install Form"; $mailhead = "From: $email\n"; reset ($HTTP_POST_VARS); $mailbody = "Job Specs :\n"; while (list ($key, $val) = each ($HTTP_POST_VARS)) { if ($key!="submit") { $mailbody .= "$key : $val\n"; } } $mailbody .= "upload: $upload_URL\n"; mail($mailto, $mailsubj, $mailbody, $mailhead); header("Location: thankyou_page.html"); ?> ?> <div id="container"> <div id="bv_" style="position:absolute;left:0px;top:97px;width:800px;height:6px;z-index:0" align="left"> <img src="bv01019.gif" id="Shape1" align="top" alt="" border="0" width="800" height="6"></div> <div id="bv_" style="position:absolute;left:6px;top:6px;width:790px;height:76px;z-index:1" align="center"> <font style="font-size:32px" color="#8B0000" face="Georgia"><b><i>Prairie Fire Services<br> Conformation</i></b></font></div> <img src="PF_logo.JPG" id="Image1" alt="" align="top" border="0" width="51" height="85" style="position:absolute;left:6px;top:6px;width:51px;height:85px;z-index:2"> <img src="PF_logo.JPG" id="Image2" alt="" align="top" border="0" width="51" height="85" style="position:absolute;left:743px;top:6px;width:51px;height:85px;z-index:3"> <div id="bv_" style="position:absolute;left:0px;top:208px;width:794px;height:280px;z-index:4" align="center"> <font style="font-size:48px" color="#8B0000" face="Georgia"><b><i>Thank you<br> for choosing<br> Prairie Fire Services<br> for your<br> fireplace needs</i></b></font></div> <a href="[URL]http://www.prairiefireservices.com[/URL]" target="_self"><img src="home.bmp" id="Image3" alt="" align="top" border="2" width="44" height="41" style="position:absolute;left:376px;top:524px;width:48px;height:45px;z-index:5"></a> </div> </body> </html>
Thanks for any help to resolve this issue.
GD13,
=]
Comment