[PHP] Re: Switch Statement

2013-09-28 Thread Jim Giner
On 9/28/2013 10:33 PM, Ethan Rosenberg wrote: Dear List - I have a working program. I made one change in a switch statement, and it does not work. I'm probably missing something fundamental. Here are some code SNIPPETS... [please note that all my debug statements are at the left margin]

[PHP] Re: Switch Statement

2013-09-28 Thread Jim Giner
?php session_start(); session_name(STORE); set_time_limit(2400); ini_set('display_errors', 'on'); ini_set('display_startup_errors', 'on'); error_reporting(-2); ini_set('error_reporting', 'E_ALL | E_STRICT'); ini_set('html_errors', 'On');

Re: [PHP] Re: Switch Statement

2013-09-28 Thread Ethan Rosenberg
On 09/28/2013 11:59 PM, Jim Giner wrote: ?php session_start(); session_name(STORE); set_time_limit(2400); ini_set('display_errors', 'on'); ini_set('display_startup_errors', 'on'); error_reporting(-2); ini_set('error_reporting', 'E_ALL | E_STRICT');

Re: [PHP] Re: Switch Statement

2013-09-28 Thread Jim Giner
On 9/29/2013 1:29 AM, Ethan Rosenberg wrote: On 09/28/2013 11:59 PM, Jim Giner wrote: ?php session_start(); session_name(STORE); set_time_limit(2400); ini_set('display_errors', 'on'); ini_set('display_startup_errors', 'on'); error_reporting(-2);

Re: [PHP] Re: Switch Statement

2013-09-28 Thread Jim Giner
On 9/29/2013 1:38 AM, Jim Giner wrote: session_start(); session_name(STORE); set_time_limit(2400); ini_set('display_errors', 'on'); ini_set('display_startup_errors', 'on'); error_reporting(-2); ini_set('error_reporting', 'E_ALL | E_STRICT');

RE: [PHP] Re: UNLESS Statement Equivalent

2013-03-12 Thread Ford, Mike
-Original Message- From: Maciek Sokolewicz [mailto:tula...@gmail.com] On Behalf Of Maciek Sokolewicz Sent: 11 March 2013 22:44 unless ( $a and $b ) = if ( ! ($a and $b) ) So in simple terms, just stick a ! (or the keyword not) in front of your expression, and you'll have

Re: [PHP] Re: UNLESS Statement Equivalent

