-2
<!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>Order Item - Using PHP Arrays</title>
<style type="text/css"> 
<!--
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
}
.style1 { color: #FF6600}
.style2 { color: #660033}
.error  { background-color:#FF0000; color: #FFFFFF; font-style:italic; text-align:center; font-size:13px; font-weight:bolder; }
.error1 { color: #0000FF; font-style:italic; text-align:center; font-weight:bold: }
.style3 { text-align:center; color: #0000FF }
.style6 { font-size: 18; font-weight: bold; }
.style7 { color: #0000FF; font-weight: bold; font-size:18px; }
.style8 { color: #FFFFFF; font-family: "Segoe Script"; font-size: 14px;} 
 
-->
</style>
<script> 
	function toggledisable(chkbx, elem) 
	{
		if (chkbx.checked) {
			elem.disabled = false;
			elem.focus();
			elem.value = "";
			elem.style.background = "yellow";
		} else {
			elem.disabled = true;
			elem.value = "";
			elem.style.background = "white";
		}
	}
	
</script>
</head>
 
<body>
<div align="center" class="style7">
  <h1>PHP ARRAYS</h1>
</div>
<p>
  	
  
</p>
<form id="form1" name="form1" method="post" action="">
  <table width="650" border="3" align="center" cellpadding="0" cellspacing="0" bordercolor="#FF6600">
	<tr>
	  <td>
  		<h1 align="center" class="style1">&nbsp;</h1>
  		<h1 align="center" class="style1">Item Order</h1>
  		<h4 align="center" class="style2">&nbsp;</h4>
  		<blockquote>
			
	      <table width="418" align="center" bgcolor="#FFFF99" cellpadding="5" cellspacing="0">
           <tr>
            <th colspan="3" align="left"><p align="center">Please choose your order: </p>
              <hr /></th>
           </tr>
          <tr>
            <th width="142" class="style1">Item</th>
			<th width="137" class="style1">Price</th>
			<th width="107" align="center" class="style1">Quantity</th>
          </tr>
          <tr>
            <td colspan='3'><hr /></td>
            </tr>
          <tr>
            <td><input name="order[0]" type="checkbox" value="Cappuccino" 
				checked onclick="toggledisable(this, form.elements['qy[0]'])"/> Cappuccino <br /></td>
             <td align="center">$2.00</td>
             <td align="center"><input name="qy[0]" type="text" class="style3" id="qy[0]" value="1" size="5" /></td>
          </tr>
          <tr>
            <td><input name="order[1]" type="checkbox" value="Espresso" 
				checked onclick="toggledisable(this, form.elements['qy[1]'])"/> Espresso <br /></td>
			<td align="center">$2.75</td>
			<td align="center"><input name="qy[1]" type="text" class="style3" id="qy[1]" value="2" size="5"></td>
          </tr>
          <tr>
            <td><input name="order[2]" type="checkbox" id="order[2]" value="Latte" 
				checked onclick="toggledisable(this, form.elements['qy[2]'])"/> Latte <br /></td>
			<td align="center">$1.75</td>
			<td align="center"><input name="qy[2]" type="text" class="style3" id="qy[2]" value="3" size="5"/></td>
          </tr>
          <tr>
            <td><input name="order[3]" type="checkbox" id="order[3]" value="Iced Cappuccino" 
				checked onclick="toggledisable(this, form.elements['qy[3]'])"/> Iced Cappuccino <br /></td>
            <td align="center">$2.50</td>
            <td align="center"><input name="qy[3]" type="text" class="style3" id="qy[3]" value="4" size="5"/></td>
          </tr>
          <tr>
            <td><input name="order[4]" type="checkbox" id="order[4]" value="Iced Latte" 
				checked onclick="toggledisable(this, form.elements['qy[4]'])"/> Iced Latte</p></td>
            <td align="center">$2.50</td>
            <td align="center"><input name="qy[4]" type="text" class="style3" id="qy[4]" value="5" size="5"/></td>
          </tr>
        </table>
      </blockquote>
    </div>
    <p>&nbsp;</p>
    <blockquote>
      <table width="496" border="0" align="center" cellpadding="0" cellspacing="0">
		<tr>
          <td width="317"><div align="right">Would you like to dine in or take out your order: </div></td>
          <td width="179">&nbsp;&nbsp;&nbsp;<input name="ask" type="radio" value="in" checked />Dine in &nbsp; &nbsp; &nbsp;
											<input name="ask" type="radio" value="out" />Take out</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
	  <hr />
	  <table width="423" border="0" align="center">
        <tr>
							<td width="230" bgcolor="#FFFF99" class="style3"><div align="right" class="style6">
				  <h4 align="center">Total Amount Due: </h4>
				</div></td>
           	  <td width="183" bgcolor="#FFCCCC" class="style7"><div align="left"><h4>&nbsp;$ 35.25</h4>
           	  </div></td>
			</tr>
			<tr>
				<td colspan="2" bgcolor="#0000FF"><h4 align="center" class="style8">Thank You for Coming!</h4>		      </td>
			</tr>
			      </table>
      <p align="center"><br /><input name="submit" type="submit" id="submit" value="Submit Order" /> </p>
      </blockquote>
	</td>
	</tr>
</table>
  </form>
</body>
</html>

Edited by peter_budo: Keep It Clear - Do use code tags when posting any code

4
Contributors
5
Replies
7
Views
6 Years
Discussion Span
Last Post by rotten69
0

It's pretty long and hard to follow, buddy. And, if you need us to help you solve the probs that you've got, then that means you need to be explicit about your question.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.