php-general Digest 13 Apr 2010 15:27:01 -0000 Issue 6690

2010-04-13 Thread php-general-digest-help
php-general Digest 13 Apr 2010 15:27:01 - Issue 6690 Topics (messages 304021 through 304030): Re: Mail Function Problem 304021 by: Karl DeSaulniers 304022 by: kranthi 304024 by: Ashley Sheridan 304025 by: Alice Wei 304026 by: Ashley Sheridan Re:

[PHP] Re: Solution

2010-04-13 Thread Nathan Rixham
Gary wrote: For those that were looking to see a solution [snip] If anybody really wants to know how to handle this, (it's not officially supported by PHP, but is in MySQL 5.1+, and I'm not condoning it) here's how you do it: ?php // enable C API support for multiple statement execution //

RE: [PHP] Mail Function Problem

2010-04-13 Thread Ashley Sheridan
On Mon, 2010-04-12 at 12:25 -0400, Alice Wei wrote: Date: Mon, 12 Apr 2010 11:09:42 -0500 From: k...@daleco.biz To: aj...@alumni.iu.edu CC: a.bovane...@gmail.com; php-general@lists.php.net Subject: Re: [PHP] Mail Function Problem Alice Wei wrote: Hi! You have the

RE: [PHP] Mail Function Problem

2010-04-13 Thread Alice Wei
Subject: RE: [PHP] Mail Function Problem From: a...@ashleysheridan.co.uk To: aj...@alumni.iu.edu CC: k...@daleco.biz; a.bovane...@gmail.com; php-general@lists.php.net Date: Tue, 13 Apr 2010 13:19:15 +0100 On Mon, 2010-04-12 at 12:25 -0400, Alice Wei wrote: Date: Mon, 12 Apr

RE: [PHP] Mail Function Problem

2010-04-13 Thread Ashley Sheridan
On Tue, 2010-04-13 at 08:59 -0400, Alice Wei wrote: Subject: RE: [PHP] Mail Function Problem From: a...@ashleysheridan.co.uk To: aj...@alumni.iu.edu CC: k...@daleco.biz; a.bovane...@gmail.com; php-general@lists.php.net Date: Tue, 13 Apr 2010 13:19:15 +0100 On Mon,

[PHP] Saving form data into session before leaving a page

2010-04-13 Thread Merlin Morgenstern
Hello everybody, I have form where users enter data to be saved in a db. How can I make php save the form data into a session before the user leaves the page without pressing the submit button? Some members leave the page and return afterwards wondering where their already entered data is.

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Peter Lind
On 13 April 2010 15:20, Merlin Morgenstern merli...@fastmail.fm wrote: Hello everybody, I have form where users enter data to be saved in a db. How can I make php save the form data into a session before the user leaves the page without pressing the submit button? Some members leave the page

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Ashley Sheridan
On Tue, 2010-04-13 at 15:20 +0200, Merlin Morgenstern wrote: Hello everybody, I have form where users enter data to be saved in a db. How can I make php save the form data into a session before the user leaves the page without pressing the submit button? Some members leave the page and

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Paul M Foster
On Tue, Apr 13, 2010 at 03:20:23PM +0200, Merlin Morgenstern wrote: Hello everybody, I have form where users enter data to be saved in a db. How can I make php save the form data into a session before the user leaves the page without pressing the submit button? Some members leave the page

[PHP] how to overload accessible methods

