I was wondering if it was right to use $_POST to get info from an html form.
If not what should be used instead?
Get info from a form
- EY
- Supporter
- Posts: 204
- Joined: 05 Nov 2006, 23:13
- Real name: Elias
- Location: Montreal [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Get info from a form
Never Say Never!
-
- Past Contributor
- Posts: 187
- Joined: 07 Oct 2006, 03:00
- Real name: Tyler
- Location: Wichita, Kansas
- Contact:
Re: Get info from a form
$_POST is fine. But ALWAYS sanitize your data anyways.
User Number 9e071a3a594a8964cbefe784f8a6afaa94c0de17
My MODs:
My MODs:
- Mr. Bond
- Member
- Posts: 89
- Joined: 30 Mar 2008, 20:34
- Real name: Bobby
- Location: 127.0.0.1 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Get info from a form
Shouldn't you use request_var() unless you are checking for submit
• •
-
- Past Contributor
- Posts: 187
- Joined: 07 Oct 2006, 03:00
- Real name: Tyler
- Location: Wichita, Kansas
- Contact:
Re: Get info from a form
If in phpBB, yes, he's right you should use request_var().
(Keep forgetting this isn't a general programming forum )
(Keep forgetting this isn't a general programming forum )
User Number 9e071a3a594a8964cbefe784f8a6afaa94c0de17
My MODs:
My MODs:
- EY
- Supporter
- Posts: 204
- Joined: 05 Nov 2006, 23:13
- Real name: Elias
- Location: Montreal [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Get info from a form
Can you please show me an example of how it should be used?
Never Say Never!
-
- Past Contributor
- Posts: 187
- Joined: 07 Oct 2006, 03:00
- Real name: Tyler
- Location: Wichita, Kansas
- Contact:
Re: Get info from a form
User Number 9e071a3a594a8964cbefe784f8a6afaa94c0de17
My MODs:
My MODs:
- Mr. Bond
- Member
- Posts: 89
- Joined: 30 Mar 2008, 20:34
- Real name: Bobby
- Location: 127.0.0.1 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Get info from a form
• •
- EY
- Supporter
- Posts: 204
- Joined: 05 Nov 2006, 23:13
- Real name: Elias
- Location: Montreal [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Get info from a form
Never Say Never!
- Lord Le Brand
- Website Team
- Posts: 223
- Joined: 08 Sep 2006, 15:44
- Real name: Leroy
- Location: Parkstad, Limburg, the Netherlands (GMT+1) [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
- EY
- Supporter
- Posts: 204
- Joined: 05 Nov 2006, 23:13
- Real name: Elias
- Location: Montreal [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Get info from a form
Never Say Never!
- Lord Le Brand
- Website Team
- Posts: 223
- Joined: 08 Sep 2006, 15:44
- Real name: Leroy
- Location: Parkstad, Limburg, the Netherlands (GMT+1) [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
- igorw
- Past Contributor
- Posts: 1967
- Joined: 01 Jun 2006, 20:48
- Real name: Igor [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Get info from a form
- we're poor!
Return to “phpBB Development discussion”
Who is online
Users browsing this forum: No registered users and 15 guests