forumnz Posted January 26, 2007 Share Posted January 26, 2007 Right, here is my form... It just keeps saying invalid file...[code]<!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>Designer Vision - Freshlook Services</title><style type="text/css"><!--ul{list-style-image:url(arrow2.jpg);}.style4 {font-size: 18px; color: #3A3A3A; font-weight: bold; }.style6 {font-size: 12px; color: #3A3A3A; text-decoration: none; }.style11 {font-size: 22px; color: #5B5E71; font-weight: bold; }.style13 {font-size: 14px; color: #3A3A3A; text-decoration: none; font-weight: bold; }.style14 {color: #3A3A3A; text-decoration: none; font-size: 14px;}.style20 {color: #5B5E71}.style21 {color: #7A5E71}.style66 {font-size: 14px; color: #3A3A3A; text-decoration:underline; font-weight:bold; }.style57 {font-size: 12px; color: #3A3A3A; text-decoration: underline; }.style1 { font-size: 16px; color: #3A3A3A; text-decoration:none;}.style67 {font-size: 16px; color: #3A3A3A; font-weight: bold; }.style69 {font-size: 14px; color: #FF0000; font-weight: bold; }--></style></head><body background="bg.gif"><table width="100%" border="0" align="center"> <tr> <td height="24"> </td> </tr> <tr> <td><table width="760" height="699" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="760" height="240" background="webtop.gif"><table width="100%" height="240 " border="0" cellpadding="0" cellspacing="0"> <tr> <td width="760" height="240"><table width="94%" height="207" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="53"> </td> </tr> <tr> <td height="127"> </td> </tr> <tr> <td height="20" class="style13"><div align="right" class="style14"><a href="index.html" class="style14">home</a> <a href="services.html" class="style14">services</a> <a href="portfolio.html" class="style14">portfolio</a> <a href="/plans.html" class="style14"> plans</a> <a href="contact.html" class="style14">contact</a> </div></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td height="419" background="webrep.gif"><table width="98%" border="0"> <tr> <td width="3%" rowspan="6"> </td> <td width="21%" rowspan="6" align="center" valign="top" class="style4"><p align="center" class="style20">What's involved?</p> <p align="left"> <span class="style6">The process of creating your perfect website, business or personal...<a href="websites.html#wi" class="style57">more</a></span></p> <p align="center" class="style21">Benefits</p> <p align="left"> <span class="style6">Having a website can increase sales phenomenally, attracting more customers and keeping you at the top!...<a href="websites.html#be" class="style57">more</a></span></p> <p align="center" class="style20">Effective Sites </p> <p align="left"> <span class="style6">Sure, many people can design and create a website, but there is more to it than that...<a href="websites.html#es" class="style57">more</a></span></p> <p align="left"> </p> <p align="left"> </p></td> <td width="4%" rowspan="6"> </td> <td colspan="2" align="right" valign="middle" class="style11"><div align="left">Website Templates - Upload </div></td> </tr> <tr> <td colspan="2" align="right" valign="middle" class="style13"> </td> </tr> <tr> <td height="53" colspan="2" align="right" valign="middle" class="style13"><div align="left"> <p>Want to earn some extra money? All you need to do is make website templates and upload them here. We will review your template, and if we like it we will contact you and put it on our site. You will get 80% of all the money made from your template. </p> </div></td> </tr> <tr> <td width="18%" align="right" valign="middle" class="style13"><div align="left">Search templates: </div></td> <td width="54%" align="right" valign="middle" class="style13"><form id="form1" name="form1" method="post" action=""> <label> <div align="left"> <select name="select"> <option value="1">3D Style </option> <option value="2">Agriculture</option> <option value="3">Animals & Pets</option> <option value="4">Architechture</option> <option value="5">Art & Photography</option> <option value="6">Beauty</option> <option value="7">Books</option> <option value="8">Business</option> <option value="9">Cafe & Restaurant</option> <option value="10">Cars</option> <option value="11">Charity</option> <option value="12">Clean Style</option> <option value="13">Computers & Communications</option> <option value="14">Dating</option> <option value="15">Education</option> <option value="16">Electronics</option> <option value="17">Entertainment</option> <option value="18">Family</option> <option value="19">Fashion</option> <option value="20">Industrial</option> <option value="21">Internet</option> <option value="22">Military</option> <option value="23">Music</option> <option value="24">Night Club</option> <option value="25">Casino</option> <option value="26">Politics</option> <option value="27">Real Estate</option> <option value="28">Religious</option> <option value="29">Science</option> <option value="30">Security</option> <option value="31">Software</option> <option value="32">Sport</option> <option value="33">Transport & Travel</option> <option value="34">Wedding</option> <option value="35">Other</option> </select> </div> </label> </form> </td> </tr> <tr> <td height="205" colspan="2" align="right" valign="top" class="style13"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2">Allowed files: PHP, HTML, Flash, Gif, JPEG. </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td width="23%">Template Catagory: </td> <td width="77%"> <!--<select name="select2"> <option value="a">3D Style </option> <option value="b">Agriculture</option> <option value="c">Animals & Pets</option> <option value="d">Architechture</option> <option value="e">Art & Photography</option> <option value="f">Beauty</option> <option value="g">Books</option> <option value="h">Business</option> <option value="i">Cafe & Restaurant</option> <option value="j">Cars</option> <option value="k">Charity</option> <option value="l">Clean Style</option> <option value="m">Computers & Communications</option> <option value="n">Dating</option> <option value="o">Education</option> <option value="p">Electronics</option> <option value="q">Entertainment</option> <option value="r">Family</option> <option value="s">Fashion</option> <option value="t">Industrial</option> <option value="u">Internet</option> <option value="v">Military</option> <option value="w">Music</option> <option value="x">Night Club</option> <option value="y">Casino</option> <option value="z">Politics</option> <option value="aa">Real Estate</option> <option value="ab">Religious</option> <option value="ac">Science</option> <option value="ad">Security</option> <option value="ae">Software</option> <option value="af">Sport</option> <option value="ag">Transport & Travel</option> <option value="ah">Wedding</option> <option value="ai">Other</option> </select> --> </td> </tr> <tr> <td>Source Code: </td> <td><form action="check.php" method="post"enctype="multipart/form-data"><label for="file">Filename:</label><input type="file" name="file" id="file" /><br /><label for="file">Filename:</label><input type="file" name="file2" id="file2" /><br /><label for="file">Filename:</label><input type="file" name="file3" id="file3" /><br /><br /><!-- <label for="file">File 5:</label><input type="file" name="file" id="file" /><br /> <label for="file">File 6:</label><input type="file" name="file" id="file" /><br /> <label for="file">File 7:</label><input type="file" name="file" id="file" /><br /> <label for="file">File 8:</label><input type="file" name="file" id="file" /><br /> <label for="file">File 9:</label><input type="file" name="file" id="file" /><br /> <label for="file">File 10:</label><input type="file" name="file" id="file" /><br /> <label for="file">File 11:</label><input type="file" name="file" id="file" /><br /> <label for="file">File 12:</label><input type="file" name="file" id="file" /><br /> <label for="file">File 13:</label><input type="file" name="file" id="file" /><br /> <label for="file">File 14:</label><input type="file" name="file" id="file" /><br /> <label for="file">File 15:</label><input type="file" name="file" id="file" /><br /> <label for="file">File 16:</label><input type="file" name="file" id="file" /><br />--> <input type="submit" name="submit" value="Submit" /></form></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> <label> </label> </td> </tr> </table></td> </tr> <tr> <td colspan="2" valign="top" class="style66"><div align="center"><a href="contact.html" class="style66">Contact Us</a> </div></td> </tr> </table></td> </tr> <tr> <td width="760" height="40" background="webbot.gif"> </td> </tr> </table></td> </tr></table></body></html>[/code]and here is my validation and confirmation page...[code]<!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>Designer Vision - Freshlook Services</title><style type="text/css"><!--ul{list-style-image:url(arrow2.jpg);}.style4 {font-size: 18px; color: #3A3A3A; font-weight: bold; }.style6 {font-size: 12px; color: #3A3A3A; text-decoration: none; }.style11 {font-size: 22px; color: #5B5E71; font-weight: bold; }.style13 {font-size: 14px; color: #3A3A3A; text-decoration: none; font-weight: bold; }.style14 {color: #3A3A3A; text-decoration: none; font-size: 14px;}.style20 {color: #5B5E71}.style21 {color: #7A5E71}.style66 {font-size: 14px; color: #3A3A3A; text-decoration:underline; font-weight:bold; }.style57 {font-size: 12px; color: #3A3A3A; text-decoration: underline; }.style1 { font-size: 16px; color: #3A3A3A; text-decoration:none;}.style67 {font-size: 16px; color: #3A3A3A; font-weight: bold; }.style69 {font-size: 14px; color: #FF0000; font-weight: bold; }--></style></head><body background="bg.gif"><table width="100%" border="0" align="center"> <tr> <td height="24"> </td> </tr> <tr> <td><table width="760" height="699" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="760" height="240" background="webtop.gif"><table width="100%" height="240 " border="0" cellpadding="0" cellspacing="0"> <tr> <td width="760" height="240"><table width="94%" height="207" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="53"> </td> </tr> <tr> <td height="127"> </td> </tr> <tr> <td height="20" class="style13"><div align="right" class="style14"><a href="index.html" class="style14">home</a> <a href="services.html" class="style14">services</a> <a href="portfolio.html" class="style14">portfolio</a> <a href="/plans.html" class="style14"> plans</a> <a href="contact.html" class="style14">contact</a> </div></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td height="419" background="webrep.gif"><table width="98%" border="0"> <tr> <td width="3%" rowspan="6"> </td> <td width="21%" rowspan="6" align="center" valign="top" class="style4"><p align="center" class="style20">What's involved?</p> <p align="left"> <span class="style6">The process of creating your perfect website, business or personal...<a href="websites.html#wi" class="style57">more</a></span></p> <p align="center" class="style21">Benefits</p> <p align="left"> <span class="style6">Having a website can increase sales phenomenally, attracting more customers and keeping you at the top!...<a href="websites.html#be" class="style57">more</a></span></p> <p align="center" class="style20">Effective Sites </p> <p align="left"> <span class="style6">Sure, many people can design and create a website, but there is more to it than that...<a href="websites.html#es" class="style57">more</a></span></p> <p align="left"> </p> <p align="left"> </p></td> <td width="4%" rowspan="6"> </td> <td colspan="2" align="right" valign="middle" class="style11"><div align="left">Website Templates - Upload </div></td> </tr> <tr> <td colspan="2" align="right" valign="middle" class="style13"> </td> </tr> <tr> <td height="53" colspan="2" align="right" valign="middle" class="style13"><div align="left"> <p>Want to earn some extra money? All you need to do is make website templates and upload them here. We will review your template, and if we like it we will contact you and put it on our site. You will get 80% of all the money made from your template. </p> </div></td> </tr> <tr> <td width="18%" align="right" valign="middle" class="style13"><div align="left">Search templates: </div></td> <td width="54%" align="right" valign="middle" class="style13"><form id="form1" name="form1" method="post" action=""> <label> <div align="left"> <select name="select"> <option value="1">3D Style </option> <option value="2">Agriculture</option> <option value="3">Animals & Pets</option> <option value="4">Architechture</option> <option value="5">Art & Photography</option> <option value="6">Beauty</option> <option value="7">Books</option> <option value="8">Business</option> <option value="9">Cafe & Restaurant</option> <option value="10">Cars</option> <option value="11">Charity</option> <option value="12">Clean Style</option> <option value="13">Computers & Communications</option> <option value="14">Dating</option> <option value="15">Education</option> <option value="16">Electronics</option> <option value="17">Entertainment</option> <option value="18">Family</option> <option value="19">Fashion</option> <option value="20">Industrial</option> <option value="21">Internet</option> <option value="22">Military</option> <option value="23">Music</option> <option value="24">Night Club</option> <option value="25">Casino</option> <option value="26">Politics</option> <option value="27">Real Estate</option> <option value="28">Religious</option> <option value="29">Science</option> <option value="30">Security</option> <option value="31">Software</option> <option value="32">Sport</option> <option value="33">Transport & Travel</option> <option value="34">Wedding</option> <option value="35">Other</option> </select> </div> </label> </form> </td> </tr> <tr> <td height="205" colspan="2" align="right" valign="middle" class="style13"><div align="left"> <?phpif (($_FILES["file"]["type"] == "text/html")|| ($_FILES["file"]["type"] == "text/htm")|| ($_FILES["file"]["type"] == "text/php")|| ($_FILES["file"]["type"] == "image/gif")|| ($_FILES["file"]["type"] == "image/jpeg")&& ($_FILES["file"]["size"] < 250000)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Temp file: " . $_FILES["file"]["files"] . "<br />"; if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "_files/" . $_FILES["file"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file"]["name"] . "<br/>"; move_uploaded_file($_FILES["file2"]["tmp_name"], "_files/" . $_FILES["file2"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file2"]["name"] . "<br/>"; move_uploaded_file($_FILES["file3"]["tmp_name"], "_files/" . $_FILES["file3"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file3"]["name"] . "<br/>"; move_uploaded_file($_FILES["file4"]["tmp_name"], "_files/" . $_FILES["file4"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file4"]["name"] . "<br/>"; move_uploaded_file($_FILES["file5"]["tmp_name"], "_files/" . $_FILES["file5"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file5"]["name"] . "<br/>"; move_uploaded_file($_FILES["file6"]["tmp_name"], "_files/" . $_FILES["file6"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file6"]["name"] . "<br/>"; move_uploaded_file($_FILES["file7"]["tmp_name"], "_files/" . $_FILES["file7"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file7"]["name"] . "<br/>"; move_uploaded_file($_FILES["file8"]["tmp_name"], "_files/" . $_FILES["file8"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file8"]["name"] . "<br/>"; move_uploaded_file($_FILES["file9"]["tmp_name"], "_files/" . $_FILES["file9"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file9"]["name"] . "<br/>"; move_uploaded_file($_FILES["file10"]["tmp_name"], "_files/" . $_FILES["file10"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file10"]["name"] . "<br/>"; move_uploaded_file($_FILES["file11"]["tmp_name"], "_files/" . $_FILES["file11"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file11"]["name"] . "<br/>"; move_uploaded_file($_FILES["file12"]["tmp_name"], "_files/" . $_FILES["file12"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file12"]["name"] . "<br/>"; move_uploaded_file($_FILES["file13"]["tmp_name"], "_files/" . $_FILES["file13"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file13"]["name"] . "<br/>"; move_uploaded_file($_FILES["file14"]["tmp_name"], "_files/" . $_FILES["file14"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file14"]["name"] . "<br/>"; move_uploaded_file($_FILES["file15"]["tmp_name"], "_files/" . $_FILES["file15"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file15"]["name"] . "<br/>"; move_uploaded_file($_FILES["file16"]["tmp_name"], "_files/" . $_FILES["file16"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file16"]["name"] . "<br/>"; } } }else { echo "Invalid file"; }?> </div></td> </tr> <tr> <td colspan="2" valign="top" class="style66"><div align="center"><a href="contact.html" class="style66">Contact Us</a> </div></td> </tr> </table></td> </tr> <tr> <td width="760" height="40" background="webbot.gif"> </td> </tr> </table></td> </tr></table></body></html>[/code]Thanks! Link to comment https://forums.phpfreaks.com/topic/35888-help-upload/ Share on other sites More sharing options...
papaface Posted January 26, 2007 Share Posted January 26, 2007 erm are you joking?Don't you think we have anything better to do that look through your code?Post specific pieces of code with a proper error and line number! Link to comment https://forums.phpfreaks.com/topic/35888-help-upload/#findComment-170168 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.