2010-04-13 Thread Ryan Sun
As we all know, __call() can overload non-accessible methods, eg. Class User { public function __call($name, $args) { //validate user $this-_validate(); $this-_{$name}($args); } private function _validate() { // } private

[PHP] Re: how to overload accessible methods

2010-04-13 Thread Nathan Rixham
Ryan Sun wrote: As we all know, __call() can overload non-accessible methods, eg. Class User { public function __call($name, $args) { //validate user $this-_validate(); $this-_{$name}($args); } private function _validate() {

[PHP] Re: how to overload accessible methods

2010-04-13 Thread Ryan Sun
I'm writing an abstract parent class which only contain a validate method, other developers will extend this class and add many new public methods, every new methods will need to perform a validate first. Won't it be good if validate get called automatically before every method call so that they

[PHP] Basic switch statement

2010-04-13 Thread steve_r
I'm new to programming, drive a truck in the day, now taking night courses to get a better job for my family. Please bear with me if this is a dumb question, I don't have much experience. I'm taking a night class in HTML and PHP and can't figure out a problem and can't find the answer in the

Re: [PHP] Re: how to overload accessible methods

2010-04-13 Thread Ashley Sheridan
On Tue, 2010-04-13 at 12:03 -0400, Ryan Sun wrote: I'm writing an abstract parent class which only contain a validate method, other developers will extend this class and add many new public methods, every new methods will need to perform a validate first. Won't it be good if validate get

Re: [PHP] Solution

2010-04-13 Thread tedd
At 6:04 PM -0400 4/12/10, Gary wrote: For those that were looking to see a solution, this is what I have come up with. It was pointed out on another board (MySQL) that inserting multiple in one script is probably prohibited because of security reasons. What I did was open the connection,

[PHP] Re: how to overload accessible methods

2010-04-13 Thread Nathan Rixham
Ryan Sun wrote: I'm writing an abstract parent class which only contain a validate method, other developers will extend this class and add many new public methods, every new methods will need to perform a validate first. Won't it be good if validate get called automatically before every

Re: [PHP] Basic switch statement

2010-04-13 Thread Ashley Sheridan
On Tue, 2010-04-13 at 12:04 -0400, steve_r wrote: I'm new to programming, drive a truck in the day, now taking night courses to get a better job for my family. Please bear with me if this is a dumb question, I don't have much experience. I'm taking a night class in HTML and PHP and can't

Re: [PHP] Basic switch statement

2010-04-13 Thread Robert Cummings
steve_r wrote: I'm new to programming, drive a truck in the day, now taking night courses to get a better job for my family. Please bear with me if this is a dumb question, I don't have much experience. I'm taking a night class in HTML and PHP and can't figure out a problem and can't find the

Re: [PHP] Basic switch statement

2010-04-13 Thread steve_r
Okay, I understand now, true/false is better, now it makes sense why it's always hitting the case it hits. Thank you Ashley.

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread tedd
At 11:27 AM -0400 4/13/10, Paul M Foster wrote: On Tue, Apr 13, 2010 at 03:20:23PM +0200, Merlin Morgenstern wrote: Hello everybody, I have form where users enter data to be saved in a db. How can I make php save the form data into a session before the user leaves the page without

[PHP] Re: how to overload accessible methods

2010-04-13 Thread Ryan Sun
this is a class for corntab job, and the validation is very simple, just check if the status of user is active when cron job runs, if not, throws an exception, other developers won't want to overwrite this validation. which method of user class will be called is configurable via website backed

Re: [PHP] Solution

2010-04-13 Thread Gary
://earthstones.com __ Information from ESET Smart Security, version of virus signature database 5025 (20100413) __ The message was checked by ESET Smart Security. http://www.eset.com __ Information from ESET Smart Security, version of virus signature database

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Kevin Kinsey
Paul M Foster wrote: Sorry, I just get cranky with people who won't follow the rules. ?php $pauls_post++; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Dan Joseph
On Tue, Apr 13, 2010 at 12:19 PM, tedd tedd.sperl...@gmail.com wrote: So, OP explain what you are trying to do? Cheers, tedd Sorta looks to me like he's in a situation where users are fleeing the form, and wondering why its not filled in when they go back. The natural reaction for this

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Robert Cummings
Dan Joseph wrote: On Tue, Apr 13, 2010 at 12:19 PM, tedd tedd.sperl...@gmail.com wrote: So, OP explain what you are trying to do? Cheers, tedd Sorta looks to me like he's in a situation where users are fleeing the form, and wondering why its not filled in when they go back. The natural

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Dan Joseph
On Tue, Apr 13, 2010 at 12:40 PM, Robert Cummings rob...@interjinn.comwrote I had a pair-a-dimes one time. Unfortunately I was a nickel short of a quarter to put in the slot. But the question is... were they outside the box? -- -Dan Joseph www.canishosting.com - Unlimited Hosting Plans

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Kevin Kinsey
Dan Joseph wrote: On Tue, Apr 13, 2010 at 12:40 PM, Robert Cummings rob...@interjinn.comwrote I had a pair-a-dimes one time. Unfortunately I was a nickel short of a quarter to put in the slot. But the question is... were they outside the box? Nah, the question is, since the slot was

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Dan Joseph
On Tue, Apr 13, 2010 at 12:48 PM, Kevin Kinsey k...@daleco.biz wrote: Nah, the question is, since the slot was intended to accept a quarter, why the heck didn't it take two dimes and a nickel ... or just two dimes, and throw a nickel in gratis? I must be getting old. We have toilets that

Re: [PHP] Basic switch statement

2010-04-13 Thread tedd
At 12:04 PM -0400 4/13/10, steve_r wrote: I'm new to programming, drive a truck in the day, now taking night courses to get a better job for my family. Please bear with me if this is a dumb question, I don't have much experience. -snip- Sorry for the basic question. Steve Reilly Steve:

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Paul M Foster
On Tue, Apr 13, 2010 at 12:36:02PM -0400, Dan Joseph wrote: snip I kinda like that word Paradigm. Rolls off the tongue nicely. I'm going to use it 3 times today before I leave the office. ROTFL! Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread tedd
At 12:40 PM -0400 4/13/10, Robert Cummings wrote: Dan Joseph wrote: On Tue, Apr 13, 2010 at 12:19 PM, tedd tedd.sperl...@gmail.com wrote: So, OP explain what you are trying to do? Cheers, tedd Sorta looks to me like he's in a situation where users are fleeing the form, and wondering why

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Robert Cummings
Dan Joseph wrote: On Tue, Apr 13, 2010 at 12:40 PM, Robert Cummings rob...@interjinn.comwrote I had a pair-a-dimes one time. Unfortunately I was a nickel short of a quarter to put in the slot. But the question is... were they outside the box? They were in my pocket... so yes! Cheers,

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Robert Cummings
Kevin Kinsey wrote: Dan Joseph wrote: On Tue, Apr 13, 2010 at 12:40 PM, Robert Cummings rob...@interjinn.comwrote I had a pair-a-dimes one time. Unfortunately I was a nickel short of a quarter to put in the slot. But the question is... were they outside the box? Nah, the question is, since

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Robert Cummings
tedd wrote: At 12:40 PM -0400 4/13/10, Robert Cummings wrote: Dan Joseph wrote: On Tue, Apr 13, 2010 at 12:19 PM, tedd tedd.sperl...@gmail.com wrote: So, OP explain what you are trying to do? Cheers, tedd Sorta looks to me like he's in a situation where users are fleeing the form, and

Re: [PHP] Solution

2010-04-13 Thread Jim Lucas
tedd wrote: I don't see any reason to separate the attributes of the person into two different tables. Why do that? tedd, Funny you ask this. I have always thought the same thing. Then just last week I started listing to the Zend Dev Zone podcasts. I came across this one and thought it

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Dan Joseph
On Tue, Apr 13, 2010 at 1:46 PM, Robert Cummings rob...@interjinn.comwrote: Toilets flush themselves so that we don't need to touch what someone else touched... very likely after *cough* wiping up. They have a cure for having to life a finger and wipe also but I won't continue lol --

Re: [PHP] Solution

2010-04-13 Thread tedd
At 12:26 PM -0400 4/13/10, Gary wrote: Tedd I had four tables. name, (fname, lname) address(street, town, state, zip), contact(phone, fax, email), comments (comments). It was done this way because it is strictly a learning exercise. I had never created a DB with multiple tables, so I wanted

Re: [PHP] Solution

2010-04-13 Thread Gary
, version of virus signature database 5023 (20100412) __ The message was checked by ESET Smart Security. http://www.eset.com __ Information from ESET Smart Security, version of virus signature database 5026 (20100413) __ The message was checked by ESET Smart

Re: [PHP] Solution

2010-04-13 Thread Andrew Ballard
On Tue, Apr 13, 2010 at 2:50 PM, tedd tedd.sperl...@gmail.com wrote: For example, a user has name, address, height, weight, color, language, etc. Those things can be listed in a single table. And now for the universal DBA answer - it depends. There are cases where that information needs to be

Re: [PHP] Solution

2010-04-13 Thread Jim Lucas
Karl DeSaulniers wrote: Hey Gary, instead try something like this maybe? $dbc=mysqli_connect('localhost','root','','test') or die('Error connecting to MySQL server'); $query_name=INSERT INTO name(fname='$fname', lname='$lname'); $query_address=INSERT INTO address (street='$street',

Re: [PHP] Solution

2010-04-13 Thread Jim Lucas
Andrew Ballard wrote: On Tue, Apr 13, 2010 at 2:50 PM, tedd tedd.sperl...@gmail.com wrote: For example, a user has name, address, height, weight, color, language, etc. Those things can be listed in a single table. And now for the universal DBA answer - it depends. There are cases where that

Re: [PHP] Solution

2010-04-13 Thread tedd
At 3:09 PM -0400 4/13/10, Andrew Ballard wrote: On Tue, Apr 13, 2010 at 2:50 PM, tedd tedd.sperl...@gmail.com wrote: For example, a user has name, address, height, weight, color, language, etc. Those things can be listed in a single table. And now for the universal DBA answer - it depends.

Re: [PHP] Solution

2010-04-13 Thread Karl DeSaulniers
My mistake. You are correct. Karl On Apr 13, 2010, at 2:16 PM, Jim Lucas wrote: Karl DeSaulniers wrote: Hey Gary, instead try something like this maybe? $dbc=mysqli_connect('localhost','root','','test') or die('Error connecting to MySQL server'); $query_name=INSERT INTO

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Peter Lind
On 13 April 2010 17:27, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Apr 13, 2010 at 03:20:23PM +0200, Merlin Morgenstern wrote: Hello everybody, I have form where users enter data to be saved in a db. How can I make php save the form data into a session before the user leaves the

Re: [PHP] Basic switch statement

2010-04-13 Thread Nathan Rixham
Robert Cummings wrote: steve_r wrote: I'm new to programming, drive a truck in the day, now taking night courses to get a better job for my family. Please bear with me if this is a dumb question, I don't have much experience. I'm taking a night class in HTML and PHP and can't figure out a

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Nathan Rixham
Peter Lind wrote: On 13 April 2010 17:27, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Apr 13, 2010 at 03:20:23PM +0200, Merlin Morgenstern wrote: Hello everybody, I have form where users enter data to be saved in a db. How can I make php save the form data into a session before

Re: [PHP] Basic switch statement

2010-04-13 Thread Robert Cummings
Nathan Rixham wrote: Robert Cummings wrote: steve_r wrote: I'm new to programming, drive a truck in the day, now taking night courses to get a better job for my family. Please bear with me if this is a dumb question, I don't have much experience. I'm taking a night class in HTML and PHP and

Re: [PHP] Basic switch statement

2010-04-13 Thread Nathan Rixham
Robert Cummings wrote: Nathan Rixham wrote: Robert Cummings wrote: steve_r wrote: I'm new to programming, drive a truck in the day, now taking night courses to get a better job for my family. Please bear with me if this is a dumb question, I don't have much experience. I'm taking a

Re: [PHP] Basic switch statement

2010-04-13 Thread Robert Cummings
Nathan Rixham wrote: Robert Cummings wrote: Nathan Rixham wrote: Robert Cummings wrote: steve_r wrote: I'm new to programming, drive a truck in the day, now taking night courses to get a better job for my family. Please bear with me if this is a dumb question, I don't have much experience.

Re: [PHP] Basic switch statement

2010-04-13 Thread Nathan Rixham
Robert Cummings wrote: Nathan Rixham wrote: Robert Cummings wrote: Nathan Rixham wrote: Robert Cummings wrote: steve_r wrote: I'm new to programming function check_it2($val) { echo gettype($val); switch($val) { case($val 0 ): echo Switch greater than 0;

Re: [PHP] Basic switch statement

2010-04-13 Thread Robert Cummings
Nathan Rixham wrote: Robert Cummings wrote: Nathan Rixham wrote: Robert Cummings wrote: Nathan Rixham wrote: Robert Cummings wrote: steve_r wrote: I'm new to programming function check_it2($val) { echo gettype($val); switch($val) { case($val 0 ): echo Switch

Re: [PHP] Basic switch statement

2010-04-13 Thread Nathan Rixham
Robert Cummings wrote: Nathan Rixham wrote: Robert Cummings wrote: Nathan Rixham wrote: Robert Cummings wrote: Nathan Rixham wrote: Robert Cummings wrote: steve_r wrote: I'm new to programming function check_it2($val) { echo gettype($val); switch($val) { case($val 0

[PHP] Re: would there be an interest in having htmlMicroscope include dygraphs?

2010-04-13 Thread Rene Veerman
On Wed, Apr 14, 2010 at 1:19 AM, Rene Veerman rene7...@gmail.com wrote: htmlMicroscope (that i wrote and opensourced) can be used to look at very big arrays easilly in a browser. I fully intend to fix the final bugs and release a real 1.3.0 release, and not abandon that project.. In fact, i

[PHP] would there be an interest in having htmlMicroscope include dygraphs?

2010-04-13 Thread Rene Veerman
htmlMicroscope (that i wrote and opensourced) can be used to look at very big arrays easilly in a browser. I fully intend to fix the final bugs and release a real 1.3.0 release, and not abandon that project.. In fact, i could use a simple project to work on atm, to re-focus myself on useful work

[PHP] Re: would there be an interest in having htmlMicroscope include dygraphs?

2010-04-13 Thread Rene Veerman
On Wed, Apr 14, 2010 at 1:23 AM, Rene Veerman rene7...@gmail.com wrote: On Wed, Apr 14, 2010 at 1:19 AM, Rene Veerman rene7...@gmail.com wrote: htmlMicroscope (that i wrote and opensourced) can be used to look at very big arrays easilly in a browser. I fully intend to fix the final bugs and

[PHP] Re: would there be an interest in having htmlMicroscope include dygraphs?

2010-04-13 Thread Rene Veerman
On Wed, Apr 14, 2010 at 1:44 AM, Rene Veerman rene7...@gmail.com wrote: On Wed, Apr 14, 2010 at 1:23 AM, Rene Veerman rene7...@gmail.com wrote: On Wed, Apr 14, 2010 at 1:19 AM, Rene Veerman rene7...@gmail.com wrote: htmlMicroscope (that i wrote and opensourced) can be used to look at very big

[PHP] Array differences

2010-04-13 Thread Ashley M. Kirchner
I have the following scenario: $array1 = array(12, 34, 56, 78, 90); $array2 = array(12, 23, 56, 78, 89); $result = array_diff($array1, $array2); print_r($result); This returns: Array ( [1] = 34 [4] = 90 )

Re: [PHP] Array differences

2010-04-13 Thread Rene Veerman
On Wed, Apr 14, 2010 at 7:01 AM, Ashley M. Kirchner ash...@pcraft.com wrote: I have the following scenario:     $array1 = array(12, 34, 56, 78, 90);     $array2 = array(12, 23, 56, 78, 89);     $result = array_diff($array1, $array2);     print_r($result); This returns:    

[PHP] problems with feature '--with-pdo-oci' RPM (spec)

2010-04-13 Thread Raul da Silva {Sp4wn}
Hi, Good morning for all, I'd like to understand why when i try to install the package 'php52-pdo-oci' generated by 'rpmbuild -ba php52.spec' with feature inside of file , doesn't work and returns the follow error : # rpm -qpl /usr/src/linux/RPMS/x86_64/php52-pdo-oci-5.2.12-2.fc11.x86_64.rpm

Re: [PHP] Saving form data into session before leaving a page

2010-04-13 Thread Lester Caine
Nathan Rixham wrote: Peter Lind wrote: On 13 April 2010 17:27, Paul M Fosterpa...@quillandmouse.com wrote: On Tue, Apr 13, 2010 at 03:20:23PM +0200, Merlin Morgenstern wrote: Hello everybody, I have form where users enter data to be saved in a db. How can I make php save the form data