Re: [PHP] Formats with PHP

2001-12-29 Thread DL Neil
Hey Steve, Im need to generate an email and Im trying to keep the exact spacing I use when I define the body of the email. When the email is sent and i view it with Outlick Express or simply use Pine, the spacing is all out of wack. (Too many spaces here, not enough spaces there) I think

Re: [PHP] how to create html tables in php

2001-12-29 Thread DL Neil
Hi Sander, I made a database with bookmarks, these bookmarks are catogarized by type. Now I want to display those bookmarks in tables by category. This works already fine. The only problem I have is that the tables are very difficult to handle. I want to make 4 tables in a row (so that

Re: [PHP] configuring sever to send mail (Win2k)

2002-01-04 Thread DL Neil
CJ, i have a problem using the mail function on my server. win2000 Pro IIS 5.0 PHP Version 4.0.6 i'm not sure if it's a configuration problem with IIS or i'm missing something in the php.ini file. The pre-requisite is that the php.ini file points to a visible SMTP server. Please

Re: [PHP] counting with dates (help!)

2002-01-07 Thread DL Neil
RE: [PHP] counting with dates (help!)Hi Sander, (and Chris, and Martin) $today = date(Ymd, mktime(0,0,0, date(m),date(d),date(Y))); $last_week = date(Ymd, mktime(0,0,0, date(m),date(d)-7,date(Y))); echo ($today - $last_week); The result is a number like 8876 (20020107-20011231 = 8876) But

[PHP] Re: [PHP-DB] Re: [PHP] need help looping through each record with a query -stumped

2002-01-10 Thread DL Neil
Brian, first off, Martin your suggestion looks great but I don't think its SQL syntax is supported by MySQL. It's a good start though - gives me something to work with :) =until it is tried, you won't know! From an SQL point of view it looks ok. In fairness to Martin, from the 'further

Re: [PHP] does this work?

2002-01-10 Thread DL Neil
Erik, Two suggestions: 1 check out mysql_fetch_assoc(), and 2 make use of AS to 'set' the variable names (carried through from MySQL to PHP). Regards, =dn - Original Message - From: Erik Price [EMAIL PROTECTED] To: Rick Emery [EMAIL PROTECTED]; PHP [EMAIL PROTECTED] Sent: 10 January

Re: [PHP] Re: Parsing SAR output with PHP.

2002-01-11 Thread DL Neil
Or checkout the sql import facilities offered by your choice of database to 'convert' the data from log to db-tbl, then set up your analysis in PHP+SQL separately. =dn - Original Message - From: Martin Wickman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 11 January 2002 09:08 Subject:

Re: [PHP] multiple replaces...

2002-01-12 Thread DL Neil
Yes, I thought about that. But, what should I do when the markers are absolutely NOT in any sequence. =sequence would matter if it was possible that one of the markers could replace some text and that replacement subsequently became the marker for a further replacement ... nightmare=recursion!

Re: [PHP] Time Zone Offset?

2002-01-13 Thread DL Neil
Marvin, I'm using the PHP date() function on my site, but since my hosting company (Pair Networks) is on the East Coast and I'm on the West Coast, everything shows as three hours later (for most of my visitors, anyway). Pair tells me there's no setting I can make on my account to change the

[PHP] Re: [PHP-DB] Re: [PHP] convert yyyy/mm/dd to mm/dd/yyyy, how?

