Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,037 members, 7,956,848 topics. Date: Monday, 23 September 2024 at 08:34 PM |
Nairaland Forum / Science/Technology / Programming / Parse Error: Syntax Error, Unexpected T_else In C:\ (1249 Views)
Programming Your Own Code Syntax Highlighter / Build An Android Instant Messaging App Using Sinch And Parse In 2 Hours / Java Syntax Highlighter For Smf 1.0.12 (2) (3) (4)
(1) (Reply)
Parse Error: Syntax Error, Unexpected T_else In C:\ by ckdoublene: 11:08pm On Apr 07, 2011 |
Someone please help me to finish this code? <?php?> <HTML><HEAD> <script type="text/javascript"> var monthNames = [ "January","February","March","April","May","June","July", "August","September","October","November","December" ]; var today = new Date(); var date = monthNames[today.getMonth()] + " - " + today.getDate() + " / " + today.getFullYear(); </script> </script> </HEAD><BODY> <script type="text/javascript">document.write (date); </script> <?php mysql_connect(localhost,root,"" mysql_select_db(oodb) or die( "Unable to select database" if(!empty($_POST["submit"])) { $ordernum = $_POST['ordernum']; $query=" SELECT * FROM oocust WHERE ordernum='$ordernum'AND PD=' '"; $result=mysql_query($query); if(mysql_num_rows($result)) { $ordernum = $_POST['ordernum']; $invnum = $_POST['invnum']; $bname = $_POST['bname']; $bstreet = $_POST['bstreet']; $bstate = $_POST['bstate']; $bzip = $_POST['bzip']; $sname = $_POST['sname']; $sstreet = $_POST['sstreet']; $sstate = $_POST['sstate']; $szip = $_POST['szip']; $contact = $_POST['contact']; $terms = $_POST['terms']; $fob = $_POST['fob']; $shipdate = $_POST['shipdate']; $shipamt = $_POST['shipamt']; $dateord = $_POST['dateord']; $datecomp = $_POST['datecomp']; $duedate = $_POST['duedate']; $datepaid = $_POST['datepaid']; $qty = $_POST['qty']; $desc = $_POST['desc']; $charges = $_POST['charges']; $paidamt = $_POST['paidamt']; $owed = $_POST['owed']; $dayslate = $_POST['dayslate']; $tax = $_POST['tax']; $amtdue = $_POST['amtdue']; } // charges + tax + shipping = $gtotal $gtotal = $charges + $tax + $shipamt; echo "<form action='#' method='post'>echo 'Old Orchard Plumbing<br> 2210 E. Hogan Hollow Road<br> Margate, Fl, 33063<br>'"; while ($row = mysql_fetch_assoc($result) ) { echo "<TABLE BORDER=0 CELLPADDING=5 CELLSPACING=5> <TR> <th>Bill To</th> <th>Ship to</th> <th>Invoice No</th> <th>Terms</th> <th>Due Date</th> <th>Fob</th> <th>Ship Date</th> <th>Order No</th> <tr> <TH colspan=11>================================================================================================</TH> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['bname'] . "</td>"; echo "<td>" . $row['sname'] . "</td>"; echo "<tr>"; echo "<td>" . $row['bstreet'] . "</td>"; echo "<td>" . $row['sstreet'] . "</td>"; echo "<tr>"; echo "<td>" . $row['bstate'] . "</td>"; echo "<td>" . $row['sstate'] . "</td>"; echo "<tr>"; echo "<td>" . $row['bcity'] . "</td>"; echo "<td>" . $row['scity'] . "</td>"; echo "<tr>"; echo "<td>" . $row['bzip'] . "</td>"; echo "<td>" . $row['szip'] . "</td>"; echo "<td>" . $row['invnum'] . "</td>"; echo "<td>" . $row['terms'] . "</td>"; echo "<td>" . $row['duedate'] . "</td>"; echo "<td>" . $row['fob'] . "</td>"; echo "<td>" . $row['shipdate'] . "</td>"; echo "<td>" . $row['ordernum'] . "</td>"; echo "</tr>"; } echo "</table>"; echo "<TABLE BORDER=0 CELLPADDING=5 CELLSPACING=5> <TR> <th>Desc</th> <th>Qty</th> <th>Charges</th> <th>Tax(6%)</th> <th>Ship Amt</th> <th>Amt Due</th> <th>Gtotal</th> <tr> <TH colspan=11>================================================================================================</TH> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['desc'] . "</td>"; echo "<td>" . $row['qty'] . "</td>"; echo "<td>" . $row['charges'] . "</td>"; echo "<td>" . $row['tax'] . "</td>"; echo "<td>" . $row['shipamt'] . "</td>"; echo "<td>" . $row['amtdue'] . "</td>"; echo "<td>" . $row['paidamt'] . "</td>"; echo "<td>" . $row['gtotal'] . "</td>"; echo "<tr>"; } echo "</table>"; echo "</form>"; { else{echo "No listing for order# $ordernum. Select another? ";} } mysql_close(); ?> <form method="post" action="#"> <input type="text" name="ordernum"/><p> <input type="submit" name="submit" value="+"/></form> |
(1) (Reply)
Gamers VM 3.0.0 / Challenge! You Cant View This Page Source Code! / Is It Too Late To Start My Programming Career?
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 21 |