[PHP] Form wont show

Joined
Nov 6, 2007
Messages
880
Reaction score
11
ok the problem is, once continue to purchase is clicked it does not display the contact infomration bit. Any help

PHP:
<?php
$username = $_POST['name'];
$quanity = $_POST['Kegel_quantity'];
$qk = $_POST['qk'];
$ql = $_POST['ql'];
?>
<form action="in.php" method="POST" name="">
        <div align="center">
            Name: <input type="text" size="10" maxlength="40" name="name"> <br />
       Quanity of Kegel: <input type="number" size="10" maxlength="40" name="qk"> 
<select name="kegel">
<option>Kegel</option>
<option>Kegel Spring</option>
</select>
<br />
       Quanity of lube: <input type="number" size="10" maxlength="40" name="ql"> 
<select name="luve">
<option>Sweet Cherry</option>
<option>Astroglide</option>
<option>K-Y Jelly</option>
<option>Wet Light</option>
<option>ID Pleasure</option>
</select>
  
               <br />
 <?php
if(isset($_POST['submit']))
{
    $price = $qk * $ql;
?>
<? echo "$qk"; ?> items  of Kegel
<br />
<? echo "$ql"; ?> items  of Lube
<br />
The price will be <? echo "$price"; ?>
<br />
</b>
<input type="submit" name="purchase" value="Continue to purchase!">
<?php

if(isset($_POST['purchase']))
{
?>
<br />
 Name: <input type="text" size="10" maxlength="40" name="name"> 

Last Name: <input type="text" size="10" maxlength="40" name="name"> <br />
Country: <input type="text" size="10" maxlength="40" name="name"> <br />
Sate/Providence: <input type="text" size="10" maxlength="40" name="name"> <br />
City: <input type="text" size="10" maxlength="40" name="name"> <br />
Zip Code: <input type="text" size="10" maxlength="40" name="name"> <br />
Street Adress: <input type="text" size="10" maxlength="40" name="name"> <br />
<?php
}
} else {
?>
              <input type="submit" name="submit" value="Submit the Order!">
              </form>
<?php
}
?>
 
Wow your script is confusing. It's all over the place. Try separating the form away from the php script.
it confused me so much.
 
You could use like
This is for your Form after they click on the submit button :)
PHP:
echo "<br />
 Name: <input type='text' size='10' maxlength='40' name='name'> 

Last Name: <input type='text' size='10' maxlength='40' name='name'> <br />
Country: <input type='text' size='10' maxlength='40' name='name'> <br />
Sate/Providence: <input type='text' size='10' maxlength='40' name='name'> <br />
City: <input type='text' size='10' maxlength='40' name='name'> <br />
Zip Code: <input type='text' size='10' maxlength='40' name='name'> <br />
Street Adress: <input type='text' size='10' maxlength='40' name='name'> <br />";

Hope you understand this :)
 
You could use like
This is for your Form after they click on the submit button :)
PHP:
echo "<br />
 Name: <input type='text' size='10' maxlength='40' name='name'> 

Last Name: <input type='text' size='10' maxlength='40' name='name'> <br />
Country: <input type='text' size='10' maxlength='40' name='name'> <br />
Sate/Providence: <input type='text' size='10' maxlength='40' name='name'> <br />
City: <input type='text' size='10' maxlength='40' name='name'> <br />
Zip Code: <input type='text' size='10' maxlength='40' name='name'> <br />
Street Adress: <input type='text' size='10' maxlength='40' name='name'> <br />";
Hope you understand this :)
ah brilliant lol, using ' instead of the closing " thank you mate
 
Back