Re: [PHP] Show indexes

2002-10-16 Thread Stas Maximov
First get all the table names in your db: mysql_query("show tables from [your_db_name]"); Then crawl thru the table list and get index information for each of them: mysql_query("show index from [your_table_name]"); HTH Stas - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTE

Re: [PHP] Re: PHP & XML

2002-10-16 Thread Stas Maximov
The benefit would be in dividing business logic from presentation layer. Stas. - Original Message - From: "Simon Taylor" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 16, 2002 7:35 AM Subject: RE: [PHP] Re: PHP & XML > To me this is a lot of work and processing f

Re: [PHP] Umm... Uh-oh

2002-10-04 Thread Stas Maximov
The easiest and safest way to get around this problem is to place all your include files outside of your webroot directory (say one level up), so they will be accessible locally via includes, but NOT accessible via http. HTH, Stas - Original Message - From: "John Wards" <[EMAIL PROTECTED

Re: [PHP] News Feeds....

2002-09-04 Thread Stas Maximov
Try www.moreover.com HTH Stas - Original Message - From: "Brian McGarvie" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 04, 2002 1:52 PM Subject: [PHP] News Feeds > Hi > > I'd like to get some news from any reputable news site, bbc.co.uk... > yahoo.co.u

Re: [PHP] PHP_AUTH_USER

2002-08-30 Thread Stas Maximov
Yes, Matt, you were right about tracking the authorized state with a session. I actually thought about same thing: keeping a variable somewhere which will help to decide whether to send those "Authenticate" headers or not - just didn't realize you meant the same thing. :) And a little excerpt fro

Re: [PHP] PHP_AUTH_USER

2002-08-30 Thread Stas Maximov
> You can't log out of http authentication. Close the browser is it. Not very secure, eh. Use a session based login method > if you need logout function. Why not? Sending this to the client should do the job: header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorize

Re: [PHP] Re: Mail()....

2002-08-30 Thread Stas Maximov
If you need plaintext newsletter, you can not use HTML at all, even pretending that it is a plain-text. It will be screwed badly on the plaintext-only e-mail clients anyway. Stas - Original Message - From: "Brian McGarvie" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August

Re: [PHP] Fun with Binary Numbers

2002-08-28 Thread Stas Maximov
Hey Dave, It is much easier to use hex numbers when working with bits. Thus, the mask for the first (left) "quartet" would be 0xF000, second 0x0F00, third 0x00F0 and fourth 0x000F. To apply the mask use binary AND operator, which is "&" in case of PHP. After applying the mask you need to "shift-r

Re: [PHP] using variable ..help

2002-08-28 Thread Stas Maximov
Remon, Your code works correct, cause you coded it this way as it should go through the array and output every element in the array into one line. If I got your idea correctly - you probably want you rows to be of two different colors. You may do it simplier way: blablabbaba

Re: [PHP] Window/Page/Browser/Screen width

2002-08-28 Thread Stas Maximov
Hi Rick, The important thing to remember is that PHP (as any other similar language) is a server-side scripting language. It won't help you getting your client details apart of those sent in HTTP headers. You should rather consider looking into JavaScript capabilities to accomplish your task. HT

Re: [PHP] Compiling PHP with Sablot support

2002-08-27 Thread Stas Maximov
Hi, There should be a new entry like "XSLT enabled" under "XML enabled" in your PHPinfo in case of successful set-up. I'm not very familiar with the Unix build, but just to be sure can you check if you uncommented the xslt extension in your php.ini file (if any)? HTH, Stas - Original Message

Re: [PHP] problem with using include files

2002-08-27 Thread Stas Maximov
This should help you. This way the browser will look for images directory in the root of your webserver. Regards, Stas - Original Message - From: "Ivan Carey" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 27, 2002 1:50 PM Subject: [PHP] problem with using include fil

Re: [PHP] check unread messages in a forum

2002-08-26 Thread Stas Maximov
Hi, Just store the user's last log-in date/time either in the database or in cookie. On the next log-in "select * messages where creationDate > $userLastLoginDate" and highlight those selected. It won't work for every particular unread message, but I doubt if one needs to be that much specific.

Re: [PHP] Simple Security Clarification

2002-08-21 Thread Stas Maximov
"Outside" would be in '/var/www/secure' in your case. Or any other place your scripts have access to, save under '/var/www/html/'. HTH, Stas - Original Message - From: "Andre Dubuc" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 21, 2002 1:11 PM Subject: [PHP] Simple

Re: [PHP] Embeding images in HTML emails

2002-08-20 Thread Stas Maximov
www.phpclasses.org Stas - Original Message - From: "Andrew Perevodchik" <[EMAIL PROTECTED]> To: "Michael Sims" <[EMAIL PROTECTED]> Sent: Tuesday, August 20, 2002 3:06 PM Subject: Re: [PHP] Embeding images in HTML emails > Hello, Michael Sims! > > MS> I imagine that > MS> Manuel Lemos

Re: [PHP] Date Stuff...

2002-08-02 Thread Stas Maximov
(YearsDifference*12)+FullMonthsDifference :) Regards, Stas. - Original Message - From: "Brian McGarvie" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 02, 2002 1:50 PM Subject: [PHP] Date Stuff... > Given a date how would you work out number of months elapsed bet