Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A form is like a container which handles transfer of data. The action attribute tells where your data will be sent.</p> <p>Here you got</p> <pre><code>&lt;form action="login.php" method="post"&gt; </code></pre> <p>Which means the form data will be sent to login.php page. Not what you want i think.</p> <p>Then, in the target page (defined by action attribute), you can get your parameters values in <code>$_GET</code> or <code>$_POST</code> arrays, depending of the method attribute of your form.</p> <p>I don't see any textbox in the code you gave us. If you add something like</p> <pre><code>&lt;input type="text" name="my_textbox"/&gt; </code></pre> <p>You will be able to get the value of the textbox in your target page by using </p> <pre><code>$_POST['my_textbox'] </code></pre> <p>Hope this helps.</p> <p>BTW, i notices some mistakes into your code : </p> <p>index.php : </p> <ol> <li>Style should be in a <code>&lt;head&gt;...&lt;/head&gt;</code> markup </li> <li>You should not have html output like your <code>&lt;h1&gt;</code> outside of your <code>&lt;body&gt;...&lt;/body&gt;</code> </li> <li>Tables headers (<code>&lt;th&gt;</code>) should be in a <code>&lt;tr&gt;</code> as <code>&lt;td&gt;</code> are.</li> </ol> <p>invoice.php : </p> <ol> <li>$allfood is not declared</li> <li>Better than <code>$qty= @$_POST['Quantity']['$i']</code> (@ removes errors), test if your key exists <code>(if isset($_POST['Quantity']) &amp;&amp; isset($_POST['Quantity'][$i]) $qty = $_POST['Quantity'][$i];</code></li> <li><code>if ($qty = 0)</code> should be <code>if ($qty == 0)</code> : <code>=</code> is affectation operator, <code>==</code> is comparison operator</li> <li>same thing for html, all your output should be in <code>&lt;body&gt;...&lt;/body&gt;</code> markups, and styles should be in an html header (<code>&lt;head&gt;...&lt;/head&gt;</code>)</li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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