Try this:
This should display ?number correctly (I take it that's the problem).
You may also need to use "return validate();" or "javascript: return
validate();", not too sure about this though.
HTH
Jon
-Original Message-
From: Curtis [mailto:[EMAIL PROTECTED]]
Sent: 09 April 2001
The comparison operator is ==. = means "assign". Try:
if ($num == 0) {
foo(bar, baz);
}
AFAIK what your code means is "assign 0 to $num and then, if that worked,
print the error message."
HTH
Jon
-Original Message-
From: Jeff Oien [mailto:[EMAIL PROTECTED]]
Sent: 06 April 2001
But members.evolt.org does, along with MySQL, Cold Fusion, and a heap of
other goodies.
HTH
Jon
-Original Message-
From: Joe Stump [mailto:[EMAIL PROTECTED]]
Sent: 06 April 2001 17:03
I'm not sure about Freeserve, but I don't think that Geocities supports PHP
on their webpages (at least
Mike,
You could investigate the functions strstr (www.php.net/strstr) and stristr
(www.php.net/stristr), it sounds like they're what you're after.
HTH
Jon
-Original Message-
From: Mike [mailto:[EMAIL PROTECTED]]
Sent: 06 April 2001 15:42
To: [EMAIL PROTECTED]
Subject: [PHP] String in a
What about:
$sql = "SELECT something FROM table";
$result = mysql_query($sql) or die ("Query failed!");
do_something(); //the query has succeeded if we get to this line
HTH
Jon
-Original Message-
From: Jordan Elver [mailto:[EMAIL PROTECTED]]
Sent: 29 March 2001 12:00
To: PHP Database
Whenever you're working on a server that only parses .php as PHP files, you
should use .php.
Whenever you're working on a server that only parses .phtml as PHP files,
you should use .phtml.
If you run your own server, or your server parses both .php and .phtml, you
can use either.
HTH
Jon
--
> Hi,
> How can I check for existing site (e.g.
> http://www.somehost.com/someone) and check for existing mail (e.g.
> [EMAIL PROTECTED])?
You will most likely find the answer at:
http://marc.theaimsgroup.com/?l=php-general&r=1&w=2
If you don't get any joy at this address I'd also suggest visit
> > You could have a check for the HTTP_REFERER variable, if it doesn't
> > contain "application.php", chances are they didn't come from that page.
> it's not a good idea to rely on $HTTP_REFERER for anything, and especially
> for this. a referer is only reported when the user follows a hyperlin
You could have a check for the HTTP_REFERER variable, if it doesn't contain
"application.php", chances are they didn't come from that page.
There might be a neater way to do it, but I don't know it :-)
HTH
Jon
-Original Message-
From: Good Fella [mailto:[EMAIL PROTECTED]]
Sent: 22 Marc
Head on over to http://members.evolt.org/ and have a look at what the
wonderful folks over there are offering.
HTH
Jon
-Original Message-
From: PIS Alaiddin Tayeh [mailto:[EMAIL PROTECTED]]
Sent: 22 March 2001 13:23
To: [EMAIL PROTECTED]
Subject: [PHP] Free Web Space
Is there any place
Wow, error messages are getting better these days ;-)
Are you running PHP as a CGI interpreter or a server module?
-Original Message-
From: Christian Dechery [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 16:20
To: [EMAIL PROTECTED]
Subject: [PHP] include virtual, file or exec cgi?
You could investigate www.php.net/echo, I think it's what you're after.
Cheers
Jon
-Original Message-
From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 12:05
To: [EMAIL PROTECTED]
Subject: [PHP] Response.Write [OK]
Hi,
I have built a shopping cart and have made conne
$FileName = $PHP_SELF;
HTH
Jon
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 20 March 2001 13:20
To: [EMAIL PROTECTED]
Subject: [PHP] get filename?
Hi
Whats the best method to get the filename of the file I am using. E.G if the
file is called tom_woz_he
It's truly amazing what you can find three clicks away from the main page
of www.php.net.
http://www.php.net/manual/en/installation.php
HTH
Jon
-Original Message-
From: hananet [mailto:[EMAIL PROTECTED]]
Sent: 14 March 2001 12:53
To: [EMAIL PROTECTED]
Subject: [PHP] install
how to in
What about wrapping it in a FOR loop:
for ($counter = 1; $counter <= $NumCases; $counter++) {
// do the sql stuff
}
(http://www.php.net/manual/en/control-structures.for.php)
I don't think the type of database will make any difference to this.
HTH
Jon
-Original Message-
From:
If the ACTION attribute of the form points to your PHP script, the variables
should automagically appear, i.e. $result would be "1", $age would be "23",
and $name would be "john". Failing that you could investigate the explode()
function.
However, if the form isn't controlled by you, how come is
As a quick caveat you need to be *very* careful you're not obfuscating the
target site copyright infringement, anyone?
-Original Message-
From: Richard S. Crawford [mailto:[EMAIL PROTECTED]]
Sent: 08 March 2001 00:02
To: Ashwin Kutty; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: R
If it's stored as a unix timestamp you can format it any way you like.
[www.php.net/date]
If it's stored as a string in the -MM-DD hh:mm:ss format, you can use
substr(0,10) [www.php.net/substr] to get the first 10 characters and only
display those.
HTH
Jon
-Original Message-
From:
Javascript? (I know it's generally horrible, but it's good for this sort of
thing)
Stick this in your ...: