Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
[PHP]Check all POST's or GET's.[PHP]
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="NSA" data-source="post: 226825" data-attributes="member: 10034"><p>Hello.</p><p> </p><p>So, I'm going to start a new project and wanted to take some other techniques into hand when creating it.</p><p>Now, my project includes a lot of different POST and GET requests.</p><p>I was thinking, there must be a better way to check if they're set other than using:-</p><p>[PHP]if(isset($_POST['whatever']))</p><p>{</p><p> //Do something</p><p>}[/PHP]</p><p> </p><p>So, my question is, is there a better way?</p><p>It'd be nice to have something like an Array like...</p><p>[PHP]$requests = array("upload", "download", "photo", "video");[/PHP]</p><p>and just be able to check if the POST (or GET) contains either of those.</p><p> </p><p>Thanks in advance.</p></blockquote><p></p>
[QUOTE="NSA, post: 226825, member: 10034"] Hello. So, I'm going to start a new project and wanted to take some other techniques into hand when creating it. Now, my project includes a lot of different POST and GET requests. I was thinking, there must be a better way to check if they're set other than using:- [PHP]if(isset($_POST['whatever'])) { //Do something }[/PHP] So, my question is, is there a better way? It'd be nice to have something like an Array like... [PHP]$requests = array("upload", "download", "photo", "video");[/PHP] and just be able to check if the POST (or GET) contains either of those. Thanks in advance. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
[PHP]Check all POST's or GET's.[PHP]
Top