PHP Form checkbox question
<p>I have a form that takes the following inputs:<br>
Name: IBM<br>
Surface(in m^2): 9<br>
Floor:      (Checkbox1)<br>
Phone:    (Checkbox2)<br>
Network:  (Checkbox3)<br>
Button to send to a next php page.  </p>

<p>All those values above are represented in a table when i press the submit button.<br>
The first two (name and surname) are properly displayed in the table.<br>
<strong>The problem is with the checkboxes.</strong>  If i select the first checkbox the value in the table should be presented with 1.  If its not selected the value in the table should be empty.  </p>

<pre><code> echo "&lt;td&gt;$Name&lt;/td&gt;"; // works properly
 echo "&lt;td&gt;$Surface&lt;/td&gt;"; // works properly
 echo "&lt;td&gt;....no idea for the checkboxes&lt;/td&gt;;
</code></pre>

<p>Some part of my php code with the variables:</p>

<pre><code>&lt;?php
if (!empty($_POST))
{
$name= $_POST["name"];
$surface= $_POST["surface"];
$floor= $_POST["floor"]; 
$phone= $_POST["telefoon"]; 
$network= $_POST["netwerk"]; 


if (is_numeric($surface)) 
{
    $_SESSION["name"]=$name;
    $_SESSION["surface"]=$surface;
    header("Location:ExpoOverzicht.php"); 
}
else 
{
    echo "&lt;h1&gt;Wrong input, Pleasee fill in again&lt;/h1&gt;";
}  

if(!empty($floor) &amp;&amp; ($phone) &amp;&amp; ($network))
{
    $_SESSION["floor"]=$floor;
    $_SESSION["phone"]=$phone;
    $_SESSION["network"]=$network;
    header("Location:ExpoOverzicht.php"); 
}    
}

?&gt;
</code></pre>

<p>Second page with table:</p>

<pre><code>&lt;?php

$name= $_SESSION["name"];
$surface= $_SESSION["surface"];
$floor= $_SESSION["floor"];
$phone= $_SESSION["phone"];
$network= $_SESSION["network"];

echo "&lt;table class=\"tableExpo\"&gt;";

echo "&lt;th&gt;name&lt;/th&gt;";
echo "&lt;th&gt;surface&lt;/th&gt;";
echo "&lt;th&gt;floor&lt;/th&gt;";
echo "&lt;th&gt;phone&lt;/th&gt;";
echo "&lt;th&gt;network&lt;/th&gt;";
echo "&lt;th&gt;total price&lt;/th&gt;";

for($i=0; $i &lt;= $_SESSION["name"]; $i++)
{
    echo "&lt;tr&gt;";

        echo "&lt;td&gt;$name&lt;/td&gt;"; // gives right output
        echo "&lt;td&gt;$surface&lt;/td&gt;"; // gives right output
        echo "&lt;td&gt;...&lt;/td&gt;"; //wrong output (ment for checkbox 1)
        echo "&lt;td&gt;...&lt;/td&gt;"; //wrong output (ment for checkbox 2)
        echo "&lt;td&gt;...&lt;/td&gt;"; //wrong output (ment for checkbox 3)
        echo "&lt;td&gt;....&lt;/td&gt;";

    echo "&lt;/tr&gt;;";
}
echo "&lt;/table&gt;";



&lt;form action="&lt;?php echo $_SERVER["PHP_SELF"]; ?&gt;" method="post" id="form1"&gt;
&lt;h1&gt;Vul de gegevens in&lt;/h1&gt;
&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;Name:&lt;/td&gt;
        &lt;td&gt;&lt;input type="text" name="name" size="18"/&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Surface(in m^2):&lt;/td&gt;
        &lt;td&gt;&lt;input type="text" name="surface" size="6"/&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Floor:&lt;/td&gt;
        &lt;td&gt;&lt;input type="checkbox" name="floor" value="floor"/&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Phone:&lt;/td&gt;
        &lt;td&gt;&lt;input type="checkbox" name="phone" value="phone"/&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Network:&lt;/td&gt;
        &lt;td&gt;&lt;input type="checkbox" name="network" value="network"/&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;input type="submit" name="verzenden" value="Verzenden"/&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>There might be a few spelling mistakes since i had to translate it.
Best regards.  </p>
