Re: [PHP] Rate my (really) simple template class

2011-02-14 Thread Paul M Foster
On Mon, Feb 14, 2011 at 09:52:51PM -0500, Brian Waters wrote: > So I decided to write a template class in order to get myself going on > learning PHP. Of course I wrote the simplest thing possible: > > class Template > { > protected $template; > protected $vars; > > publi

[PHP] Rate my (really) simple template class

2011-02-14 Thread Brian Waters
So I decided to write a template class in order to get myself going on learning PHP. Of course I wrote the simplest thing possible: class Template { protected $template; protected $vars; public function __construct($template) { $this->template = $te

Re: [PHP] code quest

2011-02-14 Thread Kirk Bailey
Very nice; I am leaning in the direction of doing it this way. Thank you! :-) On 2/14/2011 9:24 PM, Jim Lucas wrote: On 2/14/2011 4:53 PM, Kirk Bailey wrote: Now I have a situation. I need to take the code from my former home page and modify it to lay out a table (let's say 5 cells wide) and

Re: [PHP] code quest

2011-02-14 Thread Jim Lucas
On 2/14/2011 4:53 PM, Kirk Bailey wrote: > Now I have a situation. I need to take the code from my former home page and > modify it to lay out a table (let's say 5 cells wide) and as many rows deep to > contain all the items. Each item is the name of the directory, under which is > an > icon image

Re: [PHP] code quest

2011-02-14 Thread Kirk Bailey
well, this ends the row after every cell. I am trying to get a row of 5 cells across, then end it and start a new row. If the routines stops before the end of the count of 5 due to lack of further directories, closing out the table following the loops will onclude a tag. On 2/14/2011 8:30 P

Re: [PHP] code quest

2011-02-14 Thread Richard Quadling
On 15 February 2011 00:53, Kirk Bailey wrote: > Now I have a situation. I need to take the code from my former home page and > modify it to lay out a table (let's say 5 cells wide) and as many rows deep > to contain all the items. Each item is the name of the directory, under > which is an icon im

Re: [PHP] 2 submit buttons.

2011-02-14 Thread Dmitrii Varvashenia
oh - I forgot - the first the submit will be the default 2011/2/15 Dmitrii Varvashenia : -- WBR, Dmitrii +375 29 60-LINUX, 25-LINUX, 40-LINUX icq: 193-74-771 www.varvashenia.ru, www.seoder.ru -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Howdy (new in here)

2011-02-14 Thread Brian Waters
Hi everyone! I'm just starting out with PHP so I'm looking for a good place to ask some questions, have my code critiqued (read: visciously ripped apart), and generally BS about PHP and programming in general (if that's OK). I know that PHP sometimes has a reputation for having (some) lousy develop

Re: [PHP] 2 submit buttons.

2011-02-14 Thread Dmitrii Varvashenia
2011/2/14 Paul Halliday : > if (isset($_POST['botton1'])) {dothing1();} > if (isset($_POST['button2'])) {dothing2();} Hello. in html: in PHP if(isset($_POST['op'])){ switch($_POST['op']){ case 'Update': dothing1(); break; case 'Checkout': dothing2(); break; default: dohat

Re: [PHP] 2 submit buttons.

2011-02-14 Thread tolga
15.02.2011 00:24, Paul M Foster yazmış: On Mon, Feb 14, 2011 at 05:15:11PM -0500, Floyd Resler wrote: On Feb 14, 2011, at 4:18 PM, Paul M Foster wrote: On Mon, Feb 14, 2011 at 03:35:02PM -0400, Paul Halliday wrote: I have 2 buttons on a page: if (isset($_POST['botton1'])) {dothing1();} if

[PHP] code quest

2011-02-14 Thread Kirk Bailey
Now I have a situation. I need to take the code from my former home page and modify it to lay out a table (let's say 5 cells wide) and as many rows deep to contain all the items. Each item is the name of the directory, under which is an icon image from that directory, under which is a descripti

Re: [PHP] PHP -- using without installing

2011-02-14 Thread Richard Quadling
On 14 February 2011 21:50, Steve Staples wrote: > On Mon, 2011-02-14 at 16:10 -0500, Paul M Foster wrote: >> On Mon, Feb 14, 2011 at 12:32:51PM -0500, Steve Staples wrote: >> >> > Hi! >> > >> > I've been developing this stand alone application, found the webserver >> > that I am going to use (it i

Re: [PHP] 2 submit buttons.

2011-02-14 Thread Paul M Foster
On Mon, Feb 14, 2011 at 05:15:11PM -0500, Floyd Resler wrote: > > On Feb 14, 2011, at 4:18 PM, Paul M Foster wrote: > > > On Mon, Feb 14, 2011 at 03:35:02PM -0400, Paul Halliday wrote: > > > >> I have 2 buttons on a page: > >> > >> if (isset($_POST['botton1'])) {dothing1();} if > >> (isset($_P

Re: [PHP] 2 submit buttons.

2011-02-14 Thread Floyd Resler
On Feb 14, 2011, at 4:18 PM, Paul M Foster wrote: > On Mon, Feb 14, 2011 at 03:35:02PM -0400, Paul Halliday wrote: > >> I have 2 buttons on a page: >> >> if (isset($_POST['botton1'])) {dothing1();} >> if (isset($_POST['button2'])) {dothing2();} >> >> They both work as intended when I click on

Re: [PHP] PHP -- using without installing

2011-02-14 Thread Steve Staples
On Mon, 2011-02-14 at 16:10 -0500, Paul M Foster wrote: > On Mon, Feb 14, 2011 at 12:32:51PM -0500, Steve Staples wrote: > > > Hi! > > > > I've been developing this stand alone application, found the webserver > > that I am going to use (it is written in php) and all is good... on > > windows. >

Re: [PHP] using BOTH GET and POST in the same page.

2011-02-14 Thread Paul M Foster
On Mon, Feb 14, 2011 at 12:30:56PM -0500, tedd wrote: > >At 11:58 PM -0500 2/13/11, Paul M Foster wrote: > >On Sun, Feb 13, 2011 at 02:25:45PM -0500, tedd wrote: > > > > > At 10:53 AM +0530 2/12/11, Ashim Kapoor wrote: > > > >Dear All, > > > > > > > >I am reading "PHP5 and MySQL Bible". Chapter 7

Re: [PHP] 2 submit buttons.

2011-02-14 Thread Paul M Foster
On Mon, Feb 14, 2011 at 03:35:02PM -0400, Paul Halliday wrote: > I have 2 buttons on a page: > > if (isset($_POST['botton1'])) {dothing1();} > if (isset($_POST['button2'])) {dothing2();} > > They both work as intended when I click on them. If however I click > within a text box and hit enter, th

Re: [PHP] PHP -- using without installing

2011-02-14 Thread Paul M Foster
On Mon, Feb 14, 2011 at 12:32:51PM -0500, Steve Staples wrote: > Hi! > > I've been developing this stand alone application, found the webserver > that I am going to use (it is written in php) and all is good... on > windows. > > I can get the php.exe and php-cgi.exe running no issue on windows >

[PHP] 2 submit buttons.

2011-02-14 Thread Paul Halliday
I have 2 buttons on a page: if (isset($_POST['botton1'])) {dothing1();} if (isset($_POST['button2'])) {dothing2();} They both work as intended when I click on them. If however I click within a text box and hit enter, they both fire. Is there a way to stop this? Thanks. -- Paul Halliday http:/

[PHP] PHP -- using without installing

2011-02-14 Thread Steve Staples
Hi! I've been developing this stand alone application, found the webserver that I am going to use (it is written in php) and all is good... on windows. I can get the php.exe and php-cgi.exe running no issue on windows without "installing" them... even tested on 3 machines (developed on Vista, sen

Re: [PHP] using BOTH GET and POST in the same page.

2011-02-14 Thread tedd
At 10:31 PM -0500 2/13/11, Robert Cummings wrote: On 11-02-13 02:25 PM, tedd wrote: At 10:53 AM +0530 2/12/11, Ashim Kapoor wrote: Dear All, I am reading "PHP5 and MySQL Bible". Chapter 7 of the book says that PHP can use GET and POST in the SAME page! Also it says that we can use the SAME var

Re: [PHP] using BOTH GET and POST in the same page.

2011-02-14 Thread tedd
At 11:58 PM -0500 2/13/11, Paul M Foster wrote: On Sun, Feb 13, 2011 at 02:25:45PM -0500, tedd wrote: > At 10:53 AM +0530 2/12/11, Ashim Kapoor wrote: > >Dear All, > > > >I am reading "PHP5 and MySQL Bible". Chapter 7 of the book says that PHP can > >use GET and POST in the SAME page! Also

Re: [PHP] extract price by preg_match_all

2011-02-14 Thread Frank Arensmeier
"; print_r($matches); echo ""; } else { echo "Didn't find anything..."; } ?> Untested. /frank 14 feb 2011 kl. 15.05 skrev Tontonq Tontonq: > example data: > > > old price 829,00 > €your price 58,90 € * > > > another : > 9,90 € * > > i want to extract 829,.00 & 5

Re: [PHP] Help! Made a boo-boo encrypting credit cards

2011-02-14 Thread Brian Dunning
On Feb 13, 2011, at 12:44 AM, Richard Quadling wrote: > You are > using addslashes($_POST['cc_number']). Considering a credit card > number is purely numeric, the addslashes would seem to be redundant as > you don't need to escape numbers. I do that routinely to all input fields as one additional

[PHP] extract price by preg_match_all

2011-02-14 Thread Tontonq Tontonq
example data: old price 829,00 €your price 58,90 € * another : 9,90 € * i want to extract 829,.00 & 58,90 from first source , 9,90 from the second i tried many way like preg_match_all('/(\$[0-9,]+(\.[0-9]{2})?)<\/span>/',$data,$prices); it doesn't work

Re: [PHP] Simplifying MySql queries

2011-02-14 Thread Simcha Younger
On Sat, 12 Feb 2011 22:40:27 +0200 Andre Polykanine wrote: > Hi all, > I'm using in my PHP script the following four MySql queries: > $q1=mysql_query("SELECT *FROM`CandidateQuestions`WHERE > `Category`='1' ORDER BY RAND() LIMIT 1"); > $q2=mysql_query("SELECT *FROM`Cand

Re: [PHP] Re: php-general Digest 14 Feb 2011 03:32:02 -0000 Issue 7180

2011-02-14 Thread Thijs Lensselink
On 02/14/2011 05:53 AM, Florin Jurcovici wrote: > Hi. > >>> Me stupid, my bad. >>> >>> Turns out the bug isn't in my code, but in the debugger. I'm working >>> with the trial version of Zend Studio. When inside the call to the >>> static method, everything is undefined. If I look at variables usin