now to try to help the php question (and hopefully let the older people hear realize if they go help me that it might benefit them since i might be able to discover something that'll help them later)
instead of using html, use php.
here's an example:
Code: Select all
<?php
/* set all declarations needed here*/
/* start a session so that the form is not submitted multiple times */
if (isset($somevariable)&&($somevariable=='something')){
formprocessingfunction();
}else{
printform();
}
function printform(){
echo <<<<END
/* type form here */
END;}
function formprocessingfunction(){
echo <<<<END
/* type processed form here */
END;}
?>
note: each name in the form becomes a variable in php afterwods, but to make sure it's done right, i suggest using $_GET['name']; or $_POST['name']; to set the variables.
then use them in the second part, the processed form, so if the form is something like....
<form name="example" action="$SERVER[PHP_SELF]}" method="POST">
<input type="hidden" name="submitted" value="true">
<input type="text" name="name" size="20">
<input type="text" name="email" size="25">
<input type="submit"></form>
and the processing is something like ...
hey $name! thanks for coming! when we get more done we'll <a href="mailto:$email">mail you</a>
Code: Select all
<?php
/* set all declarations needed here*/
/* start a session so that the form is not submitted multiple times */
if (isset($somevariable)&&($somevariable=='something')){
formprocessingfunction();
}else{
printform();
}
function printform(){
echo <<<<END
<html><title>this is a test for you</title></head><body>
<form name="example" action="$SERVER[PHP_SELF]}" method="POST">
<input type="hidden" name="submitted" value="true">
<input type="text" name="name" size="20">
<input type="text" name="email" size="25">
<input type="submit"></form>
</body></html>
END;}
function formprocessingfunction(){
echo <<<<END
/* type processed form here */
END;}
?>