php-general Digest 30 Aug 2009 12:49:05 - Issue 6313
Topics (messages 297473 through 297493):
Re: Best way to test for form submission?
297473 by: tedd
297474 by: tedd
297476 by: Robert Cummings
297477 by: Tom Worster
Re: Date Comparison
297475 by: tedd
Re: Login should not allow users to login if the application is logged in with
the same login credentials
297478 by: John Pillion
starting session with AJAX
297479 by: John Pillion
297482 by: John Pillion
297483 by: John Pillion
Re: user permissions
297480 by: John Pillion
297481 by: John Pillion
Re: PHP Crash in file_get_contents
297484 by: Ralph Deffke
Re: Converting URL's to hyperlinks.
297485 by: Nisse Engström
297487 by: LinuxManMikeC
297489 by: Nisse Engström
297490 by: LinuxManMikeC
297491 by: Nisse Engström
What is the best way to process live data?
297486 by: Paul Halliday
297488 by: LinuxManMikeC
OpenCart
297492 by: HallMarc Websites
Re: After browser quit
297493 by: O. Lavell
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
--
---BeginMessage---
At 5:51 PM +0100 8/28/09, Ashley Sheridan wrote:
I usually just
tend to use the $_REQUEST array instead of $_POST or $_GET. You get the
benefit of being able to work with both arrays (as well as $_SESSION and
$_COOKIE) without any drawbacks.
Thanks,
Ash
Ash:
Drawbacks are funny things.
Not knowing where my data originated ($_GET, $_POST, or $_COOKIE) and
having the possibility of what I was expecting overridden in a
$_REQUEST is what I would call a drawback.
Cheers,
tedd
--
---
http://sperling.com http://ancientstones.com http://earthstones.com
---End Message---
---BeginMessage---
At 1:18 AM -0700 8/29/09, Warren Vail wrote:
To test a form I usually send the form contents to a php file that contains
the following;
foreach($_POST as $nm = $val) echo _POST[.$nm.] [.$val.]br;
foreach($_GET as $nm = $val) echo _GET[.$nm.] [.$val.]br;
Checkboxes and radio buttons only send their value if the control is
checked.
That's correct, here's the way I solve both types:
http://php1.net/b/form-radio
http://php1.net/b/form-radio1
http://php1.net/b/form-checkbox/
http://php1.net/b/form-checkbox1/
Cheers,
tedd
--
---
http://sperling.com http://ancientstones.com http://earthstones.com
---End Message---
---BeginMessage---
Warren Vail wrote:
To test a form I usually send the form contents to a php file that contains
the following;
foreach($_POST as $nm = $val) echo _POST[.$nm.] [.$val.]br;
foreach($_GET as $nm = $val) echo _GET[.$nm.] [.$val.]br;
Checkboxes and radio buttons only send their value if the control is
checked.
You can have multiple submit buttons (type=submit) on a form, but you
should assign them different name parameters to recognize which one is
clicked (any one of them will cause the form to be submitted, but the only
one that will establish a $_POST entry named submit is the submit control
that is named submit (name=submit).
I would suggest NOT naming any field submit. There will come a time when
you will want to do form.submit() in JavaScript and you will find it
broken in one of the browsers. I'm not sure which, but one of them
breaks if you have named a field submit. As a result I always use
continue instead :)
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
---End Message---
---BeginMessage---
On 8/29/09 9:29 AM, tedd tedd.sperl...@gmail.com wrote:
At 1:18 AM -0700 8/29/09, Warren Vail wrote:
To test a form I usually send the form contents to a php file that contains
the following;
foreach($_POST as $nm = $val) echo _POST[.$nm.] [.$val.]br;
foreach($_GET as $nm = $val) echo _GET[.$nm.] [.$val.]br;
Checkboxes and radio buttons only send their value if the control is
checked.
That's correct, here's the way I solve both types:
http://php1.net/b/form-radio
http://php1.net/b/form-radio1
http://php1.net/b/form-checkbox/
http://php1.net/b/form-checkbox1/
warren's test script above doesn't work so well with tedd's scheme for
naming radios checkboxs. tedd uses name=option[] in the markup so in
warren's script, when $nm is 'option', $val will be an array so it won't
convert to a string in .$val..
---End Message---
---BeginMessage---
At 1:01 PM -0400 8/28/09, David Stoltz wrote:
Hey Stuart -
RTFM yourselfI did read it, and obviously misunderstood...
I'm really sorry to bother you. I thought that was what a listserv
like this was for - to ask questions...
I'll try not to ask questions I should know the answer to next time.
Whoa