for example, if you have a form and want to use it to send an email, the form would look something like this:
HTML Code:
<form name="mailForm" action="process.php" method="post">
<textarea name="message" value=""></textarea>
<input type="submit" value="Submit" />
</form>
this then sends the data from the textarea to process.php:
PHP Code:
<?php
$message = $_REQUEST['message'] ; // takes info sent from the form
$sent = mail('you@domain.com','subject here',$message,'From: Your Site'); // attempts to send message and stores result in variable $sent
if ( $sent ){ // if message send succeeds
echo '<h1>Message Sent Successfully!</h1>';
}
else{ // if message send fails
echo '<h1>Message Failed!</h1>';
}
?>
you can process your data however you want based on what you're trying to do, but thats how forms work.