|
-
Dec 20th, 2006, 11:12 AM
#1
Thread Starter
Frenzied Member
Run a POST script
How do i make it so that i dont trigger a POST action on a page.
For example, i have a home page, that has links on it to other web pages of mine, one will be "update part", that page has a POST script in it, and for some reason it runs everytime i go to that page from another page, and i dont want it to.
I wanted the user to be able to go to the "update part" page, then hit a button to update a part, and thats when it will run the POST script.
Any ideas?
-
Dec 20th, 2006, 02:11 PM
#2
Re: Run a POST script
make sure the user is posting a form to it.
PHP Code:
<?php
//normal code stuff
if($_SERVER['REQUEST_METHOD'] == "POST"){
//anything in here will be executed upon posting to this script
}else{
//anything in here will only be executed if you are NOT posting to this script
}
?>
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
|