2002-01-13 Thread DL Neil
Rasmus, I have held several datetime-related conversations with people recently, and another series about 'when'/whether to use PHP or MySQL functionality. Here you are, the man of PHP, advising Sander to use MySQL functionality! (and in marked contrast to the (biased) advice one might expect

Re: [PHP] Invalid Email Characters

2002-01-13 Thread DL Neil
Alexis, Could anybody confirm exactly which characters, if any, are NOT valid in an email address. =such rules of the Internet are laid out in documents called RFCs (initially they are Requests for Comment but once adopted become ...) You are looking for RFC822 (although there are others

Re: [PHP] mysql_insert_id?

2002-01-15 Thread DL Neil
Hi Wee, Is it possible that I would get the wrong ID (Not the ID I just inserted in Auto_Increment field) by using mysql_insert_id function if someone is also inserting record at the same time? How does mysql_insert_id work accurately? =A couple of things here: 1 if the field is defined as

Re: [PHP] mysql_insert_id?

2002-01-15 Thread DL Neil
Hi Wee, Is it possible that I would get the wrong ID (Not the ID I just inserted in Auto_Increment field) by using mysql_insert_id function if someone is also inserting record at the same time? How does mysql_insert_id work accurately? =A couple of things here: 1 if the field is defined as

Re: [PHP] fixing mail for broken Outlook

2002-01-16 Thread DL Neil
Hank, You say just text and text/plain. What do you mean by mungs the formatting? What formatting in plain text? =dn I've got an app that sends emails, not complicated emails, their just text, the mail text is stored in text files on the server so they can be edited independant of the code,

Re: [PHP] Mulitple Attachments using php

2002-01-16 Thread DL Neil
Sam, I know I hear you all groan with this topic... I know this topic has been asked before... But looking through the archives there have been a lot of advice, URLs, classes given out, yet I haven't really found anything that can easily be implemented so that I can send muliple

[PHP] Re: [PHP-DB] Re: [PHP] mysql_insert_id?

2002-01-16 Thread DL Neil
Hi Martin, 2 because the (function argument) controlling feature is the connection, it is not possible for another concurrent user to 'steal' your ID or influence the ID returned to you - it's all yours! Ok, assume you are correct, but what if you are using persistent connections (ie

Re: [PHP] mysql_insert_id?

2002-01-16 Thread DL Neil
Hi Jimmy, 2 because the (function argument) controlling feature is the connection, it is not possible for another concurrent user to 'steal' your ID or influence the ID returned to you - it's all Ok, assume you are correct, but what if you are using persistent connections (ie

Re: [PHP] mysql_insert_id?

2002-01-16 Thread DL Neil
Hi Jimmy, the only problem i can think of might occur with pconnect is, last_insert_id() will return you the last inserted ID from previous 'session', not current 'session'. to prevent this, you should call last_insert_id() only when your INSERT query executed succesfully. =Of course

Re: [PHP] mysql_fetch_row - how do I fetch a specific row?

2002-01-16 Thread DL Neil
Phil, After I make a queryhow do I fetch a specific row from that query ?? =isn't the purpose of the query to return specific results? =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

Re: [PHP] fixing mail for broken Outlook

2002-01-16 Thread DL Neil
? There is a difference between *nix, Windows, and Mac with line ends being represented by LF, CRLF, or CR. =Regards, =dn On Wed, Jan 16, 2002 at 04:29:03PM -, DL Neil wrote: Hank, You say just text and text/plain. What do you mean by mungs the formatting? What formatting in plain text? =dn I've

Re: [PHP] mysql_insert_id?

2002-01-16 Thread DL Neil
Jimmy, However it is also possible that in order to save time the LAST_ID information is built into the resultset coming back from the INSERT - thus when mysql_insert_id() is called PHP would not need to go back to MySQL/last_insert_id(). yes, what you said could be true also. Well,

Re: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread DL Neil
Alternatively, remember that HTML has this built in (and PHP outputs a HTML page): move c) before a) implement it using a meta tag in the HTML page HEAD section d) will then happen after the defined time period Regards, =dn - Original Message - From: Jon Farmer [EMAIL PROTECTED] To:

Re: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread DL Neil
Niklas, No good, since meta starts counting when page is first opened, so Don't think this is applicable - When is the page opened: after the script reaches the meta, or after the script concludes and the web server sends the page to the browser? If the latter, then the speed of the

Re: [PHP] MySQL and PHP

2002-01-18 Thread DL Neil
Brandon, Please do some 'homework': Will the native query run from the MySQL command line, or in a admin tool? Have you tried varying the number of fields? What are the column specifications? In and amongst this you might like to check where you should have spaces (a) for legibility

Re: [PHP] Generating a new line in a text file