2013-03-12 Thread Sebastian Krebs
2013/3/12 Ford, Mike m.f...@leedsmet.ac.uk -Original Message- From: Maciek Sokolewicz [mailto:tula...@gmail.com] On Behalf Of Maciek Sokolewicz Sent: 11 March 2013 22:44 unless ( $a and $b ) = if ( ! ($a and $b) ) So in simple terms, just stick a ! (or the keyword

RE: [PHP] Re: UNLESS Statement Equivalent

2013-03-12 Thread Arno Kuhl
-Original Message- From: Ford, Mike [mailto:m.f...@leedsmet.ac.uk] Sent: 12 March 2013 10:51 AM To: PHP General Subject: RE: [PHP] Re: UNLESS Statement Equivalent unless ( $a and $b ) = if ( ! ($a and $b) ) So in simple terms, just stick a ! (or the keyword not) in front of your

RE: [PHP] Re: UNLESS Statement Equivalent

2013-03-12 Thread Arno Kuhl
-Original Message- From: Ford, Mike [mailto:m.f...@leedsmet.ac.uk] Sent: 12 March 2013 10:51 AM To: PHP General Subject: RE: [PHP] Re: UNLESS Statement Equivalent unless ( $a and $b ) = if ( ! ($a and $b) ) So in simple terms, just stick a ! (or the keyword not) in front of your

RE: [PHP] Re: UNLESS Statement Equivalent

2013-03-12 Thread Ford, Mike
-Original Message- From: Arno Kuhl [mailto:a...@dotcontent.net] Sent: 12 March 2013 13:04 Mike, I presume you're saying the precedence of the Boolean keyword operators is lower than the Boolean symbol operators, but if so then wouldn't there be less need for the parentheses? I

[PHP] Re: UNLESS Statement Equivalent

2013-03-11 Thread Maciek Sokolewicz
On 11-3-2013 22:32, Angela Barone wrote: I'm looking for an 'unless' statement, but as far as I can tell, PHP doesn't have one. Hopefully someone can help me rewrite my statement. In English, I want to say: always do something UNLESS these 3 conditions are met. The

Re: [PHP] Re: Switch statement Question

2009-02-02 Thread Frank Stanovcak
tedd tedd.sperl...@gmail.com wrote in message news:p06240801c5aa0ed7d...@[192.168.1.101]... At 4:16 PM +0100 1/30/09, Jochem Maas wrote: tedd schreef: At 4:43 PM -0500 1/29/09, Frank Stanovcak wrote: yes...that is legal. as long as the statment resolves to a boolean it will work.

Re: [PHP] Re: Switch statement Question

2009-01-31 Thread tedd
At 4:16 PM +0100 1/30/09, Jochem Maas wrote: tedd schreef: At 4:43 PM -0500 1/29/09, Frank Stanovcak wrote: yes...that is legal. as long as the statment resolves to a boolean it will work. It's not technically correct, but it does work. There you go again. What's technically

[PHP] Re: Switch statement Question

2009-01-30 Thread tedd
At 4:43 PM -0500 1/29/09, Frank Stanovcak wrote: yes...that is legal. as long as the statment resolves to a boolean it will work. It's not technically correct, but it does work. There you go again. What's technically correct? Cheers, tedd -- --- http://sperling.com

Re: [PHP] Re: Switch statement Question

2009-01-30 Thread Jochem Maas
tedd schreef: At 4:43 PM -0500 1/29/09, Frank Stanovcak wrote: yes...that is legal. as long as the statment resolves to a boolean it will work. It's not technically correct, but it does work. There you go again. What's technically correct? hiya tedd, you mean to ask not technically

[PHP] Re: Switch statement Question

2009-01-29 Thread Frank Stanovcak
Alice Wei aj...@alumni.iu.edu wrote in message news:snt101-w587cd616331fc59b84834af0...@phx.gbl... Hi, I have a code snippet here as in the following: //Switch statements between the four options switch($string) { case : $string= NOT book.author='All'; break; default: $string= $string . AND

Re: [PHP] Re: If statement duplicating mysql records?

2007-06-20 Thread Jason Pruim
On Jun 19, 2007, at 5:10 PM, Roberto Mansfield wrote: Jason Pruim wrote: Okay, so I have a question... Probably pretty easy, but why would my if statement show more records then what are in the database? if($row[5] =='Level4'){ // White Highlight }// End of Level 4 else

[PHP] Re: If statement duplicating mysql records?

2007-06-19 Thread Roberto Mansfield
Jason Pruim wrote: Okay, so I have a question... Probably pretty easy, but why would my if statement show more records then what are in the database? if($row[5] =='Level4'){ // White Highlight }// End of Level 4 else {// Green Highlight }// End of

[PHP] Re: If statement question

2006-06-26 Thread Adam Zey
Alex Major wrote: Hi list. Basically, I'm still learning new things about php and I was wondering if things inside an if statement get 'looked at' by a script if the condition is false. For example, would this mysql query get executed if $number = 0 ? If ($number == 1) { mysql_query($blah)

[PHP] Re: SQL statement - date

2005-04-06 Thread kyriacos sakkas
Jacques wrote: How should I formulate my sql statement to create a result set of members who registered between now and 7 days ago? I have tried the following and it is obviously incorrect: $sqlnewmembers = Select uid, uprofilename from tblusers where udatereg between (date() and date()

[PHP] Re: SQL statement - please help

2005-03-24 Thread Jason Barnett
Try a MySQL list. Or possibly even php-db. -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-generalw=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY |

[PHP] Re: and statement

2004-11-28 Thread Brad Ciszewski
err i mean ... an 'or' statement sry www.BradTechnologies.com 99.9% Uptime 24/7 FREE Support Plans starting at $3.50 per month www.BradTechnologies.com Brad Ciszewski [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] is there an 'and' statement for mysql, when you are doing multiple

Re: [PHP] Re: and statement

2004-11-28 Thread Larry E . Ullman
err i mean ... an 'or' statement sry is there an 'and' statement for mysql, when you are doing multiple wheres? MySQL allows SQL statements that support both AND and OR. With OR, you can often use IN instead. SELECT columns FROM tablename WHERE (condition1) AND (condition2)... All of this is

Re: [PHP] Re: and statement

2004-11-28 Thread Robert Cummings
On Sun, 2004-11-28 at 21:56, Brad Ciszewski wrote: err i mean ... an 'or' statement sry Two comments: 1. This is the PHP General list. See the PHP part... that means it's NOT the MYSQL General list. 2. For such a trivial question you could have spent a whole 5 seconds executing the query

[PHP] Re: If statement question...

2004-10-10 Thread M. Sokolewicz
Gh wrote: I would like to know how I can code the the following conditional check if the $_GET['api'] does not exist, or is either set and has no length or is set and is not an integer. I am drawing a blank on the if statement to use if(!isset($_GET['api'] || strlen($_GET['api']) == 0 ||

[PHP] Re: If statement question...

2004-10-10 Thread M. Sokolewicz
M. Sokolewicz wrote: Gh wrote: I would like to know how I can code the the following conditional check if the $_GET['api'] does not exist, or is either set and has no length or is set and is not an integer. I am drawing a blank on the if statement to use I meant to say the following

[PHP] Re: nested statement problem

2004-06-11 Thread Torsten Roehr
Eric Boerner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am having a problem with a nested if statement in php. Everything works fine, but it doesn't display the information that I am trying to retrieve using a second if statement. CODE: if (($fr == 'FR') ($xe == 'XE')

[PHP] Re: SQL statement

2003-09-24 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Hello, Im having a bit of trouble with the DATE_FORMAT function in mysql. $query = ('SELECT username, password, DATE_FORMAT(timestamp, '%d%m%y') FROM custlogon'); I know its failing because php doesnt like the quotation before

[PHP] Re: SQL statement

2003-09-23 Thread Ney André de Mello Zunino
Dan J. Rychlik wrote: $query = ('SELECT username, password, DATE_FORMAT(timestamp, '%d%m%y') FROM custlogon'); Trying enclosing the whole SQL query string in double quotes. Regards, -- Ney André de Mello Zunino -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Re: SQL statement

2003-09-23 Thread Dan J. Rychlik
Tried that, it failed. I recieve undefined index timestamp. when executing. - Original Message - From: Ney André de Mello Zunino [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 7:04 PM Subject: [PHP] Re: SQL statement Dan J. Rychlik wrote: $query

Re: [PHP] Re: include statement giving me hives! - help

2003-07-17 Thread Jason Wong
On Thursday 17 July 2003 06:25, DougD wrote: when you call your script, is $point defined somewhere ? if $point is empty, you'll get an empty string for $links_include and include $links_include will not work. yes, I should have mentioned: $point is defined in the URL string

[PHP] Re: include statement giving me hives! - help

2003-07-16 Thread Baroiller Pierre-Emmanuel
Hi, when you call your script, is $point defined somewhere ? if $point is empty, you'll get an empty string for $links_include and include $links_include will not work. Regards, P.E. Baroiller Dougd [EMAIL PROTECTED] a écrit dans le message de news:[EMAIL PROTECTED] I am new to all this, but

[PHP] Re: include statement giving me hives! - help

2003-07-16 Thread DougD
yes, I should have mentioned: $point is defined in the URL string http://something.com/index.html?point=12 Baroiller Pierre-Emmanuel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, when you call your script, is $point defined somewhere ? if $point is empty, you'll get an

[PHP] Re: If statement w/ multiple conditions

2002-11-26 Thread Craig
Something like this will work... ?php if(empty($_GET['1']) empty($_GET['2']) empty($_GET['3']) empty($_GET['4'])){ echo All vars are EMPTY; }else{ echo Some vars contain Content; } ? [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'll be

Re: [PHP] Re: If statement w/ multiple conditions

2002-11-26 Thread ed
That's what I was looking to acheive. Thanks! Ed On Tue, 26 Nov 2002, Craig wrote: Something like this will work... ?php if(empty($_GET['1']) empty($_GET['2']) empty($_GET['3']) empty($_GET['4'])){ echo All vars are EMPTY; }else{ echo Some vars contain Content;

[PHP] Re: mysql statement (still a semi newbie)

2002-08-14 Thread Tim Stoop
Alexander Ross wrote: That first column is an auto_incrementing column so i don't want any data INSERT INTO cast VALUES(DEFAULT, 'Rick', 'Blaine', 'Humphrey', 'Bogart', 'male'); I think you need to use NULL instead of DEFAULT... I'm not 100% sure. Just try it :) -- Kind regards, Tim --

RE: [PHP] Re: mysql statement (still a semi newbie)

2002-08-14 Thread César Aracena
- From: Tim Stoop [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 14, 2002 6:00 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: mysql statement (still a semi newbie) Alexander Ross wrote: That first column is an auto_incrementing column so i don't want any data INSERT INTO cast VALUES

Re: [PHP] Re: mysql statement (still a semi newbie)

2002-08-14 Thread Sascha Braun
: Wednesday, August 14, 2002 11:00 PM Subject: [PHP] Re: mysql statement (still a semi newbie) Alexander Ross wrote: That first column is an auto_incrementing column so i don't want any data INSERT INTO cast VALUES(DEFAULT, 'Rick', 'Blaine', 'Humphrey', 'Bogart', 'male'); I think you need

[PHP] Re: if statement

2002-07-08 Thread Joseph Szobody
try this: if($type==test1 || $type==test2 || $type==test3){ Joseph [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is it possible to do something like this all on one line. What I need is if any one of these are true then run the script

[PHP] Re: If statement leading to another php page

2002-04-30 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Hello all, How can i force a transfer to another php page from an if statement? I have been trying: if (condition){ echo A HREF=3Dwww.link.comLink/A; echo 'A HREF=www.link.comLink/A'; the parser will get confused with all the

[PHP] Re: official statement about PHP file extensions?

2002-04-19 Thread Julio Nobrega Trabalhando
I don't think there's nothing official. If I am not mistaken, rare case, PEAR recommends using only .php It's kind of an informal consensus to use .php for anything beyond PHP3 and .php3 for PHP3-only files. This way, you script will work in most of webservers that exist. As an open

[PHP] Re: If Statement with more than one conclusion

2002-01-03 Thread George Nicolae
if (($text==com)||($text==net)||($text==org)||($text==info)) { } -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... How can I do an if

Re: [PHP] Re: if statement and imageline()

2001-08-30 Thread Hugh Danaher
number which can't be calculated! I did try the error_log statement but my ISP puked on the syntax. - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: Hugh Danaher [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 1:21 PM Subject: Re: [PHP] Re: if statement and imageline

Re: [PHP] Re: if statement and imageline()

2001-08-22 Thread Hugh Danaher
be overburdening the program? I've got a lot of code (about 150 lines) in the .jpg construct. Cheers, Hugh - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: Hugh Danaher [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 12:18 AM Subject: Re: [PHP] Re: if statement and imageline

Re: [PHP] Re: if statement and imageline()

2001-08-22 Thread Hugh Danaher
Richard, Thanks for your help. I'll try the error_log() and see what comes out. Hugh - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: Hugh Danaher [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 1:21 PM Subject: Re: [PHP] Re: if statement and imageline() No. 150

[PHP] Re: if statement and imageline()

2001-08-21 Thread Richard Lynch
What are you getting? An image at all? Broken image? Try getting rid of the header(image/jpeg) or whatever, and see if you have some error message. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD:

Re: [PHP] Re: if statement and imageline()

2001-08-21 Thread Hugh Danaher
amazing things with it in the last 2 months. With your help and the help of others, I'll certainly make progress. Thanks, Hugh - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 21, 2001 5:16 PM Subject: [PHP] Re: if statement and imageline