The code I am using now is
<form name="form" method="post">
Codeword: <input type="text" name="text_box" size="50"/>
<input type="submit" id="search-submit" value="submit" />
<?
$a=@$_POST["text_box"];
$myFile = "t.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
fwrite($fh,$a);
fclose($fh);
?>
I would like to email myself this codeword, when a user submits. Is this possible?
Pretty basic stuff! Use the php
mail()
function to send an email to yourself._
Replace "email" with your email and "Siddharth Jain" with the name you need to display in that email.