2002-01-18 Thread DL Neil
Chris, \n = *nix \r = Mac \r\n = PC (now that you've 'dropped' MS Notepad into the conversation...) The simplest M$ tools content themselves with black blocks (apparently not being interested in your comfort), but the more sophisticated tools will sometimes oblige... =dn - Original

Re: [PHP] checking the content?????

2002-01-18 Thread DL Neil
Dani, Am slightly confused/finding the question ambiguous. Could you provide the code you have so far, and the relevant column specification(s)? Could be simple or complex! =dn - Original Message - From: Dani [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 18 January 2002 12:22 Subject:

[PHP] Re: [PHP-WIN] command line are -c doesn't work on win2k?

2002-01-18 Thread DL Neil
Jeff, The following batch files works for me (WinNTWS 4.0 SP6a):- cd c:\program files\php php.exe -q c:\.path.\w.php c:\.path.\webute.log NB the first line reflects my PHP config - your mileage may vary! Of course the other possibility is to add the PHP folder into the PATH environment

Re: [PHP] command line are -c doesn't work on win2k?

2002-01-18 Thread DL Neil
Mike and Jeff, what about the [EMAIL PROTECTED]? is it failing on a 'bad' email address? or maybe putting everything in variables and trying mail($to,$subject,$message); =there's a difference between the way PHP talks to an SMTP server (using mail()) on Win32 compared to *nix - which can

Re: [PHP] Re: [PHP-WIN] command line are -c doesn't work on win2k?

2002-01-18 Thread DL Neil
is already in the PATH variable... I'm not doing anything different that http://bugs.php.net/bug.php?id=6742 ,but for some reason the -c doesn't make a difference... Jeff. Dl Neil [EMAIL PROTECTED] wrote in message 0d4f01c1a00e$87036ee0$2916100a@jrbrown">news:0d4f01c1a00e$87036ee0$

Re: [PHP] command line are -c doesn't work on win2k?

2002-01-18 Thread DL Neil
path Look for php.ini file in this directory PHP is case sensitive (whereas Windows is not). Where is the .ini file? (not the PHP.exe file) Does this help? =dn - Original Message - From: Jeff D. Hamann [EMAIL PROTECTED] To: DL Neil [EMAIL PROTECTED]; mike cullerton [EMAIL PROTECTED

Re: [PHP] command line are -c doesn't work on win2k?

2002-01-18 Thread DL Neil
Jeff, FWIW my system is set up to hold PHP in C:\program files\php, which is where the php.exe can be found. PHP.ini is supposed to be in c:\winnt isn't it? =dn - Original Message - From: Jeff D. Hamann [EMAIL PROTECTED] To: DL Neil [EMAIL PROTECTED]; mike cullerton [EMAIL

Re: [PHP] Computer Science and PHP

2002-01-19 Thread DL Neil
Hank, You youngster you! One other dimension, the institutions can only offer classes in the languages (and techniques/technologies) that the trainers know and than they have the resources (hardware, compilers/interpreters) to cover. Maybe therein lies an answer to the 'marketing' side too.

Re: [PHP] open/read file/directory and file test

2002-01-19 Thread DL Neil
Juni, On Sun, 20 Jan 2002, Juni Adi wrote: Hi folks, After meessing up with installation stuffs, now it's time for PHP code: 1. How to tell PHP to open a file like Perl do through: open (FILE, $file); 2. Same question, this time to open/read a directory: opendir (DIR,

Re: [PHP] Confusing Problem

2002-01-20 Thread DL Neil
Tj, I am really baffled by this problem. I have tried so many things to get this working but to no avail. Here is the actual code: function verify_user($username, $password){ $conn = mysql_connect($db_host, $db_user, $db_pass) or ... Anyways the problem is I cannot get it to even get

Re: [PHP] best way to approach dates

2002-01-21 Thread DL Neil
Gidday Justin, For us guys that don't get dates very often, the subject is one of intense fascination! I answered a bunch of these questions a couple of weeks back, and reproduce that discussion below. Also some comments/responses to you interspersed:- I'm looking to normalise the way in

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
The greatest way of doing this is 1. develope php-script for generating updated html from moved php-script and updating index.html (e.g. ;) 2. develope another script or program which will call the first one periodically (once an hour, e.g.) I like that. It sounds similar to

[PHP] PHP cross referencer

2002-01-21 Thread DL Neil
Is anyone aware if such a debugging/documentation tool exists? What is/do I mean by a cross referencer? A tool which will list all of the variables (and function names ?and include files) used within a program/script, together with the line number(s) where they are mentioned - hopefully

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
Even with straight HTML, a server's load capacity is not infinite. If my own server, an old Pentium with 4 GB of hard drive space, and which serves nothing but static HTML pages, got hit with more than a couple hundred hits in a short period of time, it would bomb. I must be

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
Even with straight HTML, a server's load capacity is not infinite. If my own server, an old Pentium with 4 GB of hard drive space, and which serves nothing but static HTML pages, got hit with more than a couple hundred hits in a short period of time, it would bomb. I must be

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
Jeff, Seeing Richard thinks I have blue (?blood) in (my) veins, I'd better respond nobly and quickly... Yes the db server and the webserver are on the same box, local connections are much faster than network ones according to mysql. When the site is busy the percent of the system being

Re: [PHP] foreach array into mail isn´t working

2002-01-21 Thread DL Neil
Josepablo, ? $maildb = file(mailaddr.txt); foreach ($maildb as $address) { mail($address, THis is the subject\n, This is the message\n, From: [EMAIL PROTECTED]\n); } ? The mailaddr.txt looks like: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] However the script does send

Re: [PHP] foreach array into mail isn´t working

2002-01-21 Thread DL Neil
JP, (and good afternoon to CR!) Linux =straight into sendmail or some other email server? Why the admin e-mail? i tested on two diffrent servers didnt work. =because I was wondering where the strange 'from' email address came from. Are they configured to different addresses? YEah.. i

Re: [PHP] foreach array into mail isn´t working

2002-01-21 Thread DL Neil
: Josepablo Pérez [EMAIL PROTECTED] To: DL Neil [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: 21 January 2002 22:43 Subject: Re: [PHP] foreach array into mail isn´t working I guess its straight into sendmail sense i just use plain mail() Root@myserver would be like nobody@myserver .. its just

Re: [PHP] foreach array into mail isn´t working

2002-01-21 Thread DL Neil
? =unfortunately, I'm turning in now, but send me what you end up with, and I'll try and get back with an answer/more ideas before you wake up tomorrow... =Regards, =dn JP -- Original message -- From: DL Neil [EMAIL PROTECTED] To: Josepablo Pérez [EMAIL PROTECTED] Date: Monday 21

Re: [PHP] Re: How should I cache database data for php?

2002-01-22 Thread DL Neil
Garth, my two cents... =thank you for the description - it is worth more than a figurative two cents! I used to work at a newspaper we used a very elaborate caching system, it used to function at the at the page subcomponent level (i.e. header, footer, left nav, articles were all stored

Re: [PHP] foreach array into mail isn´t working

2002-01-22 Thread DL Neil
Josepablo, Hey guys guess what.. the problem is fixed the was that at mailaddr.txt sense the e-mails are each on one line each line has \n that crashed when asigning it at mail() , ill make a note of this on the manul.. I have included below the script iam now using.. what do you guys think?

Re: [PHP] Re: How should I cache database data for php?

2002-01-23 Thread DL Neil
Thanks Garth, - I put it aside until I could find enough clear time to spend reading it through. It makes for good reading - and your comment about caching being 'funny'/suiting different situations in different ways is definitely correct. I think you've helped me understand/clarify some

Re: [PHP] Need opinion On sessions - Cookies mandatory?

2002-01-24 Thread DL Neil
Entering the conversation late... 1 IP addresses Remember these are not necessarily 'unique'. If two of us here log in, won't we appear (to you) have the same IP address if we're 'hiding' behind a NAT (Network Address Translation) box? Also dial-up users share a pool of IP addresses which are

Re: [PHP] Viral Marketing PHP (was Re: [PHP] Computer Science and PHP)

2002-01-24 Thread DL Neil
Hello Manuel, One other dimension, the institutions can only offer classes in the languages (and techniques/technologies) that the trainers know and than they have the resources (hardware, compilers/interpreters) to cover. Maybe therein lies an answer to the 'marketing' side too. The

Re: [PHP] Split files

2002-01-24 Thread DL Neil
Making any sense? Year, so I have to do it manually (thought someone could preveting me from reinvent the wheel... ;-) What are you really trying to achieve? I'm trying to split a large binary file (2 GB) into peaces of 700 MB to burn it on a cd. It's a part of a

Re: [PHP] Split files

2002-01-24 Thread DL Neil
=Hmm, I'm still come at it from the other way around (all due respect to Jason) - but then I don't recall OpSys details, or know if there is a utility/tool for the job in your choice of OpSys. Well unless it's a *really* obscure OS I'm sure there must be some readily available file

Re: [PHP] multi-threading within php?

2002-01-24 Thread DL Neil
If the links are placed in a db as they are found, then couldn't you run the same script in multiple instances (browser windows, DOS boxes/command lines) against the same db. That way you would be fetching and parsing multiple web pages concurrently. The only 'multi-threading' would be against

Re: [PHP] PHP without browser

2002-01-24 Thread DL Neil
Hi Laurent, I would like to pass parameters to a php script running as a bach job under windows. Is there any possibility to something like that ? Coverage of argv, argc and some good examples are in the manual at http://uk2.php.net/manual/en/commandline.php Regards, =dn -- PHP

Re: [PHP] Help with regular expressions

2002-01-25 Thread DL Neil
Daniel, Hi! I´m new to regular expressions, and it seems to be an art to make it work as expected. I´m trying to remove all single-line comments from an string - that´s everything after // to the end of a line. I expected that this would do the job: ereg_replace(//[[:alnum:]]*\n,,$string),

Re: [PHP] break statement usage

2002-01-26 Thread DL Neil
Private note: heard the one about throwing stones and living in glass houses? tip Try to keep your posts a little shorter if only for the sake of the dialup users ;) /tip this said by someone who: - pushes MIME messages into a discussion list/newsgroup (instead of simple text format

Re: [PHP] Re:[PHP] Changeing Dates.

2002-01-26 Thread DL Neil
Or if you are retrieving the data from a database, use the SQL Date-Time functions (RTFM). =dn - Original Message - From: Rafael Perazzo B Mota [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 26 January 2002 16:38 Subject: [PHP] Re:[PHP] Changeing Dates. function ChangeDate ($date) {

Re: [PHP] Viral Marketing PHP (was Re: [PHP] Computer Science and PHP)

2002-01-28 Thread DL Neil
possible solution. Please don't interpret anything said as grounds for a personal argument. Dl Neil wrote: One good point about what you said is that one budgetless what to promote PHP is to use 'viral marketing'. Viral marketing is a way to market something by using a technique

Re: [PHP] set_time_limit() in a loop

2002-01-28 Thread DL Neil
Matthew, There's some strange stuff going on here, and in the conversation. For information about set_time_limit() please read http://uk2.php.net/manual/en/function.set-time-limit.php. Despite the sense of what is written below, the manual says When called, set_time_limit() restarts the

Re: [PHP] Date time

2002-01-30 Thread DL Neil
Hello Torkil, I have a field in my mysql database containing datetime on the format -MM-DD HH:MM:SS (24-hour format) Now. I want to output this as follows: DD.MM.YY at HH:MM:SS Currently I do this by this function: function convert_datetime($in){ $return = substr($in,8,2) . . .

Re: [PHP] Attaching a file via MAIL()

2002-02-02 Thread DL Neil
Dave and Mauricio, (basically the same question!) How can I add an attachment to an email using MAIL(). So far I have been able to successfully send email by using: mail($to, $subject, $message, $headers); Is there something I can add in the $headers to add an attachment?? =check

Re: [PHP] strtotime problem

2002-02-04 Thread DL Neil
toni, $date1 = 10/12/2002; $date1 = date(D M j Y, strtotime($date1)); $date2 = date(D M j Y); $date3 = date(D M j Y, $date1); print $date1.br; print $date2.br; print $date3.br; The code above gives me the following output: Fri Oct 11 2002 Mon Feb 4 2002 Wed Dec 31 1969 Is

Re: [PHP] strtotime problem

2002-02-04 Thread DL Neil
Torben, toni, $date1 = 10/12/2002; $date1 = date(D M j Y, strtotime($date1)); $date2 = date(D M j Y); $date3 = date(D M j Y, $date1); print $date1.br; print $date2.br; print $date3.br; The code above gives me the following output: Fri Oct 11 2002 Mon Feb 4

Re: [PHP] strtotime problem

2002-02-04 Thread DL Neil
Torben, No offense, but in TFM (which you have of course R), follow the 'Date Input Formats' link to: http://www.gnu.org/manual/tar-1.12/html_chapter/tar_7.html You will find this sentence: The construct 'month/day/year', popular in the United States, is

Re: [PHP] mysql fails

2002-02-05 Thread DL Neil
Hello val, a have following mysql problem: i need to execute several inserts at one query like this- $sql-action(insert into words(word) values ('php'); insert into words(word) values ('general'); insert into words(word) values ('list');); The word fild is unique My problem is: when

Re: [PHP] date(), time() different to system time

2002-02-05 Thread DL Neil
Hey Anth, Hey guys, =some of the better-looking amongst us are not guys (and then some of us are...) I'm running a RH7.2 box with apache 1.3.20 installed and php-4.1.1 installed as a DSO. Everything is working fine, except that the output from any date() or time() references is 16 hours

Re: [PHP] php help needed, is there a bright spark out there!

2002-02-06 Thread DL Neil
Hello hamish, [msg converted from HTML to simple-text format] I have been asked to do a project that seems to be baffling me. It's not really the php which is the hard part, but the mathematical problem behind the project that is causing me to have a headache! ... =This reminds me of the

Re: [PHP] Is this possible?

2002-02-06 Thread DL Neil
val, Surely this would only be possible if SIZE1 and P2 [sic - maybe SIZE2] were constants, ie that all small packs had SIZE=small and all large packs were defined as SIZE=large. (also that all products had no more than two sizes) Interesting thought though (subject to the =2 sizes

Re: [PHP] MySQL Install Problem

2002-02-07 Thread DL Neil
Ben, Is the file present at all? What do you see from DIR C:\MYSQL\BIN\MYSQL*.EXE ? Regards, =dn I tried it and got the following message: Microsoft(R) Windows DOS (C)Copyright Microsoft Corp 1990-2001. C:\DOCUME~1\BENcd c:\mysql\bin C:\MYSQL\BINmysqld --standalone 'MYSQLD' is

Re: [PHP] force refresh?

2002-02-07 Thread DL Neil
Jeff, can i force a browser to refresh using php. =the issue is PHP's server-side-edness. Consider adding an HTML META tag to the page, to call/renew itself every n-seconds. =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] eregi

2002-02-08 Thread DL Neil
Hello John I'm using eregi to print out parts of a text file, and I was just wondering how you get the code to print out a newline as it appears in the file. Not quite sure what eregi has to do with it - perhaps I'm missing something. Would the nl2br function help? =dn -- PHP General

Re: [PHP] Math rounding problem

2002-02-08 Thread DL Neil
Charlie, For an arbitrary large number I need to round() it up to the hundreds place if it is not divisible by 100 and leave it untouched if it is. So 1100 would round to 1100 and 1101 would round to 1200. Is there a clean way to do this? Currently I'm: $scale = round($scale+49,

Re: [PHP] ok still want to join a project...

2002-02-09 Thread DL Neil
Emphasis on the second-last word? =dn - Original Message - From: Nick Wilson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 09 February 2002 18:24 Subject: Re: [PHP] ok still want to join a project... -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Arik Ashepa

[PHP] Nested functions

2002-02-09 Thread DL Neil
Hi, Have been experimenting with the array_walk function and a little array debug print facility, but ran into a problem with nested functions. The code can be written with nested functions and successfully executed once; but when repeatedly executed an error appears. Can one code user-defined

Re: [PHP] Nested functions

2002-02-10 Thread DL Neil
Thanks for the confirmations Torben. Can one code user-defined functions nested within one another Yes. - and repeatedly execute them? No. ;) This is correct. As you know, the thing is that execution keeps running into that function declaration every time the containing function is

Re: [PHP] mysql_select_db() problem

2002-02-10 Thread DL Neil
What do you get if you use error checking? Well, that seems to be it, I'm getting 'Access deneid to user '@localhost'. I'm talking to a guy on the mysql list, apparently it is a phenomememememememmemonmmm that when you GRANT ALL using wildcards it tends to grant all on * except

Re: [PHP] Creating an array with a file

2002-02-11 Thread DL Neil
Scott, I am seeking some thoughts on if this is the way I should tackle this problem. I have two files, both of them tab delimited text files that I need to combine and then output a new file. My idea was to put both files in an array, calling the fields I need, i.e. $field[0], $field[1]

Re: [PHP] file reading and array's

2002-02-12 Thread DL Neil
Hi Scott, In my constant effort to improve my perl conversion project, I have a question regarding file reading. I am taking two files and combining them in an array and then writing out a new file. Is there a way to: a)strip out the first line of the second file b)test for conditions

Re: [PHP] MsSQL PASSWORD()

2002-02-12 Thread DL Neil
Zliy Pes, (I have no idea what this name means - trust it doesn't mean that you'll be coming after me with a sharp knife!) My current project runs on Win2k, MsSQL 2k, and PHP 4.0.6 My problem is that i can not enable md5 extension because of Unable to load dynamic library

Re: [PHP] Re-Importing .CSV file into Database

2002-02-12 Thread DL Neil
Glory! I have a bunch of .CSV (Microsoft Excel Comma Seperated Values) Files with me, whose data i want to put back into my mySQL database tables. How can i do that through php? or otherwise... Take a look at MySQL-Front - its menu system talks about CSV (I've not had an excuse to use

Re: [PHP] Parse Error

2002-02-12 Thread DL Neil
Ok Jason, Parse error: parse error, expecting `','' or `';'' in c:\www\hosted\witakr\index.php on line 20 this is line 20: print (table border=0 align=center width=100% cellspacing=0 cellpadding=0); where? Possibly an 'imbalance' starting higher up the code, eg no closing

Re: [PHP] Re-Importing .CSV file into Database

2002-02-12 Thread DL Neil
The error message might be useful, but in any case I think you need to enclose the source filename in quotes; also (you better check the docs here) if I remember correctly you need to give the full path to the source file unless it is in the mysql data directory. That's right, it

Re: [PHP] Mailing text from a text file.

2002-02-12 Thread DL Neil
Philip, I have the need to be able to mail out a text file. whats the best way that I could do this? =simple answer: use PHP's mail() - RTFM, but be aware that it is not the easiest thing in the world to use. With a simple text msg and no fancy address-headers you should be ok. =if you

Re: [PHP] SMTP Mail

2002-02-13 Thread DL Neil
Liam, Check out http://phpguru.org/ =dn - Original Message - From: Liam MacKenzie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 13 February 2002 09:21 Subject: Re: [PHP] SMTP Mail Whoops, my bad! If there's anyone out there that needs to use SMTP:

Re: [PHP] how a function 'return' statement works

2002-02-14 Thread DL Neil
Erik, function get_current_page_name() { $current_page_name = explode(/, $_SERVER['PHP_SELF']); $current_page_name = $current_page_name[-1]; return $current_page_name ; } $errorcode = get_current_page_name(); echo $errorcode; The only thing that works is $errorcode =

Re: [PHP] Store array into mysql?

2002-02-14 Thread DL Neil
Hi Jan I have an array called $myarray and now I want to store it in a mysql table. I tried to just, insert into mytable values('$id', '$myarray') but just got Array when I run while ($row = mysql_fetch_array ($result)) $myarray= $row[myarray]; echo $myarray -- Do I need to first make a

[PHP] Exams

2002-02-14 Thread DL Neil
Best regards, Andrey Hristov Back from the exams hell =what were you sitting Andrey? =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MySQL question...not sure if this is the correct forum to ask.

2002-02-14 Thread DL Neil
Peter, I have a quick MySQL question...if this is not the correct forum for it, then someone please point me to the right one. Can the UPDATE statement have conditional check embedded in it? I have a page that displays a record (in a FORM format) that the user can change the

Re: [PHP] How get the name of the array variable?

2002-02-15 Thread DL Neil
Tomek, I got the problem , I want make preety debug function that shows array keys and values and name of the variable containing array: Here it is: function show_arr($array) //wyswietla wartosci z tablicy wraz z kluczami (przeznaczone do debugowania) { if(DABUG) { echo

Re: [PHP] How get the name of the array variable?

2002-02-15 Thread DL Neil
So Rick, Guess you've squashed my little scheme for (fraudulently) convincing everyone that I can speak Polish fluently - given that I counldn't answer Tomek's question, I'm already scoring it up as a 'bad day'! On the subject of email addresses, does this observation mean that we are

Re: [PHP] How get the name of the array variable?

2002-02-15 Thread DL Neil
Lone Star Rick, I see that your day, and helpfulness to list members, is going a lot better than mine! Actually, if I had my druthers, my domain TLD would be .texas. Some day, when Texas becomes the independent country it should be, that will be my TLD. BIG Frigging GRIN If it comes from

Re: [PHP] problem with working with dates

2002-02-15 Thread DL Neil
Jacob, I'm sorry to bother the newsgroup with this, but I've been racking my brain on it for a few hours, and tried all the documentation, and realize it's a coding problem that will take someone about 3 seconds to figure out the error in. I have this code: =don't be sorry, these 'blind

Re: [PHP] modular programming

2002-02-16 Thread DL Neil
Dear Steven and Kunal, Agreed with what you had to say. In my experience, 'modular coding' is entirely a process of evolution. It's impossible to sit down and design software on paper. Every piece of code I write is under constant evaluation. Each time a weakness is exposed, I rethink my

Re: [PHP] modular programming

2002-02-16 Thread DL Neil
Hey Kunal, The entire concept of OOP was based on the data and not the processing :) No, this seems too much of a simplification. In the 'good old days' we used to design a program by using a flowchart. Such is an entirely procedural/code-based approach. Each of the philosophies that

Re: [PHP] exec on Windows

2002-02-17 Thread DL Neil
Scott, I am trying to develop a music scheduling system on Windows using the command line to fire off WinAMP. The first exec works fine, then it stops and says that program execution time has been exceeded. An example would be: exec (winamp.exe M01.mp3); a while loop kicks off the

Re: [PHP] Mail () problems - Need help!

2002-02-18 Thread DL Neil
Anthony, A common issue. Pertinent info required: 1 Win or *nix? 2 able to send a single msg to a single email addr? 3 does loop get address and send msg to that address, 136 times; or does loop collect 136 addresses and then after closing the loop a single msg is sent to 136 recipients in the

[PHP] Re: F/U on mail () problems

2002-02-18 Thread DL Neil
Dear Anthony, [I've put this back on the list, because others know far more about *nix and email than I do] BTW: people will respond more readily if you include a reassurance that you are emailing a 'membership' list or its some sort of client opt-in situation - not spamming! Thank you for

Re: [PHP] zend studio 2.0

2002-02-18 Thread DL Neil
Zeev, Didn't experience any stability problems with the beta per-se, but using a Windows box was an exercise in Unix-ification. Has the released version for Win32 seen significant alterations to the GUI? =dn - Original Message - From: Zeev Suraski [EMAIL PROTECTED] To: Chris Lott

Re: [PHP] code

2002-02-18 Thread DL Neil
Is $inst an int or a string? =dn make sure you're doing it like this: if ($inst == 1) { // do this } else { // do something else } instead of this: if ($inst = 1) { // do this } else { // do this } Just a thought. Tyler - Original Message - From:

Re: [PHP] Don't Know how to Set the include Path

2002-02-20 Thread DL Neil
Dear Jack, I had create a file called contant.inc. What i want to do is to use the require function() to point to this file, but when i test it, it says: Warning: Failed opening 'constant.inc' for inclusion (include_path='') in C:\InetPub\wwwroot\php study\General News\news.php on line 17

Re: [PHP] regexp on user supplied link

2002-02-20 Thread DL Neil
I'll offer the following code to get you started on the task - and invite critiques/improvements! (cribbed from various sources and 'tuned' - note that either apostrophes or double quotes can be used to delimit the URL) $bValidity = $iFound = preg_match_all( /(href *=

  1   2   3   >