Your template must contain a valid html form, and your text box is an element of that form. The Action of the form dictates where the vars are sent to.
Code:
<form action = "myhandler.php" method="post">
<p>
<label class="input1" for="text1">Familiy name</label>
<input id="text1" name="{$varname}" size="60" maxlength="60" class="required" />
</p>
<input type=submit />
</form>
myhandler.php
PHP Code:
<?php
if ( isset( $_POST['text1'])){
echo "now send an email with the message " . $_POST['text1'];
}
?>
*warning* there are no security checks shown in this code for brevity, nor filtering nor escaping - just to explain the basic principle.
You will need to check that both files are in the same directory for this to work as shown.
I trust this is what you meant by your question.
Bookmarks