Hi all,
I have a question, can you send both POST and GET parameters together to a page ?
I mean will it work, if I send a form with method=post, and I also include some ?param=value in the action field ?
waddaya think? is this allowed ?
Thanks,
Khayll
post, get parametrers together
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
- gite_ashish
- Forum Contributor
- Posts: 118
- Joined: Sat Aug 31, 2002 11:38 am
- Location: India
hi,
Yes, one can put the method=POST and also add the query string parameters.
on the server side if u check:
it will be:
Every thing as expected
Yes, one can put the method=POST and also add the query string parameters.
on the server side if u check:
Code: Select all
<?php
echo "method: " . $_SERVERї'REQUEST_METHOD'] . "<P>";
?>Even if we add query string parameters and if the method is POST.. the REQUEST_METHOD is posted as POST but; the query string paramaters are available in $_GET[] only not in the $_POST[].method: POST
Every thing as expected
Code: Select all
<form action="<?php echo $_SERVERї'PHP_SELF']; ?>"?action=send&userid=123" method="post">
<input type="text" name="text1">
<input type="submit" value="Send">
</form>