lak Posted November 14, 2007 Share Posted November 14, 2007 Parse error: syntax error, unexpected $end in /usr/local/share/doc/vhost/jayam-designs.com/httpdocs/rksnew/projinsert.php on line 476I m not able to fi <!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><?phpif($_SERVER['REQUEST_METHOD']="post"){if(isset($_POST['Submit'])){$asdf = $_POST[stage2];if($_POST[example] == "Trolley"){switch($asdf){case "512":if($_POST[stage3] == "Heavy duty"){$price = "3750"; }if($_POST[stage3] == "Medium duty"){$price = "2750"; }break;case 513:if($_POST[stage3] == "Heavy duty"){$price = "4750"; }if($_POST[stage3] == "Medium duty"){$price = "4250"; }break;case 514:if($_POST[stage3] == "Heavy duty"){$price = "2750"; }if($_POST[stage3] == "Medium duty"){$price = "2500"; }break;case 515:if($_POST[stage3] == "Single"){$price = "1000"; }break;case 516:if($_POST[stage3] == "Heavy duty"){$price = "3750"; }if($_POST[stage3] == "Medium duty"){$price = "2750"; }break;case 517:if($_POST[stage3] == "3*2"){$price = "3500"; }if($_POST[stage3] == "4*2"){$price = "4250"; }if($_POST[stage3] == "4*2.5"){$price = "4750"; }if($_POST[stage3] == "5*3"){$price = "6500"; }if($_POST[stage3] == "6*4"){$price = "8500"; }break;case 521:if($_POST[stage3] == "Single"){$price = "2750"; }break;case 522:if($_POST[stage3] == "Heavy duty"){$price = "4250"; }if($_POST[stage3] == "Medium duty"){$price = "3750"; }break;case 523:if($_POST[stage3] == "3*2"){$price = "3750"; }if($_POST[stage3] == "4*2"){$price = "4750"; }if($_POST[stage3] == "4*2.5"){$price = "5000"; }if($_POST[stage3] == "5*3"){$price = "6750"; }if($_POST[stage3] == "6*4"){$price = "8750"; }break;case 524:if($_POST[stage3] == "Single"){$price = "1750"; }if($_POST[stage3] == "Double"){$price = "3750"; }break;case 525:if($_POST[stage3] == "Single"){$price = "3750"; }break;case 526:if($_POST[stage3] == "Single"){$price = "2750"; }break;case 527:if($_POST[stage3] == "Single"){$price = "3500"; }break;case 528:if($_POST[stage3] == "Single"){$price = "16500"; }break;case 530:if($_POST[stage3] == "Single"){$price = "2750"; }break;case 531:if($_POST[stage3] == "Single"){$price = "12500"; }break;case 533:if($_POST[stage3] == "Single"){$price = "25000"; }break;}}if($_POST[example] == "Aluminium Ladder"){switch($asdf){case 501:if($_POST[stage3] == "Pipe step"){$price = $_POST[stage4]*200;}if($_POST[stage3] == "3 inch wide step"){$price = $_POST[stage4]*250; }if($_POST[stage3] == "Million box step"){$price = $_POST[stage4]*400; }break;case 502:if($_POST[stage3] == "Box+L"){$price = 600*$_POST[stage4]; }if($_POST[stage3] == "Box+Pipe"){$price = 700*$_POST[stage4]; }if($_POST[stage3] == "Box+Box"){$price = 800*$_POST[stage4]; }if($_POST[stage3] == "Pipe+Pipe"){$price = 800*$_POST[stage4]; }break;case 503:if($_POST[stage3] == "Box+L"){$price = 600*$_POST[stage4]; }if($_POST[stage3] == "Box+Pipe"){$price = 700*$_POST[stage4]; }if($_POST[stage3] == "Box+Box"){$price = 800*$_POST[stage4]; }if($_POST[stage3] == "Pipe+Pipe"){$price = 800*$_POST[stage4]; }break;case 504:if($_POST[stage3] == "10 - 16"){$price = "20000"; }if($_POST[stage3] == "12 - 20"){$price = "24000"; }if($_POST[stage3] == "15 - 25"){$price = "30000"; }if($_POST[stage3] == "17 - 30"){$price = "34000"; }if($_POST[stage3] == "20 - 36"){$price = "40000"; }if($_POST[stage3] == "24 - 40"){$price = "48000"; }if($_POST[stage3] == "20 - 50"){$price = "60000"; }break;case 506:if($_POST[stage3] == "10 - 16"){$price = "6000"; }if($_POST[stage3] == "12 - 20"){$price = "7200"; }if($_POST[stage3] == "15 - 25"){$price = "9000"; }if($_POST[stage3] == "17 - 30"){$price = "10200"; }if($_POST[stage3] == "20 - 36"){$price = "12000"; }if($_POST[stage3] == "24 - 40"){$price = "14400"; }if($_POST[stage3] == "20 - 50"){$price = "18000"; }break;case 507:if($_POST[stage3] == "10 - 16"){$price = "15000"; }if($_POST[stage3] == "12 - 20"){$price = "18000"; }if($_POST[stage3] == "15 - 25"){$price = "22500"; }if($_POST[stage3] == "17 - 30"){$price = "25500"; }if($_POST[stage3] == "20 - 36"){$price = "30000"; }if($_POST[stage3] == "24 - 40"){$price = "36000"; }if($_POST[stage3] == "20 - 50"){$price = "45000"; }break;case 508:if($_POST[stage3] == "10 - 16"){$price = "16000"; }if($_POST[stage3] == "12 - 20"){$price = "19200"; }if($_POST[stage3] == "15 - 25"){$price = "24000"; }if($_POST[stage3] == "17 - 30"){$price = "27200"; }if($_POST[stage3] == "20 - 36"){$price = "32000"; }if($_POST[stage3] == "24 - 40"){$price = "38400"; }if($_POST[stage3] == "20 - 50"){$price = "47500"; }break;case 509:if($_POST[stage3] == "10 - 16"){$price = "25000"; }if($_POST[stage3] == "12 - 20"){$price = "30000"; }if($_POST[stage3] == "15 - 25"){$price = "37500"; }if($_POST[stage3] == "17 - 30"){$price = "42500"; }if($_POST[stage3] == "20 - 36"){$price = "50000"; }if($_POST[stage3] == "24 - 40"){$price = "60000"; }if($_POST[stage3] == "20 - 50"){$price = "75000"; }break;case 510:if($_POST[stage3] == "10 - 16"){$price = "35000"; }if($_POST[stage3] == "12 - 20"){$price = "42000"; }if($_POST[stage3] == "15 - 25"){$price = "52500"; }if($_POST[stage3] == "17 - 30"){$price = "59500"; }if($_POST[stage3] == "20 - 36"){$price = "70000"; }if($_POST[stage3] == "24 - 40"){$price = "84000"; }if($_POST[stage3] == "20 - 50"){$price = "105000"; }break;case 519:if($_POST[stage3] == "10 - 16"){$price = "40000"; }if($_POST[stage3] == "12 - 20"){$price = "47000"; }if($_POST[stage3] == "15 - 25"){$price = "57500"; }if($_POST[stage3] == "17 - 30"){$price = "64500"; }if($_POST[stage3] == "20 - 36"){$price = "75000"; }if($_POST[stage3] == "24 - 40"){$price = "89000"; }if($_POST[stage3] == "20 - 50"){$price = "112500"; }break;case 520:if($_POST[stage3] == "10 - 16"){$price = "40000"; }if($_POST[stage3] == "12 - 20"){$price = "48000"; }if($_POST[stage3] == "15 - 25"){$price = "60000"; }if($_POST[stage3] == "17 - 30"){$price = "68000"; }if($_POST[stage3] == "20 - 36"){$price = "80000"; }if($_POST[stage3] == "24 - 40"){$price = "96000"; }if($_POST[stage3] == "20 - 50"){$price = "120000"; }break;case 511:if($_POST[stage3] == "18 * 4.5"){$price = 2000*$_POST[stage4]; }if($_POST[stage3] == "18 * 6"){$price = 2500*$_POST[stage4]; }if($_POST[stage3] == "24 * 7"){$price = 3000*$_POST[stage4];}break;}}$con = mysql_connect('jayam-designs.com','designj,'11111') or die('Could not connect: ' . mysql_error());$db = mysql_select_db("jayamdesign", $con) or die('Could not connect database:' . mysql_error());$sql="INSERT INTO quotation (price,modelno,ProdName,height,capacity,discount,delivery,enquiry,address,today)VALUES('$price','$_POST[stage2]','$_POST[example]','$_POST[stage4]','$_POST[stage3]','$_POST[discount1]','$_POST[delivery]','$_POST[enq]','$_POST[address]','$_POST[today]')";if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }}}?><?php // if(isset($_GET['submit'])) $quotid = mysql_insert_id($con);$result = mysql_query("SELECT * FROM billing WHERE quot_id ='$quotid'"); while($row = mysql_fetch_array($result)) { ?><table width="650" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <th colspan="5" scope="row"> </th> </tr> <tr> <td colspan="5" scope="row"><form action="word.php" method="post"> <div align="center"> <input name="quotid" type="hidden" value="<?php echo $_SESSION[qid]; ?>" /> <input type="submit" name="Submit" value="Click Here To View in Word" /> </div> </form> </td> </tr> <tr> <td width="62" height="1" rowspan="2" scope="row"><div align="center"><span class="style10"><span class="style12">PHONE</span> :</span></div></td> <td width="95" scope="row"><div align="left"><span class="style11">25383707</span></div></td> <td width="254" scope="row"><div align="center"> <p class="style17"><u>Subject to Chennai jurisdiction</u></p> </div></td> <td width="159" class="style11" scope="row"><div align="right">TIN No. 33190520489</div></td> </tr> <tr> <td scope="row"><div align="left"><span class="style11">25363997</span></div></td> <td><div align="center"> <p class="style15 style18"><strong><u>TAX INVOICE</u></strong></p> </div></td> <td width="159" scope="row"><div align="right" class="style11">CST.No. 60101/5-4-88</div></td> </tr> <tr> <td height="1" colspan="5" scope="row"><div align="center"><span class="style3 style2">RKS ENGINEERING INDUSTRIES</span> <br /> <span class="style7 style6">Mfgs. of Aluminium Ladder & Wheel Barrows<br /> All kinds of Trollies & Scolffold M.S.Aluminium</span><br /> <span class="style9">OFFICE: </span><span class="style9">19, Depot Street, Choolai, Chennai - 600112. E-mail : rks.ladders@vsnl.net</span><span class="style9"><br /> FACTORY : </span><span class="style9">No.10, Thattankulam Road, Lotous Colony, 3rd Street, Madhavaram, Chennai - 600060 </span></div></td> </tr> <th height="10" colspan="5" scope="row"><table width="650" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="186" scope="row"><div align="left"><span class="style8 style7">Invoice.No <?php echo $row['quot_id']; ?></span></div></td> <td width="286" scope="row"><div align="center"><img src="file:///F|/wamp/www/indu project/billing/RK-LOGO1.jpg" width="75" height="68" /></div></td> <td width="178" scope="row"><div align="left"><span class="style7">Date : </span><?php echo $row['today']; ?></div></td> </tr> <tr> <th colspan="3" scope="row"><table width="650" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="185" rowspan="3" scope="row"><img src="file:///F|/wamp/www/indu project/billing/ac.-no.jpg" width="155" height="59" /></th> <td colspan="2" scope="row"><div align="left" class="style7">Messers</div></td> <th width="128" rowspan="3" scope="row"> </th> </tr> <tr> <th width="53" scope="row"> </th> <th width="284" scope="row"><div align="left"><span class="style6"> <?php $string = $row['address'];$token = strtok($string,",");while ($token !== false) { echo "$token<br />"; $token = strtok(","); }?> </span></div></th> </tr> <tr> <th colspan="2" scope="row"> </th> </tr> <tr> <th colspan="4" scope="row"><table width="649" height="426" border="1" cellpadding="0" cellspacing="0"> <tr> <td width="42" scope="row"><div align="center">Sl.No</div></td> <td width="438" scope="row"><div align="center">PARTICULARS</div></td> <td width="46" scope="row"> </td> <td width="113" scope="row"><div align="center">Rs</div></td> </tr> <tr> <th height="140" scope="row"><table width="42" height="181" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="54" valign="top" scope="row"><div align="center">1</div> </td> </tr> <tr> <th height="47" valign="top" scope="row"><div align="center"><?php echo $j ; ?></div></th> </tr> <tr> <th scope="row"> </th> </tr> </table></th> <th height="140" scope="row"><table width="438" height="175" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="434" height="54" valign="top" scope="row"><div align="left">Product :<?php echo $row['ProdName']; ?> Model No:RKS - <?php echo $row['modelno']; ?> <?php if($row['ProdName'] == "Aluminium Ladder") { ?>Height : <?php echo $row['height']; ?> feet . Step Type : <?php echo $row['capacity']."<br>"; } if($row['ProdName'] == "Trolley"){ ?>Capacity: </div></td> </tr> <tr> <td height="51" valign="top" scope="row"><div align="left">Product :<?php echo $row[$ProdName]; ?> Model No:RKS - <?php echo $row[$modelno]; ?> <?php if($row[$ProdName] == "Aluminium Ladder") { ?> Height : <?php echo $row[$height]; ?> feet<br /> Step Type : <?php echo $row[$capacity]."<br>"; } if($row[$ProdName] == "Trolley"){ ?>Capacity: <?php echo $row[$capacity]."<br>"; } ?></div></td> </tr> <tr> <th height="62" scope="row"> </th> </tr> </table></th> <th height="140" scope="row"><table width="46" height="172" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="57" valign="middle" scope="row"><p align="center">1</p> <p> </p></td> </tr> <tr> <td height="48" valign="top" scope="row"><div align="center">1</div></td> </tr> <tr> <th scope="row"> </th> </tr> </table></th> <th height="140" scope="row"><table width="113" height="178" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="42" valign="top" scope="row"><div align="center"> <?php echo $row['price']."<br>";?> </div></td> </tr> <tr> <th height="51" valign="top" scope="row"><div align="center"><?php echo $row[$price1]."<br>"; ?></div></th> </tr> <tr> <th height="37" scope="row"> </th> </tr> </table></th> </tr> <tr> <th height="53" colspan="4" scope="row"><table width="654" height="54" border="1" cellpadding="0" cellspacing="0"> <tr> <th width="488" scope="row"><table width="482" height="60" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="482" scope="row"><div align="right">Total : </div></td> </tr> <tr> <td scope="row"><div align="right"> <?php if($row[$discount]!="No") { ?>Discount :<?php echo "(".$row[$discount]."%)"."<br>"; } ?></div></td> </tr> <tr> <td scope="row"><div align="right">Net :</div></td> </tr> </table></th> <th width="160" scope="row"><table width="162" height="61" border="0" cellpadding="0" cellspacing="0"> <tr> <td scope="row"><div align="right"><?php echo($row[$discount]); ?></div></td> </tr> <tr> <td scope="row"><div align="right"><?php echo($row[$discount]); ?></div></td> </tr> <tr> <td scope="row"><div align="right"> <?php$kpp = ($row['price1']+$row['price2']+$row['$price3']+$row['price4']+$row['price5']+$row['price6'])-($row['price2']+$row['$price3']+$row['price4']+$row['price5']+$row['price6'])*($row[$discount])/100; if($row['discount'] != "No") { echo $kpp; } else { echo $row['price']; } ?> </div></td> </tr> </table></th> </tr> </table></th> </tr> <tr> <th height="80" colspan="4" scope="row"><table width="654" height="116" border="1" cellpadding="0" cellspacing="0"> <tr> <th width="243" scope="row"><table width="240" height="66" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="240" scope="row"><div align="left">No. of Packages <strong> : </strong></div></td> </tr> <tr> <td scope="row"><div align="left">Mode of Despatch <strong> : </strong></div></td> </tr> <tr> <td scope="row"><div align="left">Documents Through<strong>:</strong></div></td> </tr> <tr> <td scope="row"><div align="left">Buyer's TIN No <strong> :</strong></div></td> </tr> <tr> <td scope="row"><div align="left">Buyer's CST No <strong> :</strong></div></td> </tr> <tr> <td scope="row"> </td> </tr> </table></th> <th width="244" scope="row"><table width="235" height="95" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="235" scope="row"><div align="left">Total <strong><b> ... </b></strong></div></td> </tr> <tr> <td scope="row"><div align="left">Packing & Forwarding <strong> <b>...</b></strong></div></td> </tr> <tr> <td scope="row"><div align="left">Vat/CST <b> ...</b></div></td> </tr> <tr> <td scope="row"><div align="left">Delivery Charge/Freight Charge <strong>...</strong></div></td> </tr> <tr> <td scope="row"><div align="left">GrandTotal <strong> ... </strong> </div></td> </tr> <tr> <td scope="row"> </td> </tr> </table></th> <th width="159" scope="row"><table width="150" height="97" border="0" cellpadding="0" cellspacing="0"> <tr> <th scope="row"> </th> </tr> <tr> <th scope="row"> </th> </tr> <tr> <th scope="row"> </th> </tr> <tr> <th scope="row"> </th> </tr> <tr> <th scope="row"> </th> </tr> <tr> <th scope="row"> </th> </tr> </table></th> </tr> </table></th> </tr> <tr> <td height="33" colspan="4" scope="row"><span class="style6"> <p style="text-decoration:underline">Terms & Conditions</p> <br />1. F.O.R Delivery charge extra at actual.<br />2. Taxes VAT @12.5% Extra.<br />3. Delivery within : <?php echo $row['delivery'];?><br />4. Payments 50% advance 50% against delivery <br />5. Validity 30 days and thereafter subj. to our Confirmation.<br />6. Guarantee: 1 Year </span></td> </tr> </table></th> </tr> </table></th> </tr> </table></th> </tr></table><?php } ?></body></html> nd that where that error happened.. Can you Link to comment Share on other sites More sharing options...
Pollux Posted November 14, 2007 Share Posted November 14, 2007 Theres 2 errors in the code you posted...1) Line 187: missing a single quote...$con = mysql_connect('jayam-designs.com','designj,'11111') or die('Could not connect: ' . mysql_error());2) Line 306: missing a bracket to close the block.if($row['ProdName'] == "Trolley"){ ?>Capacity: </div></td>That should fix the errors you're getting. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.