want to make a form with 2 actions, means by 1 click 2 actions performs and I do not want to use PHP_SELF, because the first action address is the main target and the second one is to store data
its my code but it doesn't store data in "test.txt" just posts to "http://mysite.com/11.php"
<?php
$st = "
<form action='http://mysite.com/11.php' method='post'>
Name: <input type='text' name='name' />
Age: <input type='text' name='age' />
<input type='submit' />
</form>
";
echo $st;
$name = stripslashes($name);
$age = stripslashes($age);
$logs = fopen('test.txt', 'a', 1);
$mytext="
$name , $age ";
fwrite($logs, $mytext);
fclose($logs);
?>
Thanks

New Topic/Question
Reply




MultiQuote





|