Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Depending on the framework you're using (if one at all), just create a view for the order. You could either do this on another page or by loading a form via ajax. Either way, the form would look something like this:</p> <pre><code>&lt;?php if(isset($_POST['submit']) &amp;&amp; $_POST['submit'] == "Submit") { $database-&gt;update("orders",$_POST,$_POST['id']); } $order = $database-&gt;query( "select id, order_id, project_ref, supp_short_code, om_part_no, description, quantity, cost_of_items, cost_total from orders where id = ".$id); ?&gt; &lt;form method="post" action="&lt;?php echo basename($_SERVER['PHP_SELF']); ?&gt;"&gt; &lt;input type="text" name="id" value="&lt;?php echo $order['id']; ?&gt;"&gt; &lt;input type="text" name="order_id" value="&lt;?php echo $order['order_id']; ?&gt;"&gt; &lt;input type="text" name="project_ref" value="&lt;?php echo $order['project_ref']; ?&gt;"&gt; &lt;input type="text" name="supp_short_code" value="&lt;?php echo $order['supp_short_code']; ?&gt;"&gt; &lt;input type="text" name="om_part_no" value="&lt;?php echo $order['om_part_no']; ?&gt;"&gt; &lt;input type="text" name="description" value="&lt;?php echo $order['description']; ?&gt;"&gt; &lt;input type="text" name="quantity" value="&lt;?php echo $order['quantity']; ?&gt;"&gt; &lt;input type="text" name="cost_of_items" value="&lt;?php echo $order['cost_of_items']; ?&gt;"&gt; &lt;input type="text" name="cost_total" value="&lt;?php echo $order['cost_total']; ?&gt;"&gt; &lt;input type="submit" name="submit" value="Submit"&gt; &lt;/form&gt; </code></pre> <p>The code for the $database object is here:</p> <p><a href="http://www.jtgraphic.net/code/database-object/" rel="nofollow">http://www.jtgraphic.net/code/database-object/</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload