php-general Digest 30 Aug 2009 12:49:05 -0000 Issue 6313

2009-08-30 Thread php-general-digest-help

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 

[PHP] Re: After browser quit

2009-08-30 Thread O. Lavell
Wouter van Eekelen wrote:

 After a little search it seems to be possible to do that within php,
 see:
 
 http://nl.php.net/manual/en/function.register-shutdown-function.php
 
 This will call a function when the browser is stopped.

No, it will certainly not.

 Exactly what I needed! :) Thanks for your repsonse.

I don't understand what it is you are trying to achieve, could you 
explain? If you really need something (anything) to happen when a user 
closes the browser then a. your script is probably ill designed and b. it 
can NOT be done with PHP. Martie is right, you will have to look into 
Javascript. But only after you have asked yourself why? and came up 
with a really good answer ;)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Script sometimes not recognized as php

2009-08-30 Thread Rick Pasotto
I have several LAMP sites on my machine. Occasionally when accessing a
page the browser says the document is of unknown type and wants to know
what to do with it. I click on 'Cancel' and try the page again and this
time it works as it should.

Why would apache *sometimes* fail to interpret a php script as php?

-- 
The difficulties which I meet with in order to realize my existence are
precisely what awaken and mobilize my activities, my capacities.
Rick Pasottor...@niof.nethttp://www.niof.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] windows 5.2.10 PHP not working with phpinfo

2009-08-30 Thread Fred Silsbee
I got 5.3 working but found out there was no php_mssql.dll for it.
Somebody (who didn;t know) said I had to return to 5.2.8 but I found no 5.2.8 
so I am trying 5.2.10
_problem:
under IE8:
http://72.47.28.128:8080/phpinfo.php
with:
 ?php
   phpinfo();
 ?

I get :
The website cannot display the page 
HTTP 500  
   Most likely causes:
•The website is under maintenance.
•The website has a programming error. 
___

I installed :
php-5.2.10-Win32-VC6-x86.zip and put php.ini in C:\PHP and C:\PHP\ext
AND C:\WINDOWS, C:\WINDOWS\system and C:\WINDOWS\system32

I installed FastCGI 1.5 !

In php.ini I put :


cgi.force_redirect = 0  // for CGI

extension_dir =  C:\PHP\ext

commented out
;doc_root = C:\inetpub\wwwroot // for IIS/PWS
leaving
doc_root = 
_
IIS 5.1 properties-configuration I added .php  C:\PHP\php5ts.dll
GET,HEAD,POST,DEBUG

Maybe php-win.exe
_

I added to the XP Prof environment path ;C:\PHP\;C:\PHP\ext\

I created an environment variable (and rebooted) PHPRC = C:\PHP;C:\PHP\ext


I never found any statement of the necessity of requiring CGI

The instructions ramble around






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] how to exact mys database record?

2009-08-30 Thread ann kok
Hi

how to exact mys database record in virtual format?

Thank you


  __
Connect with friends from any web browser - no download required. Try the new 
Yahoo! Canada Messenger for the Web BETA at 
http://ca.messenger.yahoo.com/webmessengerpromo.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: windows 5.2.10 PHP not working with phpinfo

2009-08-30 Thread Ralph Deffke
use wamp 2 !!
http://www.wampserver.com/

no easier way under windows

ralph_def...@yahoo.de

Fred Silsbee fredsils...@yahoo.com wrote in message
news:43633.64942...@web59909.mail.ac4.yahoo.com...
I got 5.3 working but found out there was no php_mssql.dll for it.
Somebody (who didn;t know) said I had to return to 5.2.8 but I found no
5.2.8 so I am trying 5.2.10
_problem:
under IE8:
http://72.47.28.128:8080/phpinfo.php
with:
 ?php
   phpinfo();
 ?

I get :
The website cannot display the page
HTTP 500
   Most likely causes:
.The website is under maintenance.
.The website has a programming error.
___

I installed :
php-5.2.10-Win32-VC6-x86.zip and put php.ini in C:\PHP and C:\PHP\ext
AND C:\WINDOWS, C:\WINDOWS\system and C:\WINDOWS\system32

I installed FastCGI 1.5 !

In php.ini I put :


cgi.force_redirect = 0  // for CGI

extension_dir =  C:\PHP\ext

commented out
;doc_root = C:\inetpub\wwwroot // for IIS/PWS
leaving
doc_root =
_
IIS 5.1 properties-configuration I added .php  C:\PHP\php5ts.dll
GET,HEAD,POST,DEBUG

Maybe php-win.exe
_

I added to the XP Prof environment path ;C:\PHP\;C:\PHP\ext\

I created an environment variable (and rebooted) PHPRC = C:\PHP;C:\PHP\ext


I never found any statement of the necessity of requiring CGI

The instructions ramble around







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php