RE: [PHP] baffled - please explain

2004-12-10 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 10 December 2004 00:15, adwin wijaya wrote: > but > { > ?> > My function was called > } > > is not correct :) Why do you say that? Looks perfectly fine to me. Cheers

RE: [PHP] baffled - please explain

2004-12-10 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 10 December 2004 00:06, Malcolm Mill wrote: > Hi, > I just came across a sniplet of code in a book I'm reading and I'm not > sure what point the author is trying to make. > > Th

Re: [PHP] baffled - please explain

2004-12-09 Thread adwin wijaya
Malcolm Mill wrote: Hi, I just came across a sniplet of code in a book I'm reading and I'm not sure what point the author is trying to make. The code is: function my_function ( ) { echo 'My function was called'; } function my_function ( ) {

[PHP] baffled - please explain

2004-12-09 Thread Malcolm Mill
Hi, I just came across a sniplet of code in a book I'm reading and I'm not sure what point the author is trying to make. The code is: function my_function ( ) { echo 'My function was called'; } My function was called What are those single opening and closing curly braces doing in sepa

Re: [PHP] baffled on error_reporting

2003-10-27 Thread Gerard Samuel
On Monday 27 October 2003 09:08 am, Curt Zirzow wrote: > * Thus wrote Marek Kilimajer ([EMAIL PROTECTED]): > > This should be reported at least as a documentation bug (if it's not > > already mentioned, I'm lazy to search :) > > I dunno, this seems like a php bug to me. The @ should only effect >

Re: [PHP] baffled on error_reporting

2003-10-27 Thread Curt Zirzow
* Thus wrote Marek Kilimajer ([EMAIL PROTECTED]): > This should be reported at least as a documentation bug (if it's not > already mentioned, I'm lazy to search :) I dunno, this seems like a php bug to me. The @ should only effect the reporting status of the current line, not disabling certain f

Re: [PHP] baffled on error_reporting

2003-10-27 Thread Marek Kilimajer
This should be reported at least as a documentation bug (if it's not already mentioned, I'm lazy to search :) Gerard Samuel wrote: Yes I know about turning off error reporting, but what happens after that point. An example. -- common.php -- // php.ini error reporting is set to E_ALL error_rep

Re: [PHP] baffled on error_reporting

2003-10-26 Thread Gerard Samuel
On Sunday 26 October 2003 07:12 pm, Dan McCullough wrote: > No I believe that is a feature the ability to turn off error reporting. > You can do the same with mysql functions. > > @mysql_ Yes I know about turning off error reporting, but what happens after that point. An example. -- common.php

[PHP] baffled on error_reporting

2003-10-26 Thread Gerard Samuel
I have a common included file with error_reporting set to 0 If I do a var_dump(error_reporting()) right after it it returns 0 In a file that includes this common file, if I var_dump(error_reporting()) there it return 2047, which I believe is E_ALL It that the correct behaviour of error_reporting??

RE: [PHP] baffled on error_reporting

2003-10-26 Thread Dan McCullough
No I believe that is a feature the ability to turn off error reporting. You can do the same with mysql functions. @mysql_ -Original Message- From: Gerard Samuel [mailto:[EMAIL PROTECTED] Sent: Sunday, October 26, 2003 7:04 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] baffled on

Re: [PHP] baffled on error_reporting

2003-10-26 Thread Gerard Samuel
On Sunday 26 October 2003 12:19 pm, Gerard Samuel wrote: > I have a common included file with error_reporting set to 0 > If I do a var_dump(error_reporting()) right after it it returns 0 > In a file that includes this common file, if I var_dump(error_reporting()) > there it return 2047, which I bel

Re: [PHP] baffled on error_reporting

2003-10-26 Thread Gerard Samuel
On Sunday 26 October 2003 06:45 pm, Gerard Samuel wrote: > On Sunday 26 October 2003 12:19 pm, Gerard Samuel wrote: > > I have a common included file with error_reporting set to 0 > > If I do a var_dump(error_reporting()) right after it it returns 0 > > In a file that includes this common file, if

Re: [PHP] Baffled, line producing error

2002-06-01 Thread Craig Vincent
> Notice the ' inside the '', this is bad syntax. For more > information on using strings in PHP, see: Sheesh you're right, as I said it was probably a dumb error, three other people have looked at this that I'm aware of and missed it toolol glad your eyes are better than ours. Thank you fo

Re: [PHP] Baffled, line producing error

2002-06-01 Thread Philip Olson
You have: if ($player_password != $player_password_verify) { $errmsg .= 'Password don't match. Please try again'; $error = 1; } Notice the ' inside the '', this is bad syntax. For more information on using strings in PHP, see: http://www.zend.com/zend/tut/using-strings.php http://

Re: [PHP] Baffled, line producing error

2002-06-01 Thread Craig Vincent
> If the "error" is a warning about undefined variable, then set a default > value for $errmsg before you start adding strings to it. > > $errmsg .= "this"; > > That by itself means $errmsg = $errmsg . "this";, but if $errmsg isnt' > defined, you'll get the warning. > > Set $errmsg = ''; at the be

RE: [PHP] Baffled, line producing error

2002-06-01 Thread John Holmes
y, June 01, 2002 11:29 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Baffled, line producing error > > I was happily coding when I came across a mysterious error. I've traced > it > to this line > > if ($player_password != $player_password_verify) { $errmsg .= 'Password

RE: [PHP] Baffled, line producing error

2002-06-01 Thread Jonathan Rosenberg
What is the exact error message are you seeing? > -Original Message- > From: Craig Vincent [mailto:[EMAIL PROTECTED]] > Sent: Saturday, June 01, 2002 11:29 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Baffled, line producing error > > > I was happily cod

[PHP] Baffled, line producing error

2002-06-01 Thread Craig Vincent
I was happily coding when I came across a mysterious error. I've traced it to this line if ($player_password != $player_password_verify) { $errmsg .= 'Password don't match. Please try again'; $error = 1; } commented out the script runs fine, if this line is active an error is produced. My eye

Re: [PHP] baffled :<:

2001-04-17 Thread John Lim
""Peter Houchin"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > can any one see a problem with this loop? > >$db = include"connect.inc"; > $foo = "SELECT * FROM 6pci WHERE card='$card' ORDER BY card"; > > $result = mysql_query($foo,$db); > > > while ( ($

Re: [PHP] baffled :<:

2001-04-17 Thread Christian Reiniger
On Tuesday 17 April 2001 07:59, you wrote: > can any one see a problem with this loop? > while ( ($myrow = mysql_fetch_array($result) ) ) { > > $id = $myrow["id"]; > $card = $myrow["card"]; > $serial = $myrow["serial"]; > $avail = $myrow["avail"]; > $pn = $myrow["pn"]; > $cat = $myrow["c

Re: [PHP] baffled :<:

2001-04-17 Thread Plutarck
In the loop, try using print_r($myarray) in the loop to see if the data is in there at all. Other than that, switch the while loop to: while ($myrow = mysql_fetch_assoc($result)) { That should fix it... -- Plutarck Should be working on something... ...but forgot what it was. ""Peter Houchi

RE: [PHP] baffled :<:

2001-04-16 Thread Romulo Roberto Pereira
I made a mistake: $id = $myrow["id"]; should read: $id[] = $myrow["id"]; -Original Message- From: Romulo Roberto Pereira [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 17, 2001 3:04 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] baffled :<:< even better:

Re: [PHP] baffled :<:

2001-04-16 Thread Chris Fry
CTED]] > Sent: Tuesday, April 17, 2001 3:00 AM > To: Mark Maggelet > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP] baffled :<:< > > This loop will only return the last record from the db as the variables are > getting overwritten each time through the loop

RE: [PHP] baffled :<:

2001-04-16 Thread Romulo Roberto Pereira
even better: use foreach! $id = $myrow["id"]; .. foreach ($id as $loop) { .. } -Original Message- From: Chris Fry [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 17, 2001 3:00 AM To: Mark Maggelet Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] baffled :<:<

RE: [PHP] baffled :<:

2001-04-16 Thread Romulo Roberto Pereira
Even better, $id[] = $myrow["id"]; then count them: for ($i=0;$i < count($id);$i++) { .. } Rom -Original Message- From: Chris Fry [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 17, 2001 3:00 AM To: Mark Maggelet Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re:

Re: [PHP] baffled :<:

2001-04-16 Thread Chris Fry
This loop will only return the last record from the db as the variables are getting overwritten each time through the loop. It would make more sense to make each variable an array eg: $id[$i] = $myrow["id"]; or do something with each set of info inside the loop. Chris Mark Maggelet wrote: > O

Re: [PHP] baffled :<:

2001-04-16 Thread Mark Maggelet
On Tue, 17 Apr 2001 15:59:37 +1000, Peter Houchin ([EMAIL PROTECTED]) wrote: >can any one see a problem with this loop? > > $db = include"connect.inc"; >$foo = "SELECT * FROM 6pci WHERE card='$card' ORDER BY card"; > > $result = mysql_query($foo,$db); > > >while ( ($myrow = mysql_fetch_array($res

Re: [PHP] baffled :<:

2001-04-16 Thread Seung-woo Nam
PM > To: Peter Houchin > Cc: Php-General@Lists. Php. Net > Subject: Re: [PHP] baffled :<:< > > > $db = include"connect.inc"; > > includes do not return anything useful, so this is a bogus statement. > > > $foo = "SELECT * FROM 6pci WHERE card=&#

RE: [PHP] baffled :<:

2001-04-16 Thread Peter Houchin
-General@Lists. Php. Net Subject: Re: [PHP] baffled :<:< > $db = include"connect.inc"; includes do not return anything useful, so this is a bogus statement. > $foo = "SELECT * FROM 6pci WHERE card='$card' ORDER BY card"; > > $result = mysql

Re: [PHP] baffled :<:

2001-04-16 Thread Rasmus Lerdorf
> $db = include"connect.inc"; includes do not return anything useful, so this is a bogus statement. > $foo = "SELECT * FROM 6pci WHERE card='$card' ORDER BY card"; > > $result = mysql_query($foo,$db); An include certainly cannot return a database handle. Included files operate in the same var

[PHP] baffled :<:

2001-04-16 Thread Peter Houchin
can any one see a problem with this loop? if i call say just $card it only displays the one record (the last one), the minute i try to call $myrow["card"]; i get nothing at all... any idea's? I have script identical to this that works perfectly .. only difference is this one has diff