|
-
March 23rd, 2007, 05:09 AM
#1
Please help me , Post Data & Store Data
Hi guys
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 Code:
<?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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|