Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't put PHP form in a table
    primarykey
    data
    text
    <p>I've created a form which works fine, but when I put it in a table it always thinks the form is incomplete - is there a way I can put it in a table (so it looks nice!) without this problem?</p> <p>-----My HTML------</p> <pre><code>&lt;h2 class="green"&gt;Interested in making life easier?&lt;/h2&gt; &lt;form method="post" action="sendemail.php"&gt; &lt;?php $ipi = getenv("REMOTE_ADDR"); $httprefi = getenv ("HTTP_REFERER"); $httpagenti = getenv ("HTTP_USER_AGENT"); ?&gt; &lt;input type="hidden" name="ip" value="&lt;?php echo $ipi ?&gt;" /&gt; &lt;input type="hidden" name="httpref" value="&lt;?php echo $httprefi ?&gt;" /&gt; &lt;input type="hidden" name="httpagent" value="&lt;?php echo $httpagenti ?&gt;" /&gt; Name: &lt;input type="text" name="visitor" size="25" /&gt; &lt;br /&gt; Address:&lt;input type="text" name="visitoradd" size="25" /&gt; &lt;br /&gt; City:&lt;input type="text" name="visitorcity" size="15" /&gt; &lt;br /&gt; Postcode:&lt;input type="text" name="visitorpost" size="15" /&gt; &lt;br /&gt; Email:&lt;input type="text" name="visitormail" size="25" /&gt; &lt;br /&gt; Telephone Number:&lt;input type="text" name="visitortel" size="25" /&gt; &lt;br /&gt; Bookkeeping/Payroll:&lt;select name="bp" size="1"&gt; &lt;option value=" Bookkeeping"&gt;Bookkeeping &lt;/option&gt; &lt;option value=" Payroll "&gt;Payroll&lt;/option&gt; &lt;/select&gt; &lt;br /&gt; Number of transactions: &lt;input type="text" name="transcations" size="15" /&gt; &lt;br /&gt; Number of employees:&lt;input type="text" name="employees" size="15" /&gt; &lt;br /&gt; Payroll weekly/monthly:&lt;select name="pmw" size="1"&gt; &lt;option value=" Weekly"&gt;Weekly&lt;/option&gt; &lt;option value=" Monthly"&gt;Monthly&lt;/option&gt; &lt;/select&gt; &lt;br /&gt; &lt;br /&gt; &lt;INPUT TYPE="image" SRC="images/btnSubmit.png" ALT="Submit Form"&gt; &lt;br /&gt; &lt;/form&gt; </code></pre> <p>-----My PHP-----</p> <pre><code>&lt;?php $visitor = $_POST['visitor']; $visitoradd = $_POST['visitoradd']; $visitorcity= $_POST['visitorcity']; $visitorpost= $_POST['visitorpost']; $visitormail = $_POST['visitormail']; $visitortel = $_POST['visitortel']; $bp = $_POST['bp']; $transcations = $_POST['transcations']; $employees = $_POST['employees']; $pmw = $_POST['pmw']; if(!$visitormail == "" &amp;&amp; (!strstr($visitormail,"@") || !strstr($visitormail,"."))) { echo "&lt;h2&gt;Please enter valid e-mail.&lt;/h2&gt;\n"; $badinput = "&lt;h2&gt;Click the back button to retry.&lt;/h2&gt;\n"; echo $badinput; die ("Thank you."); } if(empty($visitor) || empty($visitormail) || empty($visitorcity) || empty($visitorpost) || empty($visitoradd) || empty($visitortel) || empty($bp) || empty($transcations) || empty($employees) || empty($pmw) || empty($pmw)) { echo "&lt;h2&gt;Please fill in all fields, click the back button to retry&lt;/h2&gt;\n"; die ("Thank you."); } $message = " Name: $visitor\n Address: $visitoradd\n City: $visitorcity\n Post Code: $visitorpost\n Email: $visitormail\n Phone Number: $visitortel\n Bookkeeping/Payroll: $bp\n Number of Transactions: $transcations\n Number Of Employees: $employees\n Payroll Weekly/Monthly: $pmw\n" ; $subject = "Payment Details"; mail("contact@email.com",$subject,$message,$visitormail); ?&gt; &lt;p align="center"&gt; &lt;br /&gt; Thank You : &lt;?php echo $visitor ?&gt; ( &lt;?php echo $visitormail ?&gt; ) &lt;br /&gt; &lt;br /&gt; &lt;a href="home.php"&gt;Click here to Finish&lt;/a&gt; &lt;/p&gt; </code></pre>
    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.
 

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