RE: [PHP] Passing variables,,, I know its not this hard.

2001-04-09 Thread Jon Haworth
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

RE: [PHP] PHP/MySQL Code

2001-04-06 Thread Jon Haworth
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

RE: [PHP] Variables

2001-04-06 Thread Jon Haworth
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

RE: [PHP] String in a string

2001-04-06 Thread Jon Haworth
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

RE: [PHP] Best way to check if a query succeeded

2001-03-29 Thread Jon Haworth
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

RE: [PHP] php or phtml???

2001-03-28 Thread Jon Haworth
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 --

RE: [PHP] Check URL & Mail

2001-03-23 Thread Jon Haworth
> 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

RE: [PHP] Form help

2001-03-22 Thread Jon Haworth
> > 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

RE: [PHP] Form help

2001-03-22 Thread Jon Haworth
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

RE: [PHP] Free Web Space

2001-03-22 Thread Jon Haworth
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

RE: [PHP] include virtual, file or exec cgi?

2001-03-21 Thread Jon Haworth
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?

RE: [PHP] Response.Write [OK]

2001-03-21 Thread Jon Haworth
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

RE: [PHP] get filename?

2001-03-20 Thread Jon Haworth
$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

RE: [PHP] install

2001-03-14 Thread Jon Haworth
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

RE: [PHP] Execute sql a number of times

2001-03-14 Thread Jon Haworth
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:

RE: [PHP] Print form variables in PHP

2001-03-12 Thread Jon Haworth
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

RE: [PHP] Dynamic Links..

2001-03-08 Thread Jon Haworth
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

RE: [PHP] dates from db

2001-03-07 Thread Jon Haworth
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:

RE: [PHP] no-resubmit on reload/refresh

2001-03-06 Thread Jon Haworth
Javascript? (I know it's generally horrible, but it's good for this sort of thing) Stick this in your ...: