Ok, here is the code: Code: <?php include("dbconnect.php") ?> <?php if(isset($_POST['submit'])) { $gunname=$_POST['gunname']; $gunmodel=$_POST['gunmodel']; $gunmanufacturer=$_POST['gunmanufacturer']; $gunscale=$_POST['gunscale']; $powertype=$_POST['powertype']; $caliber=$_POST['caliber']; $length=$_POST['length']; $feetpersecond=$_POST['feetpersecond']; $clipcapacity=$_POST['clipcapacity']; $material=$_POST['material']; $weight=$_POST['weight']; $includes=$_POST['includes']; $warranty=$_POST['warranty']; $price=$_POST['price']; $shortdescription=$_POST['shortdescription']; $buylink=$_POST['buylink']; if(select=="1") { $sql = mysql_query("INSERT INTO `pistols` ( `gunname` , `gunmodel` , `gunmanufacturer`, `gunscale`, `powertype`, `caliber`, `length`, `feetpersecond`, `clipcapacity`, `material`, `weight`, `includes`, `warranty`, `price`, `shortdescription`, `buylink` ) VALUES ('$gunname', '$gunmodel', '$gunmanufacturer', '$gunscale', '$powertype', '$caliber', '$length', '$feetpersecond', '$clipcapacity', '$material', '$weight', '$includes', '$warranty', '$price', '$shortdescription', '$buylink');"); echo 'Thank you for your new submission!'; } ?> <form method="post" action="submit.php"> <table width="52%" height="459" border="0"> <tr> <td valign="top">Gun Name </td> <td valign="top"> <input type="text" name="gunname" size="25"> </td> </tr> <tr> <td valign="top">Gun Model </td> <td valign="top"> <input name="gunmodel" type="text" size="25"> </td> </tr> <tr> <td valign="top">Gun Manufacturer </td> <td valign="top"> <input name="gunmanufacturer" type="text" size="25"> </td> </tr> <tr> <td valign="top">Gun Scale </td> <td valign="top"> <textarea name="gunscale" size="25"></textarea> </td> </tr> <tr> <td height="85" valign="top">Power Type </td> <td valign="top"> <textarea name="powertype" size="25"></textarea> </td> </tr> <tr> <td valign="top">Caliber </td> <td valign="top"> <input name="caliber" type="text" size="25"> </td> </tr> <tr> <td valign="top">Length </td> <td valign="top"> <input name="length" type="text" size="25"> </td> </tr> <tr> <td valign="top">Feet Per Second [FPS/Velocity] </td> <td valign="top"> <input name="feetpersecond" type="text" size="25"> </td> </tr> <tr> <td valign="top">Clip Capacity </td> <td valign="top"> <input name="clipcapacity" type="text" size="25"> </td> </tr> <tr> <td valign="top">Material </td> <td valign="top"> <input name="material" type="text" size="25"> </td> </tr> <tr> <td valign="top">Weight </td> <td valign="top"> <input name="weight" type="text" size="25"> </td> </tr> <tr> <td valign="top">Includes </td> <td valign="top"> <input name="includes" type="text" size="25"> </td> </tr> <tr> <td valign="top">Warranty </td> <td valign="top"> <input name="warranty" type="text" size="25"> </td> </tr> <tr> <td valign="top">Price </td> <td valign="top"> <input name="price" type="text" size="25"> </td> </tr> <tr> <td valign="top">Short Description </td> <td valign="top"> <input name="shortdescription" type="text" size="100"> </td> </tr> <tr> <td valign="top">Buy Link </td> <td valign="top"> <input name="buylink" type="text" size="25"> </td> </tr> <tr> <td height="85" valign="top">Caliber </td> <td valign="top"> <textarea name="caliber" size="25"></textarea> </td> </tr> <tr> <td height="25" valign="top"></td> <td valign="top"><input type="submit" name="submit" value="Submit New Model!"></td> </tr> </form> </table> And here is the error: Code: Parse error: parse error, unexpected $ in /home/eastmans/public_html/Pistols/submit.php on line 125 I know that that error means there is a mistake with my script but me nor some other people can't find the mistake. [Line 125 is the last line, BTW] Please Help!
On line 125 you have a invalid Markup. Remove the </table> tag right at the bottom of the code. Should work now Edit: I uploaded it to my server and it works check it out http://www.blink-revolution.net/apply/test.htm
Well, it works when I save it as a .HTML file but then it won't actually work, I need it as a .PHP file but when I put it as that, I get the error, any ideas?
wow this script is really beign gay, you need like somsone to help you , i wish i could, i dont know PHP for anythign, ANyone else tho help him!
I have no clue what's wrong but it's on line 124: Parse error: parse error, unexpected $ in /home/blink/public_html/apply/test.php on line 124 That's what I get but when you remove the second <?php just below the include it works. But then you have to give an exact path to 'dbconnect.php'
you forgot to put one of the braces in at the end, before u closed the php, and hense why it was having parshing errors. below should work, if not just add the extra } Daz Code: <?php include("dbconnect.php"); if(isset($_POST['submit'])) { $gunname=$_POST['gunname']; $gunmodel=$_POST['gunmodel']; $gunmanufacturer=$_POST['gunmanufacturer']; $gunscale=$_POST['gunscale']; $powertype=$_POST['powertype']; $caliber=$_POST['caliber']; $length=$_POST['length']; $feetpersecond=$_POST['feetpersecond']; $clipcapacity=$_POST['clipcapacity']; $material=$_POST['material']; $weight=$_POST['weight']; $includes=$_POST['includes']; $warranty=$_POST['warranty']; $price=$_POST['price']; $shortdescription=$_POST['shortdescription']; $buylink=$_POST['buylink']; if(select=="1") { $sql = mysql_query("INSERT INTO `pistols` ( `gunname` , `gunmodel` , `gunmanufacturer`, `gunscale`, `powertype`, `caliber`, `length`, `feetpersecond`, `clipcapacity`, `material`, `weight`, `includes`, `warranty`, `price`, `shortdescription`, `buylink` ) VALUES ('$gunname', '$gunmodel', '$gunmanufacturer', '$gunscale', '$powertype', '$caliber', '$length', '$feetpersecond', '$clipcapacity', '$material', '$weight', '$includes', '$warranty', '$price', '$shortdescription', '$buylink');"); echo 'Thank you for your new submission!'; } } ?> <form method="post" action="submit.php"> <table width="52%" height="459" border="0"> <tr> <td valign="top">Gun Name </td> <td valign="top"> <input type="text" name="gunname" size="25"> </td> </tr> <tr> <td valign="top">Gun Model </td> <td valign="top"> <input name="gunmodel" type="text" size="25"> </td> </tr> <tr> <td valign="top">Gun Manufacturer </td> <td valign="top"> <input name="gunmanufacturer" type="text" size="25"> </td> </tr> <tr> <td valign="top">Gun Scale </td> <td valign="top"> <textarea name="gunscale" size="25"></textarea> </td> </tr> <tr> <td height="85" valign="top">Power Type </td> <td valign="top"> <textarea name="powertype" size="25"></textarea> </td> </tr> <tr> <td valign="top">Caliber </td> <td valign="top"> <input name="caliber" type="text" size="25"> </td> </tr> <tr> <td valign="top">Length </td> <td valign="top"> <input name="length" type="text" size="25"> </td> </tr> <tr> <td valign="top">Feet Per Second [FPS/Velocity] </td> <td valign="top"> <input name="feetpersecond" type="text" size="25"> </td> </tr> <tr> <td valign="top">Clip Capacity </td> <td valign="top"> <input name="clipcapacity" type="text" size="25"> </td> </tr> <tr> <td valign="top">Material </td> <td valign="top"> <input name="material" type="text" size="25"> </td> </tr> <tr> <td valign="top">Weight </td> <td valign="top"> <input name="weight" type="text" size="25"> </td> </tr> <tr> <td valign="top">Includes </td> <td valign="top"> <input name="includes" type="text" size="25"> </td> </tr> <tr> <td valign="top">Warranty </td> <td valign="top"> <input name="warranty" type="text" size="25"> </td> </tr> <tr> <td valign="top">Price </td> <td valign="top"> <input name="price" type="text" size="25"> </td> </tr> <tr> <td valign="top">Short Description </td> <td valign="top"> <input name="shortdescription" type="text" size="100"> </td> </tr> <tr> <td valign="top">Buy Link </td> <td valign="top"> <input name="buylink" type="text" size="25"> </td> </tr> <tr> <td height="85" valign="top">Caliber </td> <td valign="top"> <textarea name="caliber" size="25"></textarea> </td> </tr> <tr> <td height="25" valign="top"></td> <td valign="top"><input type="submit" name="submit" value="Submit New Model!"></td> </tr> </form> </table>