RE: [PHP] Regex question

2002-01-09 Thread Jon Haworth
If you want the [ to be escaped in the regex you have to double-escape it: $x = \ \[; (sorry, the two \ should be together without a space but my stupid mail-app converts the string thinking it's an network address) so $x will contain \[ as you want ( the first backslash escapes the second).

RE: [PHP] Regex question

2002-01-09 Thread Jon Haworth
As far as I can see (notice: I'm not a regex-king ;) the regex seems correct to me. The only thing I'm wondering about is the /^ (second last line of the citation). Together with your expression in the array it results in preg_match(/\/!\[CDATA\[/, ...) I'm wondering if that (/![CDATA...) is

RE: [PHP] no one can find solution to my problem??

2002-01-08 Thread Jon Haworth
$headers .= Cc: [EMAIL PROTECTED]\r\n; $headers .= Bcc: [EMAIL PROTECTED]\r\n; $headers['User']='bankem'; $headers['Password']='narayana'; /* and now mail it */ mail($to, $subject, $message, $headers); ? Warning: Server Error in c:\www/email1.php on line 45 You do not need to

RE: [PHP] carriage returns

2002-01-07 Thread Jon Haworth
Inserting data from a textarea or something? If so, have a look at http://www.php.net/nl2br - probably what you're after. Cheers Jon -Original Message- From: Rodney Davis [mailto:[EMAIL PROTECTED]] Sent: 07 January 2002 17:47 To: [EMAIL PROTECTED] Subject: [PHP] carriage returns

Re: [PHP] Passing through Array's to another script

2001-12-18 Thread Jon Haworth
If you need to POST a form, but include some variables, you can use hidden fields. form action=script.php method=post input type=hidden name=a value=foo input type=hidden name=b value=bar input name=c /form Assuming someone now enters baz into the input called c, your POST data is

RE: [PHP] Die

2001-12-11 Thread Jon Haworth
Hi, If I use die or exit() it break execution of php script but also browswer stop parsing html code. How to avoid this? Use proper error handling instead of die()? Let's face it, die() is for when your script needs to, well, die Cheers Jon -- PHP General Mailing List

RE: [PHP] Date

2001-12-11 Thread Jon Haworth
Well, 1st Jan 1970 is the start of the Unix epoch (i.e. what you'd get for doing a date() on a timestamp of 0). Seeing as 31st Dec 1969 is fairly close to this, it's worth checking that header.php exists and that your stat() call isn't returning null or a negative. if (file_exists (header.php))

RE: [PHP] Re: semaphores not automatically releasing at end of script

2001-12-07 Thread Jon Haworth
You probably have a better chance if you include (a) some code (b) an error message (c) a description of your environment Cheers Jon -Original Message- From: Thomas [mailto:[EMAIL PROTECTED]] Sent: 07 December 2001 11:01 To: [EMAIL PROTECTED] Subject: [PHP] Re: semaphores not

RE: [PHP] Help wih select boxes pls

2001-12-07 Thread Jon Haworth
Hi! I'm trying to make dynamically related select boxes (e.g. i have a 'State' select box, which, when i select an item in it, it automatically refreshes the select box 'Cities' containing a list of cities in that particular chosen state) Good article on this at Zend:

RE: [PHP] mail function

2001-12-05 Thread Jon Haworth
Yes it is. A good place to start is with the manual (http://www.php.net/mail), where you will find an explanation of how to do it. Cheers Jon -Original Message- From: Gregory Jon Welling/Parts Trading Inc. [mailto:[EMAIL PROTECTED]] Sent: 05 December 2001 11:07 To: [EMAIL PROTECTED]

RE: [PHP] Dumped OK, Restore NOT

2001-12-05 Thread Jon Haworth
Anyways, if any PHP people here are--god forbid--actually using MySQL as their database, I would GREATLY appreciate any help in this matter. I've thoroughly read the mysqldump chapter in the docs, and gone through several tutorials, but have found nothing on actually restoring a database

RE: [PHP] URGENT: IIS server doesn't recognize PHP pages

2001-12-04 Thread Jon Haworth
have you tried it with a PERL-style shebang line at the top of your scripts? Give something like: #!/usr/bin/php -q On a WinNT/IIS box? I'll try, but never read anything like this... Ah yes, good point :-) Your path may be more like c:\progra~1\php\php.exe -q I don't even know

RE: [PHP] URGENT: IIS server now OK, but MS access DB not reachable

2001-12-04 Thread Jon Haworth
Scope problem? Try this: function Output_Entries() { global $DB_PATH, $DSN; // rest of function } Cheers Jon -Original Message- From: mweb [mailto:[EMAIL PROTECTED]] Sent: 04 December 2001 12:28 To: [EMAIL PROTECTED] Subject: [PHP] URGENT: IIS server now OK, but MS access DB not

RE: [PHP] 'Running' a file from PHP script

2001-12-04 Thread Jon Haworth
Basically I want to be able to test that the db is running and if it isn't then I want to 'run' it. Platform is NT, server is IIS4 It's a database, right? So surely it should be running as an NT service, in which case it should be set to start automatically when the computer starts. Your

RE: [PHP] 'Running' a file from PHP script

2001-12-04 Thread Jon Haworth
Aha, I understand :-) Have you looked at exec() and passthru()? Start with http://www.php.net/manual/en/ref.exec.php, there are some notes relating to Windows there... Cheers Jon -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED]] Sent: 04 December 2001 16:51 To: Jon

RE: [PHP] foo-bar

2001-11-29 Thread Jon Haworth
http://www.tuxedo.org/~esr/jargon/html/entry/foo.html HTH Jon -Original Message- From: Christoph Starkmann [mailto:[EMAIL PROTECTED]] Sent: 29 November 2001 14:54 To: '[EMAIL PROTECTED]' Subject: [PHP] foo-bar BTW... Can anybody tell me where the words foo and bar come from?

RE: [PHP] Coding methods (was RE: [PHP-DB] gzip image files)

2001-11-27 Thread Jon Haworth
I use the latter style, because otherwise my syntax highlighting doesn't kick in. $filename = this $varname that; # $filename is in blue, the rest is in green $filename = this. $varname. that; # $filename and $varname are in blue, the rest is in green I've done it so much now

RE: [PHP] Pulling information out of a MySQL database

2001-11-26 Thread Jon Haworth
You could look into the nl2br() function, which converts \n -style newlines (entered in TEXTAREAs) into HTML brs. http://www.php.net/nl2br HTH Jon -Original Message- From: Tim Thorburn [mailto:[EMAIL PROTECTED]] Sent: 26 November 2001 07:32 To: [EMAIL PROTECTED] Subject: RE: [PHP]

RE: [PHP] Cannot add header information...

2001-11-22 Thread Jon Haworth
You've already sent something to the browser... the line that starts with HTMLHEAD... Move that below the authentication code and all should be well. HTH Jon -Original Message- From: Per Waagen [mailto:[EMAIL PROTECTED]] Sent: 22 November 2001 10:20 To: [EMAIL PROTECTED] Subject:

RE: [PHP] mysql export to excel

2001-11-21 Thread Jon Haworth
PHPmyAdmin can export to .csv, which can be read into Excel with no troubles. Get it at http://www.phpwizard.net/projects/phpMyAdmin/ HTH Jon -Original Message- From: Stanley [mailto:[EMAIL PROTECTED]] Sent: 21 November 2001 10:34 To: [EMAIL PROTECTED] Subject: [PHP] mysql export to

RE: [PHP] The url of the last site?

2001-11-15 Thread Jon Haworth
It's in the $HTTP_REFERER variable (speeling mistake intentional) Be warned, though - not every browser supplies this in every circumstance. Cheers Jon -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: 15 November 2001 17:55 To: 'PHP User Group' Subject: [PHP]

RE: [PHP] cron not allowed

2001-11-13 Thread Jon Haworth
how did you plan on running php from cron? Well, this works for me: 0 3 * * * lynx -dump http://mysite.com/mypage.php /dev/null HTH Jon ** 'The information included in this Email is of a confidential nature and is

RE: [PHP] parsing XML data with ampersands ()

2001-11-12 Thread Jon Haworth
Change your CDATA so it contains amp; instead of HTH Jon -Original Message- From: bill [mailto:[EMAIL PROTECTED]] Sent: 12 November 2001 15:51 To: [EMAIL PROTECTED] Subject: [PHP] parsing XML data with ampersands () When parsing XML data, the CDATA sometimes contains an ampersand

RE: [PHP] Is there a way not to pop up the default login window?

2001-11-01 Thread Jon Haworth
Yep. Design your own form, and feed the data from that to $PHP_AUTH_USER and $PHP_AUTH_PW. Don't send the header() for the 403. Cheers Jon -Original Message- From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 17:18 To: [EMAIL PROTECTED] Subject: [PHP] Is there a

RE: [PHP] Is there a way not to pop up the default login window?

2001-11-01 Thread Jon Haworth
if (!isset ($PHP_AUTH_USER)) { header (Location: http://mydomain.com/mypage;); } would probably do the trick Cheers Jon -Original Message- From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 17:51 To: Jon Haworth; [EMAIL PROTECTED] Subject: RE: [PHP

RE: [PHP] defending PHP mail function

2001-10-31 Thread Jon Haworth
I'd be interested to see an example of an address that will not work Which MTA are you using? On which OS? More info! (obPeeve): Please don't post in HTML. Cheers Jon -Original Message- From: Matthew Luchak [mailto:[EMAIL PROTECTED]] Sent: 31 October 2001 16:04 To: Php-General

RE: [PHP] defending PHP mail function

2001-10-31 Thread Jon Haworth
Well hey, if mail() won't send to those addresses, what's wrong with us testing them? :-) ahem Can you send to those addresses from a regular email client? If so, can you do it from the command line with your MTA? jon@maya~$ sendmail [EMAIL PROTECTED] hello there . Cheers Jon -Original

RE: [PHP] XML newbie

2001-10-24 Thread Jon Haworth
Start your document with ?xml version=1.0? Sorry, couldn't resist it :-) http://www.w3.org/XML/ isn't a bad place to find out about it, but if you find them a bit dry or you're in need of a nice tutorial then you'd better get yourself over to http://hotwired.lycos.com/webmonkey/authoring/xml/

RE: [PHP] Counter

2001-09-25 Thread Jon Haworth
It's very simple - at the top of every page, have a routine that opens a text file, reads the number inside it into a variable, adds one, and writes it back out again. If the text file doesn't exist, create it. Psuedocode: if (file exists) { open file for reading; read contents into

RE: [PHP] search engine submission

2001-09-24 Thread Jon Haworth
You can find this code all over the web, an example of it can be seen at most search engines on the Add a URL page :-) What are you trying to do? Cheers Jon -Original Message- From: Krushna Kumar R [mailto:[EMAIL PROTECTED]] Sent: 24 September 2001 15:08 To: [EMAIL PROTECTED] Subject:

RE: [PHP] preventing an include() from taking over?

2001-09-20 Thread Jon Haworth
The name of that concept is a variable. index.php?pg=1 means call index.php and set the variable $pg to 1 Cheers Jon -Original Message- From: LRW [mailto:[EMAIL PROTECTED]] Sent: 19 September 2001 21:04 To: [EMAIL PROTECTED] Subject: Re: [PHP] preventing an include() from taking over?

RE: [PHP] Getting IP address

2001-09-19 Thread Jon Haworth
A better version would be: if (getenv(HTTP_X_FORWARDED_FOR)) { $ip=getenv(HTTP_X_FORWARDED_FOR); } else { $ip=getenv(REMOTE_ADDR); } This checks for proxy forwarding as well, if you just use REMOTE_ADDR you might end up with a proxy, not the real IP. Cheers Jon

RE: [PHP] Getting IP address

2001-09-19 Thread Jon Haworth
To: [EMAIL PROTECTED] Subject: Re: [PHP] Getting IP address On Wednesday 19 September 2001 13:13, Jon Haworth wrote: A better version would be: if (getenv(HTTP_X_FORWARDED_FOR)) { $ip=getenv(HTTP_X_FORWARDED_FOR); } else { $ip=getenv(REMOTE_ADDR); } This checks for proxy

RE: [PHP] Combining strings?

2001-09-19 Thread Jon Haworth
Why not just do $today = date(j/m); ? Cheers Jon -Original Message- From: Daniel Alsén [mailto:[EMAIL PROTECTED]] Sent: 19 September 2001 12:55 To: php Subject: [PHP] Combining strings? Hi, i was trying to figure this out myself. But since the php-manual is down... I want to

RE: [PHP] form handling problem

2001-09-17 Thread Jon Haworth
Well, form action=?php echo $PHP_SELF; ? method=get always works fine for me. Note that you should use action instead of target, and the semicolon after $PHP_SELF should be inside the ? not outside of it... might be one of these two errors causing the problem (although I can't think why)

RE: [PHP] Re: Question.

2001-09-06 Thread Jon Haworth
So echo a br as well. echo $os. br; //this will do the trick Cheers Jon -Original Message- From: Johan Vikerskog (EMP) [mailto:[EMAIL PROTECTED]] Sent: 06 September 2001 12:24 To: '_lallous'; [EMAIL PROTECTED] Subject: RE: [PHP] Re: Question. ok i have this: ?php include

RE: [PHP] browsing permission

2001-09-06 Thread Jon Haworth
Without .htaccess you have two options: 1. Does your host offer a control panel? Mine has one where I can add password protection to any directory I wish - worth checking out. 2. require() a php file at the top of every page in that directory that does this: if (user is allowed here) {

RE: [PHP] lynx and mail function

2001-09-05 Thread Jon Haworth
Can you send mail from the command line? If you're running sendmail: $ sendmail [EMAIL PROTECTED] this is a test . If that goes through OK then I'd have a look at your script for bugs. If it doesn't I'd have a look at your sendmail.cf :-) Cheers Jon -Original Message- From: Moise

RE: [PHP] Load testing

2001-09-04 Thread Jon Haworth
If you run Apache you might want to look into the ab program, it's in the apache/bin directory IIRC. HTH Jon -Original Message- From: Andrew Brampton [mailto:[EMAIL PROTECTED]] Sent: 04 September 2001 16:48 To: [EMAIL PROTECTED] Subject: [PHP] Load testing Hi, I'm looking for a app

RE: [PHP] help !

2001-08-31 Thread Jon Haworth
Hi Nikola, You need to add your PHP code to your HTML. I'm sure Dreamweaver allows you to edit the HTML directly, but I don't know how I'm afraid. To check everything's up and running, open Notepad (should be under StartProgramsAccessories) and paste this in: ---start--- html head titleTest

RE: [PHP] 2 General MySQL Questions

2001-08-31 Thread Jon Haworth
1) can anyone refer me please to a public, postable MySQL newsgroup? i've found a few MySQL newsgroups, but none of them allows posting. it would be great if you could also tell me the name of the (public) newsgroup server hosting the group. Not sure, but a hunt around on

RE: [PHP] HTTP authentication

2001-08-31 Thread Jon Haworth
Won't sending a 401 header do the trick? ?php header(WWW-Authenticate: Basic realm='my realm'); header(HTTP/1.0 401 Unauthorized); ? Not sure, but worth a try. Cheers Jon -Original Message- From: Boris [mailto:[EMAIL PROTECTED]] Sent: 31 August 2001 13:08 To: [EMAIL PROTECTED]

RE: [PHP] PHP Syntax question.

2001-08-31 Thread Jon Haworth
The @ suppresses any warning/error messages that are produced - hence the complaints when it's taken out :-) Cheers Jon -Original Message- From: Erols [mailto:[EMAIL PROTECTED]] Sent: 31 August 2001 01:06 To: [EMAIL PROTECTED] Subject: [PHP] PHP Syntax question. Sorry for my

RE: [PHP] SELECT * FROM

2001-08-29 Thread Jon Haworth
Couple of other tips for you. 1. SELECT * is bad unless you really need every field. If you don't, specify which ones you want - the query will perform better. $s = SELECT * FROM News; // bad $s = SELECT NewsHeadline, NewsTeaser FROM News; // better 2. You appear to be connecting to your

RE: [PHP] What does PHP stand for?

2001-08-28 Thread Jon Haworth
PHP Hypertext Preprocessor (yes, it's recursive) HTH Jon -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: 28 August 2001 11:38 To: Php-General Subject: [PHP] What does PHP stand for? It just crossed my mind: I don't know what PHP stands for...so anyone? :)

RE: [PHP] PHP sendmail

2001-08-24 Thread Jon Haworth
Yup, try qmail: www.qmail.org You need to adjust the setting in your php.ini as well. HTH Jon -Original Message- From: Juraj Hasko [mailto:[EMAIL PROTECTED]] Sent: 24 August 2001 14:19 To: [EMAIL PROTECTED] Subject: [PHP] PHP sendmail Hi, I would like to know if PHP on *nix system

RE: [PHP] Getting MySQL Query Times.

2001-08-23 Thread Jon Haworth
I was looking thru the mysql functions, and there doesn't seem to be one that gives you the amount of time a query takes. Is there anyway to get this information (since it gives it to you when you type queries directly into the mysql shell client)? A script of mine is starting to get

RE: [PHP] php query for mysql table

2001-08-20 Thread Jon Haworth
You can use the SQL keyword LIKE for this. Have a look at the MySQL docs for full info, but the idea is you'd do something like: $query = SELECT * FROM table WHERE question LIKE '%. $search_phrase. %'; HTH Jon -Original Message- From: Wolfgang Schneider [mailto:[EMAIL PROTECTED]] Sent:

RE: [PHP] Dnsquery

2001-08-17 Thread Jon Haworth
I think you need to assign it to a variable and then echo that: $dnsquery = exec(dnsquery -h domain.net); echo $dnsquery; HTH Jon -Original Message- From: J.Mueller, pro.vider.de GmbH [mailto:[EMAIL PROTECTED]] Sent: 17 August 2001 09:29 To: '[EMAIL PROTECTED]' Subject: [PHP] Dnsquery

RE: Re[2]: [PHP] Dnsquery

2001-08-17 Thread Jon Haworth
I think you need to assign it to a variable and then echo that: $dnsquery = exec(dnsquery -h domain.net); echo $dnsquery; This is from the manual: exec() executes the given command, however it does not output anything Use system instead. Well, don't trust everything you read :-) These

RE: [PHP] XHTML compatible error messages

2001-08-17 Thread Jon Haworth
I think Jan meant that when PHP spits out Error in line x, it has a br in there which causes the page to be invalid. My question would be why are you trying to validate pages with errors in anyway? Cheers Jon -Original Message- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: 17

RE: [PHP] Sort a an array?

2001-08-16 Thread Jon Haworth
The best way to do this, which is conveniently also the easiest, is to do it within your SQL query. $table = tablename; $field = fieldname; $query = select * from $table order by $field; or, for descending sort: $query = select * from $table order by $field desc; HTH Jon -Original

RE: [PHP] PHP within .html files

2001-08-16 Thread Jon Haworth
Apache can be set up to parse whatever files you like as .php (you could have .paul if you like...) - presumably your host has enabled this. If you have access to .htaccess files (or the main server config, httpd.conf), you can set this up on any Apache server with the line AddType

RE: [PHP] PHP EDITOR 4 WINDOWS?

2001-08-01 Thread Jon Haworth
Well, any text editor will do. Here are some links: file://c:\windows\notepad.exe http://www.editplus.com http://www.ultraedit.com Enjoy HTH Jon -Original Message- From: Kyle Smith [mailto:[EMAIL PROTECTED]] Sent: 01 August 2001 20:09 To: [EMAIL PROTECTED] Subject: [PHP] PHP EDITOR 4

RE: [PHP] PHP_SELF

2001-07-31 Thread Jon Haworth
if ($post = 1 $Age = ) {echo NO;} else {echo YES;} Now here is what happens. On a first time view of the page it outputs 'NO' (Good). If I dont enter anything in the age field and submit the form it outputs 'NO' (Good). If I enter a value into the age field and submit, it outputs

RE: [PHP] disable?

2001-07-31 Thread Jon Haworth
Don't bother. Whatever you do (and it's usually a naff Javascript, search javascript.internet.com or equivalents for examples), people can get round it. You are wasting your time trying to stop this. If someone really wants your content they can - write it down - take screenshots - use a safe

RE: [PHP]REPOST: DB logic help...

2001-07-31 Thread Jon Haworth
What about something like: ?php $sql_bands = SELECT Link FROM Table WHERE Category='band'; $sql_sites = SELECT Link FROM Table WHERE Category='site'; $sql_other = SELECT Link FROM Table WHERE Category='other'; $query_bands = mysql_query($sql_bands); $query_sites = mysql_query($sql_sites);

RE: [PHP] Zip mulitple files for download

2001-07-31 Thread Jon Haworth
GlacierHello, I need to zip multiple files into 1 zip file for download. Which function do I use to accomplish this? Thanks! http://www.php.net/exec HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: [PHP] Need for dox...

2001-07-30 Thread Jon Haworth
You've already checked the php.net site before asking this, I take it. Oh wait... http://www.php.net/manual/en/ref.session.php Maybe not :-) Cheers Jon -Original Message- From: Gabriele Biondo [mailto:[EMAIL PROTECTED]] Sent: 30 July 2001 12:25 To: PHP Subject: [PHP] Need for dox...

RE: [PHP] How to display values in HTML form by retriving from database through PHP

2001-07-26 Thread Jon Haworth
// Connect to MySQL mysql_connect( 'localhost', 'balaji', 'pingpong' ) or die ( 'Unable to connect to server.' ); ...and you'll be changing your password right about now, I suppose :-) Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail:

RE: [PHP] HTTP_REFERRER Problem

2001-07-26 Thread Jon Haworth
Try $HTTP_REFERER instead of $HTTP_REFERRER (yes, I know it's spelt wrong, but try it :-) Cheers Jon -Original Message- From: Shrout, Ryan [mailto:[EMAIL PROTECTED]] Sent: 26 July 2001 14:53 To: '[EMAIL PROTECTED]' Subject: [PHP] HTTP_REFERRER Problem Here is the code I am trying to

RE: [PHP] php

2001-07-25 Thread Jon Haworth
Yes it is - have a look at www.php.net/exec to see how you can run commands from your PHP scripts. HTH Jon -Original Message- From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 12:55 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [PHP] php Hi, Is it possible

RE: [PHP] new problem

2001-07-25 Thread Jon Haworth
On which OS? For example, on a Linux box, I imagine you could do something like exec(mv old.directory.name new.directory.name); Cheers Jon -Original Message- From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 15:07 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject:

RE: [PHP] Security of PHP code

2001-07-04 Thread Jon Haworth
Yes, I would have thought this would do it: if (strstr($file, /usr/local/apache/htdocs/) { show_source($file); } else { echo File must be in /usr/local/apache/htdocs!; } Modify as appropriate. Have I missed anything, or will this do the trick? Cheers Jon -Original

RE: [PHP] email forms

2001-06-19 Thread Jon Haworth
$fromaddress = [EMAIL PROTECTED]; mail($toaddress, $subject, $mailcontent, $fromaddress); Should probably be: $fromaddress = From: [EMAIL PROTECTED]; mail($toaddress, $subject, $mailcontent, $fromaddress); Splitting hairs a bit, a more accurate name for $fromadress would be $headers - in the

RE: [PHP] php bug reporting

2001-06-19 Thread Jon Haworth
I think perhaps a bit more detail is needed :-) What's the error, can we see your code, what database are you using, etc. Cheers Jon -Original Message- From: akhil chugh [mailto:[EMAIL PROTECTED]] Sent: 19 June 2001 05:30 To: [EMAIL PROTECTED] Subject: [PHP] php bug reporting Dear

RE: [PHP] MySQL Select

2001-05-24 Thread Jon Haworth
May 2001 21:28 To: [EMAIL PROTECTED] Subject: Re: [PHP] MySQL Select why not just simply it more while ($r = mysql_fetch_array($result)) { // do your thing here } -- Chris Lee [EMAIL PROTECTED] Jon Haworth [EMAIL PROTECTED] wrote in message 67DF9B67CEFAD4119E4200D0B720FA3F53FA57

RE: [PHP] NEED BOOK: DB Abstaction

2001-05-24 Thread Jon Haworth
PHP 4 Bible (Converse/Park, IDG Books) has a chapter on OO programming that contains sample code for an entire DB layer... Failing that you can knock your own up really easily, using include() to stick it in whatever script you fancy. HTH Jon -Original Message- From: Erich Reimberg

RE: [PHP] MySQL Select

2001-05-23 Thread Jon Haworth
Something like: if ($array_result = mysql_fetch_array($result)) { do { // do your thing here } while ($array_result = mysql_fetch_array($result)); } HTH Jon -Original Message- From: Jamie Thompson [mailto:[EMAIL PROTECTED]] Sent: 23 May 2001 14:33 To:

RE: [PHP] About Commit..

2001-05-23 Thread Jon Haworth
I thought MySQL already supported transactions, but only for Berkeley table types... http://www.mysql.com/doc/C/O/COMMIT.html Cheers Jon -Original Message- From: George E. Papadakis [mailto:[EMAIL PROTECTED]] Sent: 23 May 2001 15:17 To: Hassan Arteaga; Php (E-mail) Subject: Re: [PHP]

RE: [PHP] Tab ordereing

2001-05-22 Thread Jon Haworth
form input name=foo tabindex=1 input name=bar tabindex=2 /form HTH Jon -Original Message- From: Tarrant Costelloe [mailto:[EMAIL PROTECTED]] Sent: 22 May 2001 16:14 To: Php (E-mail) Subject: [PHP] Tab ordereing What's the syntax for defining the tab order on a input

RE: [PHP] checking to see if part of a variable exists?

2001-05-21 Thread Jon Haworth
http://www.php.net/manual/en/function.strstr.php if (strstr (i like beer, beer)) { // it's in there } else { // it's not } -Original Message- From: Sandeep Hundal [mailto:[EMAIL PROTECTED]] Sent: 21 May 2001 11:39 To: Php (E-mail) Subject: [PHP] checking to see if part of a variable

RE: [PHP] REMOTE SCRIPTING - RSexec() DOUBT

2001-05-18 Thread Jon Haworth
Two things: 1. You might want to read the Zend article on chained selectors: http://www.zend.com/zend/tut/drop-down.php 2. If it's a site to do with cars, it's marques, not marks. Cheers Jon -Original Message- From: Felipe Moreno [mailto:[EMAIL PROTECTED]] Sent: 18 May 2001 15:10 To:

RE: [PHP] REMOTE SCRIPTING - RSexec() DOUBT

2001-05-18 Thread Jon Haworth
any joy on this list, you could try asking on a more general list like evolt.org's thelist or wdvl.com's wdvltalk. HTH Jon -Original Message- From: Felipe Moreno [mailto:[EMAIL PROTECTED]] Sent: 18 May 2001 17:12 To: Jon Haworth; [EMAIL PROTECTED] Subject: RES: [PHP] REMOTE SCRIPTING

RE: [PHP] redeclare array_push

2001-05-10 Thread Jon Haworth
guess Maybe the new host has a different compile setup for PHP, one that includes a function named array_push(). Try renaming yours (push_array(), perhaps?) and seeing if it works then. /guess HTH Jon -Original Message- From: Theo Richel [mailto:[EMAIL PROTECTED]] Sent: 10 May 2001

RE: [PHP] Weirdest error I've ever had....

2001-05-09 Thread Jon Haworth
Well, br / is the XHTML-compliant version of br. In XHTML (the current W3C recommendation for web pages), you *have* to explicitly close all tags (i.e. you have to use things like /p). Single tags - br, hr, img, etc - have to be closed as well, and that's how you do it. br / hr width=80% / img

RE: [PHP] PHP Mysql query data conversion newbie

2001-05-09 Thread Jon Haworth
Well, it's not immediately obvious whether your date is in i, j, or f, so let's pretend it's in date :-) Try this: while($amyrow = mysql_fetch_array($aresult)) { echo /tdtdfont face=verdana size=1; echo $amyrow[i]; echo /tdtdfont face=verdana size=1;

RE: [PHP] OT question..

2001-05-08 Thread Jon Haworth
But he IS the webmaster Cheers Jon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 08 May 2001 17:14 To: [EMAIL PROTECTED]; Kelly Meeks; '[EMAIL PROTECTED]' Subject: Re: [PHP] OT question.. On Tue, May 08, 2001 at 06:10:18PM +0200, Christian Reiniger

RE: [PHP] Date Time Formatting ??

2001-05-08 Thread Jon Haworth
I think the best way to handle this is not to care what it looks like in the database. Store your dates as UNIX timestamps, and then they are easy to do calculations on and/or convert to any date format you like for displaying in your pages. Read up on date() and mktime() for more info (there

RE: [PHP] Date Time Formatting ??

2001-05-08 Thread Jon Haworth
] Date Time Formatting ?? Here is what I am trying to do, but I get the wrong date: $t_data_array[1]=date(m/d/y,mysql_result($db_result,$db_record,'date')); Then I simply print the value in the arraythis date instead of 05/08/01 comes out 12/31/69 Thanks! Jon Haworth wrote: I think

RE: [PHP] PHP using Forms

2001-05-04 Thread Jon Haworth
Try this: $Home = nl2br($Home); // nl2br converts newlines to brs See http://www.php.net/nl2br for more info. (Incidentally, I answered exactly the same question yesterday, in exactly the same way. *Please* check the list archives/last few days postings/manual before posting this sort of

RE: [PHP] Maximum execution time of 30 seconds exceeded...

2001-05-03 Thread Jon Haworth
Change the max_execution_time setting in your php.ini file. You can also do it on a per-script basis but I can't remember how OTOH - a search on the manual should find it though. HTH Jon -Original Message- From: Kraa de Simon [mailto:[EMAIL PROTECTED]] Sent: 03 May 2001 11:48 To:

RE: [PHP] textarea -- what happens to my new lines

2001-05-03 Thread Jon Haworth
Try this: ?php $textfield = nl2br($textfield); echo $textfield; ? For more info, have a look at http://www.php.net/nl2br. HTH Jon -Original Message- From: Stampe, Lars [mailto:[EMAIL PROTECTED]] Sent: 03 May 2001 13:35 To: [EMAIL PROTECTED] Subject: RE: [PHP] textarea -- what happens

RE: [PHP] Random number generation...

2001-05-02 Thread Jon Haworth
Wotcha Tris :-) Try this: mt_srand((double)microtime()*100); $my_random_number = mt_rand(1, 20); HTH Jon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 02 May 2001 12:07 To: [EMAIL PROTECTED] Subject: [PHP] Random number generation... Hi there, A

RE: [PHP] Random number generation...

2001-05-02 Thread Jon Haworth
The manual also says: mt_rand -- Generate a better random value I've been using mt_rand() over rand() every time - is there any reason not to? Cheers Jon -Original Message- From: elias [mailto:[EMAIL PROTECTED]] Sent: 03 May 2001 00:05 To: [EMAIL PROTECTED] Subject: Re: [PHP] Random

RE: [PHP] RE: What is this??

2001-04-27 Thread Jon Haworth
Try http://members.evolt.org/ HTH Jon -Original Message- From: Manesh [mailto:[EMAIL PROTECTED]] Sent: 27 April 2001 13:35 To: Manesh; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] RE: What is this?? I need a free web server that gives me 1 Myslq accound and php hoasting! if

RE: [PHP] HTTP authentication for username password

2001-04-26 Thread Jon Haworth
Superb tutorial on Zend: http://www.zend.com/zend/tut/authentication.php HTH Jon -Original Message- From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Sent: 26 April 2001 13:03 To: [EMAIL PROTECTED] Subject: [PHP] HTTP authentication for username password How can I use the HTTP

RE: [PHP] How do I unsubscribe from this list

2001-04-24 Thread Jon Haworth
quote src=bottom of every email To unsubscribe, e-mail: [EMAIL PROTECTED] /quote HTH Jon -Original Message- From: Walgamotte, David [mailto:[EMAIL PROTECTED]] Sent: 24 April 2001 14:45 To: [EMAIL PROTECTED] Subject: [PHP] How do I unsubscribe from this list

RE: [PHP] Netscape Enterprise Server + PHP ?= possible

2001-04-24 Thread Jon Haworth
I would have thought you could use it as a CGI, if you can't get it running as a module. These manual pages look like they might be of use to you: http://www.php.net/manual/en/install.netscape-enterprise.php http://www.php.net/manual/en/install.hpux.php Cheers Jon -Original Message-

RE: [PHP] Apache configuration

2001-04-11 Thread Jon Haworth
/tmp is the directory used on Unix systems to store session info. On a windows box you will need to change it to something like c:\temp or c:\apache\sessions. IIRC it's in your php.ini file, not httpd.conf. HTH Jon -Original Message- From: Alexis Antonakis [mailto:[EMAIL PROTECTED]]

RE: [PHP] __ $8/mo php hosting on 24/7, OC3+ web server ___

2001-04-10 Thread Jon Haworth
Yes, we know, you've told us three times now. -Original Message- From: Jeffrey Greer [mailto:[EMAIL PROTECTED]] Sent: 10 April 2001 17:45 To: [EMAIL PROTECTED] Subject: [PHP] __ $8/mo php hosting on 24/7, OC3+ web server ___ Hello, I am offering php hosting with features at a price

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

2001-04-09 Thread Jon Haworth
Try this: form name="myEditForm" action="edit.phtml?number=?php echo $exedit; ?" method="post" onsubmit="return validate()" 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

RE: [PHP] Sorry - Way OT but I need help

2001-04-09 Thread Jon Haworth
Your custom 404 is probably less than 512 bytes. This causes IE to display its own inbuilt error page (don't ask me why :-) Push it over that and all should be well. HTH Jon -Original Message- From: Andy Woolley [mailto:[EMAIL PROTECTED]] Sent: 09 April 2001 18:00 To: [EMAIL PROTECTED]

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

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

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

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] 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

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

<    1   2   3   4   >