Placing a form on a page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear List -
I apologize if I offended some of you. I will see that it does not repeat.
I am trying to center a form on the top of a page. Here is the form:

<div id="frm">
<form   name="poster"  method="post"  action="">
<input type="text" name="cnum" hidden="hidden" ></input>
<input type='hidden' name='welcome_already_seen' value='already_seen'>
<?php
echo "<center><input type='submit' value='Validate Choice' /></center>";
echo "</form>";
?>
</div>


It is aligned on the p;age with the following css -
#frm{
position: fixed;
top: 5%;
left:42%;
}

It aligns perfectly with this form

function show_welcome()
{
$custnum     = isset($_REQUEST["Cust_Num"]) ? $_REQUEST["Cust_Num"] : "";
$first_name = isset($_REQUEST["Fname"])  ? $_REQUEST["Fname"] : "";
$last_name  = isset($_REQUEST["Lname"])  ? $_REQUEST["Lname"] : "";
$street     = isset($_REQUEST["Street"]) ? $_REQUEST["Street"] : "";
$city   = isset($_REQUEST['City']) ?   $_REQUEST['City'] : "";
$state   = isset($_REQUEST['State']) ?   $_REQUEST['State'] : "";
$zip   = isset($_REQUEST['Zip']) ?   $_REQUEST['Zip'] : "";
$phone      = isset($_REQUEST["Phone"])  ? $_REQUEST["Phone"] : "";
$date   = isset($_REQUEST['Date']) ?   $_REQUEST['Date'] : "";
$notes   = isset($_REQUEST['Notes']) ?   $_REQUEST['Notes'] : "";
$p1      = isset($_REQUEST['PH1']) ?   $_REQUEST['PH1'] : "";
$p2      = isset($_REQUEST['PH2']) ?   $_REQUEST['PH2'] : "";
$p3      = isset($_REQUEST['PH3']) ?   $_REQUEST['PH3'] : "";


echo "<br /><br />";
echo "<center>";
echo "<form  method=\"post\">";
echo " <strong>Customer Number:</strong> <input type='text' name='Cust_Num' value='$custnum' /></input><br /><br />"; echo " <strong>First Name:</strong> <input type=\"text\" name=\"Fname\" value='$first_name' />"; echo " <strong>Last Name:</strong> <input type=\"text\" name=\"Lname\" value='$last_name' /></input><br /><br />"; echo " <strong>Street: </strong><input type= 'text' name= 'Street' value='$street' /></input>"; echo " <strong>City: </strong><input type= 'text' name= 'City' value='$city' /></input>"; echo " <strong>State:</strong> <input type= 'text' size='2' maxlength='2' name= 'state' value='NY' /></input>&nbsp"; echo " <strong>Zip Code:</strong> <input type= 'text' size='5' maxlength='5' name= 'Zip' value='10952' /></input><br /><br />";
echo "</center>";
echo "<center>";
echo "<div  id='phn'> ";
echo " <strong>Phone:</strong> (<input type='text' size='3' maxlength='3' name='PH1' value='$p1'>)</input>"; echo "<input type='text' size='3' maxlength='3' name='PH2' value = '$p2'></input>"; echo "<input type='text' size='4' maxlength='4' name='PH3' value = '$p3'></input><br /><br />"; echo "<strong>Date:</strong><input type='text' size='10' maxlength='10' name='Date' value='$date' ></input><br /><br />";
echo " </center>";
// echo "</div>";
echo " <center>";
echo " <input type='submit'  /><br /><br />";
echo " &nbsp&nbsp&nbsp<input type='reset' value = 'Clear Form'  />";
echo " <input type='hidden' name='welcome_already_seen' value='already_seen'>";
echo " <input type='hidden' name='next_step' value='step2' />";
echo " </center>";
// goto step2;
?>
</form>


With this it is offset to the right.
echo "<center><strong>Do you wish to enter a Payment?</strong></center>";
echo "<form name='form2'  method='post'>";
echo "<center><strong>Name: $_SESSION[Lname] echo $_SESSION[Fname] </strong></center>";
echo "<center><input type='submit' name='button' value='YES' ></center>";
echo "<input type='hidden' name='welcome_already_seen' value='already_seen'>";
echo "<input type='hidden' name='next_step' value='step5' />";
echo "</form>";
echo "<center><strong>Do you wish to enter a Charge?</strong></center>";
echo "<form name='form1' method='post' >";
echo "<center><strong>Name: $_SESSION[Lname], $_SESSION[Fname]</strong></center>"; echo "<center><input type='submit' name='button' value='YES' onclick='ClearScren' ></center>"; echo "<input type='hidden' name='welcome_already_seen' value='already_seen'>";
echo "<input type='hidden' name='next_step' value='step6' />";
echo "</form>";
echo "<center><strong>Name: $_SESSION[Lname], $_SESSION[Fname]</strong></center>";
echo "<center><strong>Are you Finished for Now?</strong></center>";
echo "<form name='form1' action='exiter3.php' method='post' >";
// echo "<center><input type='submit' name='button' value='YES' ></center>";
echo "</form>";
I know that I am doing something wrong, but cannot figure out what it is.


Ethan


PS I know that the formatting of the above is an absolute disaster. Icedove defaults to 80 columns, and pure test does not allow me to change font size. If you could show me how, it would be appreciated.

Thanks

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux