I don't want to start a tangent here, but the most accepted way for
generating HTML with PHP is to NOT generate HTML with PHP.  Thus, the
original code should be written like this:


:: BEGIN input.html ::
<div style="position: relative; text-align: center;">
 <form method="post" action="name.php">
  <input type="text" name="lastname" size="75">
  <input type="submit" name = "submit" value="Search for Last Name">
 </form>
</p>
:: END input.html ::

:: BEGIN name.php ::
<?
/*
 * HTTP_POST variables from form:
 * 1) $lastname
 *
 * Access them with:
 * 1) $HTTP_POST_VARS["lastname"]
 */
?>
<p>
You searched for <b><?= $HTTP_POST_VARS["lastname"] ?></b> and something
happened.
</p>
:: END name.php ::


As far as the POST/GET question, you technically can use POST and GET
methods simultaneously, but it's nasty.  For best results, stay away from
the register_globals functionality and use $HTTP_POST_VARS[] and
$HTTP_GET_VARS[] instead.

Last thing:
Go to WeSellBooksByTheMillions and buy a good PHP book for reference.  They
have lots of basics like this in them.  I prefer most anything from Wrox
Press (http://www.wrox.com/)

chris


     - - - - - - -  Appended by Scientific-Atlanta, Inc.  - - - - - - -  
This e-mail and any attachments may contain information which is confidential, 
proprietary, privileged or otherwise protected by law. The information is solely 
intended for the named addressee (or a person responsible for delivering it to the 
addressee). If you are not the intended recipient of this message, you are not 
authorized to read, print, retain, copy or disseminate this message or any part of it. 
If you have received this e-mail in error, please notify the sender immediately by 
return e-mail and delete it from your computer. 

Reply via email to