I do it like this:
(name of this page - form.php)
<?php
if ($_POST["CHECKFORM"]==1){
...
...
} else {
?>
<html>
<head>
<title>...</title>
</head>
<body>
<form action="form.php" method="POST">
<input type='text' value....>
<textarea value='somevalue'....>
<INPUT TYPE='HIDDEN' VALUE='1' NAME='CHECKFORM'>
<input type='submit' value...>
</form>
</body>
</html>
<?php
}
?>
so i have the form and the output in the same .php file, ¸first you get the form, when you click on the submit button, you get the output or whatever you like...
if you send the output of your form into some database you should consider using redirection to another/first page, so clicking several times on submit button takes no effect (else you'll get same outputs several times) but that wasn't really your question...
Main Topics
Browse All Topics





by: iamanindianPosted on 2005-07-10 at 08:59:27ID: 14407133
It goes like this: ---------- ---------- ---------- --------- ){
---------- ---------- ---------- ---------
(assuming the form is POST-ed with a form field named "accept")
--------------------------
if(isset($_POST['accept'])
}
--------------------------
WC