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 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 u

[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 /et

Re: [PHP] Array differences

2010-04-13 Thread Rene Veerman
On Wed, Apr 14, 2010 at 7:01 AM, Ashley M. Kirchner 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); > > > > >

[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

[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 wrote: > On Wed, Apr 14, 2010 at 1:23 AM, Rene Veerman wrote: >> On Wed, Apr 14, 2010 at 1:19 AM, Rene Veerman wrote: >>> htmlMicroscope (that i wrote and opensourced) can be used to look at >>> very big arrays easilly in a browser. >>> I fully inten

[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 wrote: > On Wed, Apr 14, 2010 at 1:19 AM, Rene Veerman 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, >>

[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 a

[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 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 could use a s

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

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: > steve_r wrote: >> I'm new to programming >> >> function check_it2($val) { >> echo gettype($val); >> switch($val) { >> case($val

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: >>> 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 experi

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 c

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 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 us

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 f

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 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 witho

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 name(fname='$fname

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 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 th

Re: [PHP] Solution

2010-04-13 Thread Jim Lucas
Andrew Ballard wrote: > On Tue, Apr 13, 2010 at 2:50 PM, tedd 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 nee

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='$str

Re: [PHP] Solution

2010-04-13 Thread Andrew Ballard
On Tue, Apr 13, 2010 at 2:50 PM, tedd 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 normalized to another t

Re: [PHP] Solution

2010-04-13 Thread Gary
, town, state, >> zip)"."VALUES('$street','$town','$state','$zip')"; >> >> $result=mysqli_query($dbc, $query) >> or die('Error querying database.'); >> >> mysqli_close($dbc); >> >> ?> > > Karl DeSaulniers > Design Drumm > http://designdrumm.com > > > __ Information from ESET Smart Security, 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 Security. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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 t

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 wrote: > > 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 -- -Dan Joseph ww

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

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 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 fi

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 wrote 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 intende

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 wrote 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, Rob. -- http://www.int

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 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 t

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: > 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, visi

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: Pl

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 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 flush themsel

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 wrote 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 intended to accept a quart

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 wrote > 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 start @ $3.95/month.

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 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 would b

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 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 would be to call it a

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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Solution

2010-04-13 Thread Gary
not only looks redundant, but why two tables? > > Why not "customers" or "users" or "subscribers" like so: > > include(opendb.php); > > $query="INSERT INTO users (first_name, last_name, street, town, state, > zip) > VALUES('$first_name

[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 page

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 pressin

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] 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 a

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

[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] 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, insert

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

[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 book

[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 d

[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] 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 functi

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

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 pa

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 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 > return a

[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] 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 > > > > > > > >

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 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: > > >>

[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: Probably worth somebody investigating this further and seeing how