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
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
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 ( )
{
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
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
>
* 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
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
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
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??
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
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
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
> 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
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://
> 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
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
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
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
""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 ( ($
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
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
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:
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
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 :<:<
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:
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
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
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=
-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
> $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
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
31 matches
Mail list logo