$form_flg = 0;
if ($_POST['test'] == 1) {
$form_flg =1;
}
if ($form_flg == 1) {
$sendmail;
$savetodatabase;
$form_flg = 0;
}
Here is the mail sending code. Here the flag maybe a hidden text field or a session. but when i first submit no problem but when i refresh the value will be set as you told but if the user wants to send another mail then the function will not be executed as the session or flag will be set..... any solution for this
thanks for the session idea