note 111992 added to debugger
| From: | ashley dot giesel at yahoo dot com | Date: | Fri, 19 Apr 2013 14:35:33 +0000 |
| Subject: | note 111992 added to debugger | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-194564@lists.php.net to get a copy of this message | ||
<?php
//create short variable name
$$DOCUMENT_ROOT = $SERVER ['Vieworder.html'];
?>
<html>
<head>
<title>Sour Soda - Customer Orders</title>
</head>
<body>
<h1>Sour Soda</h1>
<h2>Customer Orders</h2>
<?php
//read in the entire file.
//each order becomes an element in the array
$orders=file("$DOCUMENT_ROOT/../vieworder.html");
//count the number of orders in the array
$number_of_orders=count($orders);
if ($number_of_orders==0){
echo"<p><strong>No orders pending.
Please try again later.</strong></p>";
}
echo "<table border=\"1\">\n";
echo "<tr><th bgcolor=\"#CCCCFF\">Order Date</th>
<th bgcolor=\"#CCCCFF\">Cherry</th>
<th bgcolor\"#CCCCFF\">Raspberry</th>
<th bgcolor\"#CCCCFF\">Watermelon</th>
<th bgcolor\"#CCCCFF\">Apple</th>
<th bgcolor\"#CCCCFF\">Blueraspberry</th>
<tr>";
for ($i=0; $i<$number_of_orders; $i++){
//split up each line
$line = explode("\t",$orders[$i]);
//keep only the number of items ordered
$line[1]=intval($line[1]);
$line[2]=intval($line[2]);
$line[3]=intval($line[3]);
$line[4]=intval($line[4]);
$line[5]=intval($line[5]);
//output each order
echo "<tr>
<td>".$line[0]."</td>
<td align=\"right\">".$line[1]."</td>
<td align=\"right\">".$line[2]."</td>
<td align=\"right\">".$line[3]."</td>
<td align=\"right\">".$line[4]."</td>
<td align=\"right\">".$line[5]."</td>;
<td>".$line[6]."</td>
</tr>";
}
echo "</table>";
?>
</body>
----
Server IP: 69.147.83.199
Probable Submitter: 96.2.105.93
----
Manual Page -- http://php.net/manual/en/debugger.php
Edit -- https://master.php.net/note/edit/111992
Del: integrated -- https://master.php.net/note/delete/111992/integrated
Del: useless -- https://master.php.net/note/delete/111992/useless
Del: bad code -- https://master.php.net/note/delete/111992/bad+code
Del: spam -- https://master.php.net/note/delete/111992/spam
Del: non-english -- https://master.php.net/note/delete/111992/non-english
Del: in docs -- https://master.php.net/note/delete/111992/in+docs
Del: other reasons-- https://master.php.net/note/delete/111992
Reject -- https://master.php.net/note/reject/111992
Search -- https://master.php.net/manage/user-notes.php