re:[PHP]Using PHP to process forms
| From: | Sean Kennedy | Date: | Tue, 13 Feb 2001 01:07:11 +0000 |
| Subject: | re:[PHP]Using PHP to process forms | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-39300@lists.php.net to get a copy of this message | ||
Does anyone have examples of using PHP to process forms? I'd also like
to know if I can embed the code in my html file or do I have to write a
CGI server side script to do it?
Thanks,
Don
--
<html>
<body>
<form action="your_phpscript.php" method="post">
What's your name
<input name="some_name" type="text">
<input type="submit">
</form>
</body>
</html>
When the submit button is pressed, the value of the some_name input field is
sent to your script. Your script can access it as a variable named
$some_name. Example...
<?php
echo ($some_name);
?>