RE: [PHP] Frames

2002-05-04 Thread Maxim Maletsky \(PHPBeginner.com\)

Yes,

But this is a JavaScript problem.

Please ask elsewhere or look at the Google. 
Also, take a look here:
http://developer.irt.org/script/script.htm

Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins



 -Original Message-
 From: Morten Nielsen [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, May 04, 2002 1:12 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Frames
 
 Hi,
 I got a page with 2 frames. In the first one I have an IMG. Is it
possible
 to get the URL from the second frame?
 
 Regards,
 Morten
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Javascript function

2002-05-04 Thread Maxim Maletsky \(PHPBeginner.com\)


 Is it possible to call a function in a javascriptpage from a PHP page?

Javascriptpage?

Do you mean using JavaScript to call a PHP function?
NO, it is not.

Because PHP is SERVER-SIDE and JavaScript is CLIENT-SIDE. You can do
vice versa though.



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP editing environment

2002-05-03 Thread Maxim Maletsky \(PHPBeginner.com\)

Two ways for you:

1. invest $200 (as you mentioned) in a little test server. Set there
Samba (samba.org) and simply save.file-refresh.browser

2. install FoxServ or PHPTriad or something else. Look at the
sourceforge.net. Or go manually installing the three - Apache, PHP,
mySQL on your Win. This is the easiest way.


Editors:

1. Look the list archives.
2. Browse the list archives.
3. Search the list archives.
4. If I ever would need to get a list of possible text editors I would
Look into, browse and search the archives of this list.

5. well, my idea is Edit Plus. I just love it - Its got all I need.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 03, 2002 5:36 PM
To: 'Pag'; [EMAIL PROTECTED]
Subject: RE: [PHP] PHP editing environment


It's too easy to install a web server, PHP, and MySQL on your own
computer and test everything locally. Apache works on Windows and *nix,
or you can try OmniHTTPd or PWS/IIS. PHP is a simple download and follow
the install instructions, and MySQL has an installation program, it just
takes a minute. 

---John Holmes...

 -Original Message-
 From: Pag [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 03, 2002 4:59 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP editing environment
 
 
   Hi, i am new to the list and i am quite impressed with whats
going
 on over
 here. Anyway, just have a small question.
   Have been coding php for a while now but i still havent found a 
 stable (easy and not time consuming) way of working in PHP, i mean, i 
 use homesite5 to code and when i want to test the php i upload the 
 scripts
and
 test them on the site. This process is a bit time consuming, so i 
 installed php on my winXP, but even like that i can only test small 
 things using
php
 master editor.
   Anyone know how i can make my work more efficient? Like install
MySQL 
 and PHP and get everything working normally when i preview the code in
 internet
 explorer, that would be perfect, is it possible? How do you guys and
girls
 work with php, what editors and/or tools you use?
   Thanks.
 
   Pag
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Turning OFF 'auto_prepend_file' on a page by page basis

2002-05-03 Thread Maxim Maletsky \(PHPBeginner.com\)


.htaccess


Not sure if ini_set() will work in your case. But try.



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Stefen Lars [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 03, 2002 3:02 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Turning OFF 'auto_prepend_file' on a page by page basis


Hello all

I am using 'auto_prepend_file' to include a load of files.

This is prepended to all PHP parsed files. The prepend files contain the

HTML for the framework of my site.

How I want to create an XML file for other web sites to use. I do this
by 
getting some data from a database and packaging it as RSS.

Correctly, PHP appends my prepend file HTML on top of the XML.

I do not want that, as it produced invalid XML. :-((

Is there a way to say, for example: Prepend this file to all files, but
NOT 
this one?

i.e. is it possible to 'turn off' the prepend functionality on a page by

page basis??

Thanks for your comments

S.


_
Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP editing environment

2002-05-03 Thread Maxim Maletsky \(PHPBeginner.com\)


Here's one good tutorial:

http://www.phpbeginner.com/columns/morten/win32




Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Steve Bradwell [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 03, 2002 3:00 PM
To: 'Pag'; [EMAIL PROTECTED]
Subject: RE: [PHP] PHP editing environment


I am using Apache php and MySQL at work and at home, at work I have a
win98 box and I use Maguma Studio Light for php as an editor, at home I
use VIM for my editor, Maguma is really working for me. What I did was
download php, MySql, and Apache then find a good tutorial, of which
there are many, on the net that deals with all three and how to
correctly install them. Once you figure out the config files, its as
easy as pie baby.

Then you can view your test scripts through ie, or hook Maguma up to
work with php and it renders the pages for you right in the editor. And
trust me its easy to do. One more thing, if you haven't already I
recommend getting phpMyAdmin to administer your mysql databases, this
combination blows any purchased product out of the water with ease of
use and speed.

-Steve.

-Original Message-
From: Pag [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 03, 2002 7:59 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP editing environment



Hi, i am new to the list and i am quite impressed with whats
going on over 
here. Anyway, just have a small question.
Have been coding php for a while now but i still havent found a
stable 
(easy and not time consuming) way of working in PHP, i mean, i use 
homesite5 to code and when i want to test the php i upload the scripts
and 
test them on the site. This process is a bit time consuming, so i
installed 
php on my winXP, but even like that i can only test small things using
php 
master editor.
Anyone know how i can make my work more efficient? Like install
MySQL and 
PHP and get everything working normally when i preview the code in
internet 
explorer, that would be perfect, is it possible? How do you guys and
girls 
work with php, what editors and/or tools you use?
Thanks.

Pag


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Include Files self aware?

2002-04-30 Thread Maxim Maletsky \(PHPBeginner.com\)

// In your config file:

function selfAwareInclude($filename) {
define($filename, true);
}



// in the file you are making an include

selfAwareInclude($filename)
include($filename);




Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins



 -Original Message-
 From: mArk.cOLListER [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 01, 2002 2:00 AM
 To: php
 Subject: Re: [PHP] Include Files self aware?
 
 
 The problem with this is you will loose the scope of your variables.
 
 So $filename will not have access to anything from where the function
is
 called...
 
   -mark
 
 On Tue, 30 Apr 2002, Billy S Halsey wrote:
 
  Try this code (untested):
 
  function selfAwareInclude($filename)
  {
  define($filename, true);
  include($filename);
  }
 
  Inside your include file, make calls such as
 
  if (defined($filename)) {
  // Do whatever
  }
 
  Then use the selfAwareInclude() function instead of include(). You
could
  do the same with require, etc.
 
  /bsh/
 
  PHP List wrote:
   Hi,
   Is it possible to detect if a file is being called as an include
or require?
  
   ex:
   include(file.php)-- file.php code can detect that is has
been
   called as an include.
  
   Thanks,
   Chris
  
  
 
 
  --
 
 
  /-=[ BILLY S HALSEY
]=--\
  | Member of Technical Staff, Sun Microsystems, Inc. ESP Solaris SW
|
  | All opinions and technical advice offered in this message are my
|
  | own and not necessarily endorsed by my employer.
|
  \--=[ [EMAIL PROTECTED]
]=/
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)

 What does the ! in if(!isset($id)) { $id = 0; } do? 


It checks for the false return. If isset($id) returns false then the
'if' statement with (!) returns you true, and, as you just guessed, it
will assign a (0) to $id.



 this bit does in general: checks if $id has been assigned anything, if
 it's empty it gets assigned 0. Correct? Then I can use if($id)
 statements later on without having PHP return Undefined Variable
 errors. Right?


To stop receiving the messages from undefined variables add this at top
of your files:

error_reporting(55);

 
 Thanks for your help, I'll work on my PHP listetiquette.
 
 Jason Soza




Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins









 
 - Original Message -
 From: 1LT John W. Holmes [EMAIL PROTECTED]
 Date: Thursday, April 25, 2002 5:35 am
 Subject: Re: [PHP] Parse Error - Help? (AGAIN)
 
  I don't have your original code (which, btw, you shoudn't ever
  post that
  much code without explicitly saying what the error was, what line
  it was
  one, highlighting that line, and saying what you've done so far),
  but these
  errors are caused by not giving a default value to a variable,
  basically.
  If you have something like this:
 
  if($id = 5)
  {
   //whatever
  }
 
  and $id hasn't been assigned a value, then you'll get that
  warning. In
  previous versions of PHP, you wouldn't get the warning, you'd just
get
  FALSE.
 
  So, before you test the value of a variable, or echo the value
  out, make
  sure you've assigned it something.
 
  if(!isset($id)) { $id = 0; }
 
  Hopefully that's not too confusingit's hard to explain.
 
  ---John Holmes...
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)

You know, I once said the same: better fix the notices and keep the code
clean. But as I've done several performance tests I came to a
conclusion that there's no much difference debugging the code yourself
or let PHP doing it. Often predefining manually a variable resulted to
me being even more 'expensive' then when PHP debugs it. I think it is
wise using this feature of PHP. The only reason not to is for having the
full control of your code.

Just my 2 Eurocents

Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins



 -Original Message-
 From: Nathan [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 25, 2002 7:15 PM
 To: PHP
 Subject: Re: [PHP] Parse Error - Help? (AGAIN)
 
 I'll second that one... always better to code with register_globals =
Off and E_ALL
 reporting level
 IMHO.
 
 # Nathan
 
 - Original Message -
 From: Philip Olson [EMAIL PROTECTED]
 To: Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED]
 
  To stop receiving the messages from undefined variables add this at
top
  of your files:
 
  error_reporting(55);
 
 Or better yet, keep as you're doing and develop with E_ALL
 and fix those E_NOTICE errors correctly! ;)
 
 Regards,
 Philip Olson
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Newbie Book Database Question

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)

 
 Hello,
 
 Chris Montgomery wrote:
  Howdy,
 
  I have been developing with ColdFusion for nearly five years and
want to
  learn PHP. For someone who has never done anything with PHP before,
what
  *one* book would you recommend as a good primer to get started
learning PHP?

Professional PHP Programming is a good one. Kind of outdated but gives
you an idea about the language.

For all the rest search the web.

  Also, do most PHPers use MySQL as your database when building
dynamic web
  sites, or do you prefer alternative databases like Postgres? From
what I
  have seen from afar, MySQL seems to be the dominant one, but I have
read
  that Postgres is more robust.

That is right. MySQL is good enough for many needs, but postgreSQL is
much more. It is more stable, robust, quick and has way more features.
From both DBs pgSQL is closer to Oracle than what mySQL is.

 You may like this book:
 
 http://www.phpclasses.org/products.html/id/0957921802.html
 
 Also take a look at the reviewed books in this page:
 
 http://www.phpclasses.org/products.html
 
 Regards,
 Manuel Lemos
 


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP Security Leak

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)

 -Original Message-
 From: Liam Gibbs [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 25, 2002 8:20 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP Security Leak
 
 I'm wondering if anyone has any ideas on how to make a
 login site more secure. Since I'm not really sure if
 I've explained myself well enough and don't really
 know how else to say it, I'll just give examples and
 then you guys can follow suit and mention some
 oversights:
 
 I have a regular logon: username and password. What it
 does is, when the user types in a name and pword, it
 forwards to another PHP page (a 'middleman' page that
 is there just to compare usernames and pwords),
 validates by checking the SQL database, then header
 forwards to the login page. A cookie is created, and
 voila, you're allowed into what we'll call the
 'account pages'. Now, here's my 'security' (notice the
 quotes):
 1. You can't log in when the URL includes a username
 and/or a password (so that no one can make direct
 links).
 2. Same with an account page: you're redirected to the
 login page if you include a username and pword when
 linking to an account page.
 3. The 'middleman' page also has this protection: you
 cna't directly link to it with a username and pword in
 the URL. Basically, users can't get into anything when
 they include a username and pword in the URL.
 4. Obviously, you don't get access if your username
 and password don't match anything in the database
 (thought I'd mention it even though it goes without
 saying).
 5. You can't login from a page that isn't on the
 server.
 
 Is there any validation or security holes that I'm
 overlooking?
 
 

at least this two:

1. Use SSL
2. Store passwords MD5 encrypted in the DB



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins



 
 __
 Do You Yahoo!?
 Yahoo! Games - play chess, backgammon, pool and more
 http://games.yahoo.com/
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] using html select as array

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)

Dame thing, no?

Your SELECT name=language[]. You can see all those selected as an
array.
Now, add the text type and call it something different (ie;
custom_lang).

In the page, 

?

If(strlen($_GET['custom_lang'])) {
// do insert of this 
}
else {
// loop the $_GET['Language'] and create your select.
}

Alternatively, you can ALWYS do this second condition, just override
about the language[] if custom_lang is set.


If(strlen($_GET['custom_lang'])) {
($_GET['Language'] =  Array($_GET['custom_lang']);
}

// loop the language[] and create your select.


?


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins



 -Original Message-
 From: Rodrigo Peres [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 25, 2002 8:22 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] using html select as array
 
 Hi list,
 
 In my system I have multiples choices of language that user selects
 using drop down menus. So I've named this dropdows language[] and grab
 it as php array, and with looo i insert it into mysql as registers.
But
 now i need to put a text field that the user can type any language
that
 is not in the dropdown. my question is how can i know when this was
 typed when i do the select to update the user itens. I mean, when i
 select and populate your preferences to update, how can i know that
this
 info is from the input text???
 
 
 Thank's
 
 Rodrigo
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)

 I would agree that performance-wise, there may be little difference in
how fast a
 script runs. And
 for pre-defining variables, sure you can get away without doing that
and php will
 happily help you
 out. However, I find it easier to debug my code knowing whether or not
I
 remembered to assign a
 value to my variable and where the heck it got assigned from. :-)


This is true. Whatever I write I always have variable *I* created, all
the rest are $_*[] and good old $HTTP_*_VARS[]. I always had register
globals off. So, in this way, since I know that every variable is mine,
why do I have to leave error_reporting E_ALL?

 
 I would also like to point out that the combo of not registering
globals and having all
 errors
 reported will ensure you get the right data type when using the same
variable names
 for _POST,
 _SESSION, et cetera data. I had a few scripts that behaved differently
than I though
 because I was
 looking for the value of $foo and not realizing that my $foo was
grabbing my session
 data instead of
 what I thought I was assigning it to. I changed my php.ini and now I
tear out far less
 hair this way
 ;-)


Once again, use $_SEESION and this is resolved.
Good point about variable types. Setting them before solves this
problem.

Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins

 
 # Nathan
 
 
 - Original Message -
 From: Maxim Maletsky (PHPBeginner.com)
[EMAIL PROTECTED]
 To: 'Nathan' [EMAIL PROTECTED]; 'PHP'
[EMAIL PROTECTED]
 Sent: Thursday, April 25, 2002 12:18 PM
 Subject: RE: [PHP] Parse Error - Help? (AGAIN)
 
 
 You know, I once said the same: better fix the notices and keep the
code
 clean. But as I've done several performance tests I came to a
 conclusion that there's no much difference debugging the code yourself
 or let PHP doing it. Often predefining manually a variable resulted to
 me being even more 'expensive' then when PHP debugs it. I think it is
 wise using this feature of PHP. The only reason not to is for having
the
 full control of your code.
 
 Just my 2 Eurocents
 
 Sincerely,
 
 Maxim Maletsky
 Founder, Chief Developer
 
 www.PHPBeginner.com   // where PHP Begins
 
 
 
  -Original Message-
  From: Nathan [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, April 25, 2002 7:15 PM
  To: PHP
  Subject: Re: [PHP] Parse Error - Help? (AGAIN)
 
  I'll second that one... always better to code with register_globals
=
 Off and E_ALL
  reporting level
  IMHO.
 
  # Nathan
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] getting a string from an external asp file

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)


You can POST forms transparently between servers by using sockets.
Basically, your PHP file will simply send the POSTed data to a page and
will read it after that. Then you parse the ASP output and vuala!

Start here:

www.php.net/fsockopen

Good Luck!


Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins



 -Original Message-
 From: Purple Tiger [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 25, 2002 9:37 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] getting a string from an external asp file
 
 This has probably been answered somewhere else, but I'm bashing my
head
 against a wall trying to find the answer.
 
 I'm trying to call an external ASP file from a different server (for
 e-commerce authorisation) and send POST data to it.  The ASP will
return
 only a string (ie prints it!!) and I need to get this into a variable
so I
 can process it.
 
 I assume I can't use a FORM for this as the ASP doesn't return HTML
data.
 
 I've tried EXEC, but to no avail and need some help here.
 Thanks in advance.
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP Security Leak

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)

Create yourself an SQL function that does that :-)



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins



 -Original Message-
 From: Joshua b. Jore [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 25, 2002 10:26 PM
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] PHP Security Leak
 
 This brings up another issue, how the heck do you get data binding?
For
 the life of me I don't see where the _query functions support SQL
like:
 
 SELECT AuthenticateUser(?,?) where then the first param might be a
 usernamd and the second would be a password. The idea is that without
this
 sort of thing you are vunerable to SQL insertion attacks.
 
 Joshua b. Jore
 http://www.greentechnologist.org
 
 On Thu, 25 Apr 2002, Maxim Maletsky (PHPBeginner.com) wrote:
 
   -Original Message-
   From: Liam Gibbs [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, April 25, 2002 8:20 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] PHP Security Leak
  
   I'm wondering if anyone has any ideas on how to make a
   login site more secure. Since I'm not really sure if
   I've explained myself well enough and don't really
   know how else to say it, I'll just give examples and
   then you guys can follow suit and mention some
   oversights:
  
   I have a regular logon: username and password. What it
   does is, when the user types in a name and pword, it
   forwards to another PHP page (a 'middleman' page that
   is there just to compare usernames and pwords),
   validates by checking the SQL database, then header
   forwards to the login page. A cookie is created, and
   voila, you're allowed into what we'll call the
   'account pages'. Now, here's my 'security' (notice the
   quotes):
   1. You can't log in when the URL includes a username
   and/or a password (so that no one can make direct
   links).
   2. Same with an account page: you're redirected to the
   login page if you include a username and pword when
   linking to an account page.
   3. The 'middleman' page also has this protection: you
   cna't directly link to it with a username and pword in
   the URL. Basically, users can't get into anything when
   they include a username and pword in the URL.
   4. Obviously, you don't get access if your username
   and password don't match anything in the database
   (thought I'd mention it even though it goes without
   saying).
   5. You can't login from a page that isn't on the
   server.
  
   Is there any validation or security holes that I'm
   overlooking?
  
  
 
  at least this two:
 
  1. Use SSL
  2. Store passwords MD5 encrypted in the DB
 
 
 
  Sincerely,
 
  Maxim Maletsky
  Founder, Chief Developer
 
  www.PHPBeginner.com   // where PHP Begins
 
 
 
  
   __
   Do You Yahoo!?
   Yahoo! Games - play chess, backgammon, pool and more
   http://games.yahoo.com/
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Redirect

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)


With header you can do by using

header(Location: http://www.site.com/some/page.php?some=var;);

here's a good article about it:
http://www.phpbeginner.com/columns/shobhan/browser

other than that, you can always include(). But this is a little bit of a
mess.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins



 -Original Message-
 From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 26, 2002 2:10 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Redirect
 
 Hi to all,
 
 I am wondering if there are other ways to redirect users other than
using
 header()?
 
 I have a script that if the user doesn't have enough money to buy an
item
 then it directs to one page and if they do then it directs them back
to the
 referring page.
 
 Is this possible?
 
 
 Thanks
 Jennifer
 
 --
 The sleeper has awaken
 
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] phpnuke still around?

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)

Try looking on sourceforge (www.sf.net)


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Dennis Gearon [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 12:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP] phpnuke still around?


http://www.phpnuke.org/ doesn't respond. Is it still a valid
project/product? Where is it?

PLEASE cc me.
-- 

If You want to buy computer parts, see the reviews at:
http://www.cnet.com/ **OR EVEN BETTER COMPILATIONS**!!
http://sysopt.earthweb.com/userreviews/products/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] security

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)



Was the question is it neccessary or how to do it secure?

I myself don't tlike the idea,
But if needed, then this could be a way.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 3:51 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: [PHP] security


At 22.04.2002  15:17, you wrote:

Search archives, as a tip I'd suggest to encrypt the Credit Card
numbers with RC4 or some other algorithm.

Maxim,

I don´t agree your suggestion, as I mentioned earlier on the list, avoid

storing CC numbers
unless it´s absolutely necessary, you´ve got a good insurance, and are
your own ISP knowing a lot of network security. Your suggestions may
make php-coder think that it is possible to store these data secure. But
that´s 
not only
depending on php. If you store any data in an ISP-environment, you
cannot be shure that this is secure, as you don´t know how they set up
their servers, 
firewalls ...

I wouldn´t give this suggestion without any word on this.

Oliver


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP Lists

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)

Dan,

PHP General is pretty much about anything related to PHP in General -)
There are also other lists, look at php.net under support.

As of your questions:

1) List archives (the wildest ones) are on:
groups.google.com
marc.theaimsgroup.com

2) That could be hotscripts.com and sourceofrge.com. Also the very nice
PHP Objects (classes) repository is at phpclasses.org.

3) Nice and educative sites on the web are a lot. I recommend you mine
as the start though: www.PHPBeginner.com. Also, check out
newbienetwork.net and devshed.com




Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins






-Original Message-
From: Dan Horth [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 12:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Lists


Hi - being new to the lists and noticing that the first few posts that
came through have been reasonably specific and implementation based I
was wondering if there were any other more general php solution type
lists - or is it appropriate to post is there a php solution for this
type questions to this list too?

Also being new to PHP development I was wondering if someone could point
me in the direction of:

1) list archives for this list
2) good php script repository sites
3) any other php development related sites or lists that will help get
me going!

thanks in advance, dan.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] what constants are in php like __FILE__

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)

Try this:

php.net/constants



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: nospam [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 2:36 PM
To: 'Php-General
Subject: [PHP] what constants are in php like __FILE__


Hi all
 
I'm just curious what other constants in php are defined. I found out
about __FILE__ today which is great, if you use a lot of include 
require... any hints where or how to find a list?
 
Sebastian
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] registering an array to a session?

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)

Yes,

just assign it as if you would do with a string or integer.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Christoph Starkmann [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 2:46 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] registering an array to a session?


Hi all!

Is it possible to register an array to a session with PHP 4?

If yes, how can it be done?

Cheers,

Kiko
-- 
It's not a bug, it's a feature.
christoph starkmann
mailto:[EMAIL PROTECTED]
http://www.gruppe-69.com/
ICQ: 100601600
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Upload

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)


E.. si, capita a molti qui :-)


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Neil Highley [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 4:53 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Upload


Now this IS lazy programming.

;-)

[EMAIL PROTECTED]
---
Life must be lived as play.
- Plato (427 - 347 BC)

 - Original Message -
 From: Gabriele Biondo 
 To: Richard Emery [EMAIL PROTECTED]
 Sent: Wednesday, April 24, 2002 8:20 AM
 Subject: R: [PHP] Upload


 nope - to be honest, i didn't think to seek in the manual.
 Do you know where specifically?

 Thanks

 Gabriele

 -Messaggio originale-
 Da: Richard Emery [mailto:[EMAIL PROTECTED]]
 Inviato: mercoledì 24 aprile 2002 14.11
 A: [EMAIL PROTECTED]; ML PHP
 Oggetto: Re: [PHP] Upload


 The PHP Manual has complete instructions for this.  Did you look there
yet?

 - Original Message -
 From: Gabriele Biondo [EMAIL PROTECTED]
 To: ML PHP [EMAIL PROTECTED]
 Sent: Wednesday, April 24, 2002 8:00 AM
 Subject: [PHP] Upload


 Hi, guys!
 Does anyone know how to write a php script to upload a file from my 
 browser? Moreover; how could i avoid security errors?

 Thanx in advance

 Gabriele

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Background Processing

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)


You can use PHP-GTK in the background. Just call it with cron.
Alternatively, you can set PHP to keep executing on the user exit. What
was that function called? on_*_shutdown()?

Could be dangerous though, what if it goes to loop-in your server? 30
mins is quite a few for a script to run. So, check also
max_execution_time directiv in your PHP.INI.

Or, the best is - loop up a way to reduce (or split) the times.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Richard Perez [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 5:33 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Background Processing


Hi people!!

I'm trying to find a way to handle this but I don't come up with
anything.

I need to execute a query to a DB using PHP. The thing is that the query
takes 0.5 hours to execute and I can't wait that time with the browser
opened in that page.

What I want to do is to execute a PHP code block in some sort of
background way so I can execute the query and send the results via
email.


Any ideas to do this??


Thanks a lot.

Richard.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] can someone help?

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)


Hey, I started playing with your code for a while ... And then
realized.. What you're trying to do it to reproduce chunk_split()
function.
Try other work arounds for this.

Read the docs,
Start from here: www.php.net/chunk_split


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Kirk Babb [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 5:35 PM
To: [EMAIL PROTECTED]
Subject: [PHP] can someone help?


First, here's my code:
?php
$string=Why am I trying to do this crazy stuff when I should know
better?;
$array=preg_split([\s], $string);
// just a test of the preg_split results
// print_r($array);
$i=0;
$count = count($array);
$container=0;
while ($container = 20) {
$box = strlen($array[$i]);
$container=$container + $box;
$i++;
}
$returned_string=;
$j=0;
while ($j = $i) {
$returned_string .= $array[$j] .  ;
$j++;
}
print $returned_string . br;
?
Works great on the first line, but I'm stuck on printing the remaining
part of the array using some sort of loop.  I've tried a few things but
get endless loops.  In the end I'd like to make this a function and just
give it the string and the container length as arguments.can someone
give me some advice?

THANKS! :)



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] replacing first occurence

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)


Two ways:

1.  $string = preg_replace(^.{1}, 'h', 'bill');   // will make
'h'ill out of 'b'ill
2.  $string = 'h'.substr('bill', 1);// will
get rid of the first char and concatenate



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Diana Castillo [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 6:09 PM
To: [EMAIL PROTECTED]
Subject: [PHP] replacing first occurence


What function can I use to replace just the first occurence of a , in
a string? Thank you



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] comparing time (related question)

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)

I think Miguel said it all:

I will just add you this reference on mySQL (if that's what you use)
field types reference.

http://mysql.com/doc/D/a/Date_and_time_functions.html

As of performance I'd say:
The logic should be: 

Store all the data in DB so when you retrieve it you can do every
comparison right within SQL having so raw data for PHP to layout on your
pages. That is the first rule of dynamicity, and RDBMS (even if mySQL is
kind of not...) usually count on such uses.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Miguel Cruz [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 6:20 PM
To: Jackson Miller
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] comparing time (related question)


On 24 Apr 2002, Jackson Miller wrote:
 When storing dates and times in databases is it better to store them 
 as UNIX timestamps or in one of the SQL date/time types?
 
 I am working on an application that takes school attendance and has 
 homework assignments, so I am doing a fair amount of date work. 
 Currently I am storing everything as date time and referring to a day 
 with the UNIX timestamp for  midnight of that day.  I am able to do 
 everything I need to do with both formats, but I am wondering if there

 is a performance issue at hand.

If you want to use your database's time functions for comparison or
grouping when selecting data, then it usually makes sense to use the
database's native time format. Easy enough to convert back and forth
(it's usually cheaper to have the database convert to unix timestamps
and to have PHP convert in the other direction, from timestamps to
database format).

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] phpnuke still around?

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)

I'd give you a medal for these words :-)


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Brian McGarvie [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 6:23 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] phpnuke still around?


it exists, and url works fine for me, but why use phpnuke? all ya end up
with is lots of dull sites that look the same :)

-Original Message-
From: Dennis Gearon [mailto:[EMAIL PROTECTED]]
Sent: 23 April 2002 23:56
To: [EMAIL PROTECTED]
Subject: [PHP] phpnuke still around?


http://www.phpnuke.org/ doesn't respond. Is it still a valid
project/product? Where is it?

PLEASE cc me.
-- 

If You want to buy computer parts, see the reviews at:
http://www.cnet.com/ **OR EVEN BETTER COMPILATIONS**!!
http://sysopt.earthweb.com/userreviews/products/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] looking for script

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)


A chat?
A website?
A sourceforge :-)

Anyway, try hotscripts.com whatever you're looking for.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Teqila MAN [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 6:27 PM
To: [EMAIL PROTECTED]
Subject: [PHP] looking for script


Hello,

 I;m looking for an exchange script. User can share information but they
have to register.

Do u know sth like that?

Teqilaman



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Not A PHP question but I need help in a big way...

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)

There was some kind of ASP for Linux. I only heard of it.
Search.

Also, for apache's mailing list look on the Groups of Google.



May god have mercy on your soul... Amen



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins



 -Original Message-
 From: [-^-!-%- [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 25, 2002 2:37 AM
 To: Chuck PUP Payne
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Not A PHP question but I need help in a big way...
 
 
 
   You can do ASP on Apache via the ChiliSOFT module/component/plugin (
or
 whatever it's considered).
 
 www.chilisoft.com
 
 
 
 __John Monfort_
 _+---+_
  P E P I E  D E S I G N S
www.pepiedesigns.com
 The world is waiting, are you ready?
 -+___+-
 
 On Mon, 22 Apr 2002, Chuck PUP Payne wrote:
 
  Hi,
 
  I just got finish will a meeting from HELL, I need to ask can some
one tell
  me is there an Apache Mailing List like this. I have to ask if I can
do ASP
  page on Apache, I know I know please don't flame me, I kept trying
to get
  them to switch to PHP, but I been told to shut my mouth and just
find out
  this information. So I am sorry that I am asking but I not sure
where to
  start.
 
  Chuck Payne
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] To store or not to store . . .

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)


 Personally I think databases these days (MySQL in my experience at
 least) are more than reliable enough and fast enough to serve up
 binary data in quite large quantities. If you run into performance
 issues, implement a caching solution run from a crontab.

I had a very, very bad experience with mySQL when a very simple table
(inserts at 99%) that got over 350.000 rows (100MB). So I wouldn't say
MySQL in my experience at least. As I migrated that barely-lost table
to postgreSQL (almost identical designs) it still goes on and currently
has over 1.000.000 rows (400MB)

Just my .002 EuroCents.

The rest on why to keep the images in Db is a very good answer.
Actually, it is so good that I might even write an article on this
issue.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] read text file into mysql

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)

Do this:

$contents = file($file);

foreach($contents as $line_num=$line_data) {
$data = explode('|', $line_data);


// now data contains:
// [0] = aa
// [1] = bb
// [2] = cc
// nd so on

}



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins



 -Original Message-
 From: Rodrigo Peres [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 25, 2002 2:14 AM
 To: PHP
 Subject: [PHP] read text file into mysql
 
 Hi list,
 
 I need to read a txt file and insert it lineas a record in mysql.
 My list in the format
 aa|b | cc |
 fff|hhdhdhdh|jsjjsjs
 
 in other words my separator is | and the lines have a return at the
end of
 each one.
 
 I'm new to PHP, so can anyone help me with and Idea???
 
 thank's in advance
 
 Rodrigo
 --
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] SourceForge. Whats the worst part about it?

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)

SF is OK, as every other software it itself may have some problems from
time to time. But overall it always works. You might be frustrated abut
the security precautions it takes, but this is only for your best.

Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins



 -Original Message-
 From: David Duong [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 25, 2002 12:56 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] SourceForge. Whats the worst part about it?
 
 Hello,
 
 Currently I am using SourceForge for a variety of Projects and now
some
 issues have surfaced concerning SF quality.  Now I am now wonder what
is the
 worst downfall about SF?  Now SourceForge is a very great tool as
mention
 earlier, it is a very useful tool in Open Source and I am quite sure
many
 people believe that also, I would also like to hear from this side.
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] -- I N C L U D E -- O R -- F O P E N -- ?

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)


 Hi,
 
 I am not a PHP programmer. (Sorry Guys;-)
 Although, I am working on a PHP portal type site, where I need to
 integrate as seemlessly(?) as possible an outside specialized leased
 Search Engine Service done with ASP (I suppose? .asp).

yup, probably ASP.
 
 I have been looking everywhere for this info. Just can't seem to get
 it all together.
 I done some tests but the images acompanying the Search form are not
 following. I suppose if I ask the them to put absolute paths... ?

you can combine your own. If the images returned have an absolute path,
not URL (without http://..., like: /dir/file.png) all you have to do is
to figure out what the URL is and then compose it yourself.
 
 --- 1.  Is it technically possible with PHP to interact with the
 engine's pages and the results it pushs so that it feels as if it was
 part of the site?

Yes

 --- 2.  I don't understand the differences between include ,
 fopen and even fopen.
 What would be the best way to do the job if it is doable of course
;-)

For remote access they are kind of similar. Use include, it is easier to
learn.
Try this;

?
Include('http://www.google.com');
?

you will see the whole google under your domain name.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Setcookie problems...

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)


From the manual (and with honor):

int setcookie ( string name [, string value [, int expire [, string path
[, string domain [, int secure])

so ?
   setcookie (TestCookie, $value,time()+3600, /~rasmus/,
.utoronto.ca, 1);
?


limits the cookie to work on only one specified folder

see for more: www.php.net/setcookie

Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins



 -Original Message-
 From: Erik Price [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 24, 2002 9:32 PM
 To: Pusta
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Setcookie problems...
 
 
 On Wednesday, April 24, 2002, at 03:27  PM, Pusta wrote:
 
  When we are setting a cookie in a PHP page, that cookie cannot be
  accessed
  by any page in a different folder.  When we move the pages into the
same
  folder, the cookies worked fine.  Can anyone shed some light on
this??
 
 Is the different directory pointed to by a different virtual host?  I
 could be completely mistaken, but don't cookies only work on a
 per-domain name basis?
 
 If that's not it, I don't know what else it could be.
 
 Erik
 
 
 
 
 
 
 Erik Price
 Web Developer Temp
 Media Lab, H.H. Brown
 [EMAIL PROTECTED]
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] authentication

2002-04-23 Thread Maxim Maletsky \(PHPBeginner.com\)

There are several ways to do that,
But in your case, I believe the best would be having a page somewhere
and include the protected files.

Alternativelly look into the Chapter 17. of PHP Documentation: HTTP
authentication with PHP
http://it2.php.net/manual/en/features.http-auth.php



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins





I have one directory that is protected with an .htaccess file on my
server
where I store all member content. What I want to do is have a page where
members can log in, and after they have entered there user name and
password
I what the php script to authenticate them against the .htaccess file.
If
they are authenticated I would like to keep track of that as one of
there
session variables, so that they do not have to re-authenticate when they
try
to access content in the protected directory. Essentially what I am
trying
to do is give them access to the .htaccess protected based from a
submit
form. Instead of requiring that they get the standard user name and
password pop up window that one gets when you try to access a directory
that
is password protected on Apache. 
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] If else question

2002-04-23 Thread Maxim Maletsky \(PHPBeginner.com\)


Look also at the examples in docs:

--
header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);// Date in the past
header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT); 
// always modified
header(Cache-Control: no-store, no-cache, must-revalidate);  //
HTTP/1.1
header(Cache-Control: post-check=0, pre-check=0, false);
header(Pragma: no-cache);  // HTTP/1.0 
--

php.net/header



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Richard Emery [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 23, 2002 7:41 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Fw: [PHP] If else question


OK...this has dragged on...

Jennifer, show us your ACTUAL code, including database access
statements.

We can't help you if you expect us to read your mind...

- Original Message -
From: Jennifer Downey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 23, 2002 12:17 PM
Subject: Re: [PHP] If else question


No this is the first if statement but there are nested if's after that.
I'd post the code but everyone yells at me about my coding style. If you
promise not to yell I will post it.

Jennifer
-Bd- [EMAIL PROTECTED] wrote in message
001d01c1eae9$d58f4360$[EMAIL PROTECTED]">news:001d01c1eae9$d58f4360$[EMAIL PROTECTED]...
 Is this a nested if? (inside another if statement?)




 - Original Message -
 From: Jennifer Downey [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, April 23, 2002 1:05 PM
 Subject: Re: [PHP] If else question


 
  I just looked at my hosting service thinkg it may have been because 
  they just upgraded to 4.1 php. so I dumped my database and loaded it

  to my machine at home and find that it does the same thing.
 
  I have 4.06 php on win me my hosting service is 4.1 php on redhat 
  linux
so
  I'm thinking that is not the case.
 
  I have used this code through out my site and this is the only part 
  it
 does
  this on and I am not understanding why.
 
  Jennifer
 
 
 
 
  Natalie Leotta [EMAIL PROTECTED] wrote in message 
  7546CB15C0A1D311BF0D0004AC4C4B0C024ABFC4@SSIMSEXCHNG">news:7546CB15C0A1D311BF0D0004AC4C4B0C024ABFC4@SSIMSEXCHNG...
   My officemate and I talked about this and the only thing he could 
   come
 up
   with was a possible problem with your parser.  Are you using a 
   beta
  version
   or something unusual?  I don't know if you have a way to know this

   -
the
   programmers didn't set up PHP where I work, but I know our web 
   server
is
   apache and it's on a unix box.  I've never run into this problem
before.
   Have you had it happen in other programs?  Have you ever used this
code
 in
   another program?  If it's consistently incorrect then it may be a
 problem
   with your parser.  That's not really my area of expertise, but 
   it's something you could look into if no one else has any better 
   ideas :-)
  
   -Natalie
  
   -Original Message-
   From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, April 23, 2002 12:26 PM
   To: [EMAIL PROTECTED]
   Subject: Re: [PHP] If else question
  
  
   It shows both.
  
   Natalie Leotta [EMAIL PROTECTED] wrote in message 
   7546CB15C0A1D311BF0D0004AC4C4B0C024ABFC3@SSIMSEXCHNG">news:7546CB15C0A1D311BF0D0004AC4C4B0C024ABFC3@SSIMSEXCHNG...
Does it show the message and the form or just the message?
   
-Natalie
   
-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 12:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] If else question
   
   
   
 If and else expect to be followed by exactly 1 statement. To 
 aggregate multiple statements as one, surround them with 
 {curly braces}. I'm guessing you didn't do that, and you're 
 seeing the execution of all but the first of the statements 
 following the
else.

 So it should be:

   if ($var1)
 echo can't be found;
   else
   {
 echo first line of form;
 echo second line of form;
   }
This is what I have:
   
if($quantity  1)
{
echo Sorry I can't seem to locate this item;
}
else
{
do this
}
So yes I have done exactly as you have stated and it still shows

the form.
   
Jennifer
   
   
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
  
  
   ---
   Outgoing mail is certified Virus Free.
   Checked by AVG anti-virus system (http://www.grisoft.com).
   Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: 

RE: [PHP] If else question

2002-04-23 Thread Maxim Maletsky \(PHPBeginner.com\)


Post it, Jennifer, post it - we promise not to yell
(ignore the yelling people - they never sleep enough, that is why...)


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 23, 2002 7:18 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] If else question


No this is the first if statement but there are nested if's after that.
I'd post the code but everyone yells at me about my coding style. If you
promise not to yell I will post it.

Jennifer
-Bd- [EMAIL PROTECTED] wrote in message
001d01c1eae9$d58f4360$[EMAIL PROTECTED]">news:001d01c1eae9$d58f4360$[EMAIL PROTECTED]...
 Is this a nested if? (inside another if statement?)




 - Original Message -
 From: Jennifer Downey [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, April 23, 2002 1:05 PM
 Subject: Re: [PHP] If else question


 
  I just looked at my hosting service thinkg it may have been because 
  they just upgraded to 4.1 php. so I dumped my database and loaded it

  to my machine at home and find that it does the same thing.
 
  I have 4.06 php on win me my hosting service is 4.1 php on redhat 
  linux
so
  I'm thinking that is not the case.
 
  I have used this code through out my site and this is the only part 
  it
 does
  this on and I am not understanding why.
 
  Jennifer
 
 
 
 
  Natalie Leotta [EMAIL PROTECTED] wrote in message 
  7546CB15C0A1D311BF0D0004AC4C4B0C024ABFC4@SSIMSEXCHNG">news:7546CB15C0A1D311BF0D0004AC4C4B0C024ABFC4@SSIMSEXCHNG...
   My officemate and I talked about this and the only thing he could 
   come
 up
   with was a possible problem with your parser.  Are you using a 
   beta
  version
   or something unusual?  I don't know if you have a way to know this

   -
the
   programmers didn't set up PHP where I work, but I know our web 
   server
is
   apache and it's on a unix box.  I've never run into this problem
before.
   Have you had it happen in other programs?  Have you ever used this
code
 in
   another program?  If it's consistently incorrect then it may be a
 problem
   with your parser.  That's not really my area of expertise, but 
   it's something you could look into if no one else has any better 
   ideas :-)
  
   -Natalie
  
   -Original Message-
   From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, April 23, 2002 12:26 PM
   To: [EMAIL PROTECTED]
   Subject: Re: [PHP] If else question
  
  
   It shows both.
  
   Natalie Leotta [EMAIL PROTECTED] wrote in message 
   7546CB15C0A1D311BF0D0004AC4C4B0C024ABFC3@SSIMSEXCHNG">news:7546CB15C0A1D311BF0D0004AC4C4B0C024ABFC3@SSIMSEXCHNG...
Does it show the message and the form or just the message?
   
-Natalie
   
-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 12:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] If else question
   
   
   
 If and else expect to be followed by exactly 1 statement. To 
 aggregate multiple statements as one, surround them with 
 {curly braces}. I'm guessing you didn't do that, and you're 
 seeing the execution of all but the first of the statements 
 following the
else.

 So it should be:

   if ($var1)
 echo can't be found;
   else
   {
 echo first line of form;
 echo second line of form;
   }
This is what I have:
   
if($quantity  1)
{
echo Sorry I can't seem to locate this item;
}
else
{
do this
}
So yes I have done exactly as you have stated and it still shows

the form.
   
Jennifer
   
   
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
  
  
   ---
   Outgoing mail is certified Virus Free.
   Checked by AVG anti-virus system (http://www.grisoft.com).
   Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
 
  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: 

RE: [PHP] Browser Cache

2002-04-23 Thread Maxim Maletsky \(PHPBeginner.com\)

Sorry, that was regarding the browser cache.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Maxim Maletsky (PHPBeginner.com)
[mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 23, 2002 7:44 PM
To: 'Richard Emery'; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP] If else question



Look also at the examples in docs:

--
header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);// Date in the past
header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT); 
// always modified
header(Cache-Control: no-store, no-cache, must-revalidate);  //
HTTP/1.1
header(Cache-Control: post-check=0, pre-check=0, false);
header(Pragma: no-cache);  // HTTP/1.0 
--

php.net/header



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Richard Emery [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 23, 2002 7:41 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Fw: [PHP] If else question


OK...this has dragged on...

Jennifer, show us your ACTUAL code, including database access
statements.

We can't help you if you expect us to read your mind...

- Original Message -
From: Jennifer Downey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 23, 2002 12:17 PM
Subject: Re: [PHP] If else question


No this is the first if statement but there are nested if's after that.
I'd post the code but everyone yells at me about my coding style. If you
promise not to yell I will post it.

Jennifer
-Bd- [EMAIL PROTECTED] wrote in message
001d01c1eae9$d58f4360$[EMAIL PROTECTED]">news:001d01c1eae9$d58f4360$[EMAIL PROTECTED]...
 Is this a nested if? (inside another if statement?)




 - Original Message -
 From: Jennifer Downey [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, April 23, 2002 1:05 PM
 Subject: Re: [PHP] If else question


 
  I just looked at my hosting service thinkg it may have been because
  they just upgraded to 4.1 php. so I dumped my database and loaded it

  to my machine at home and find that it does the same thing.
 
  I have 4.06 php on win me my hosting service is 4.1 php on redhat
  linux
so
  I'm thinking that is not the case.
 
  I have used this code through out my site and this is the only part
  it
 does
  this on and I am not understanding why.
 
  Jennifer
 
 
 
 
  Natalie Leotta [EMAIL PROTECTED] wrote in message
  7546CB15C0A1D311BF0D0004AC4C4B0C024ABFC4@SSIMSEXCHNG">news:7546CB15C0A1D311BF0D0004AC4C4B0C024ABFC4@SSIMSEXCHNG...
   My officemate and I talked about this and the only thing he could
   come
 up
   with was a possible problem with your parser.  Are you using a
   beta
  version
   or something unusual?  I don't know if you have a way to know this

   -
the
   programmers didn't set up PHP where I work, but I know our web
   server
is
   apache and it's on a unix box.  I've never run into this problem
before.
   Have you had it happen in other programs?  Have you ever used this
code
 in
   another program?  If it's consistently incorrect then it may be a
 problem
   with your parser.  That's not really my area of expertise, but
   it's something you could look into if no one else has any better 
   ideas :-)
  
   -Natalie
  
   -Original Message-
   From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, April 23, 2002 12:26 PM
   To: [EMAIL PROTECTED]
   Subject: Re: [PHP] If else question
  
  
   It shows both.
  
   Natalie Leotta [EMAIL PROTECTED] wrote in message
   7546CB15C0A1D311BF0D0004AC4C4B0C024ABFC3@SSIMSEXCHNG">news:7546CB15C0A1D311BF0D0004AC4C4B0C024ABFC3@SSIMSEXCHNG...
Does it show the message and the form or just the message?
   
-Natalie
   
-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 12:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] If else question
   
   
   
 If and else expect to be followed by exactly 1 statement. To
 aggregate multiple statements as one, surround them with 
 {curly braces}. I'm guessing you didn't do that, and you're 
 seeing the execution of all but the first of the statements 
 following the
else.

 So it should be:

   if ($var1)
 echo can't be found;
   else
   {
 echo first line of form;
 echo second line of form;
   }
This is what I have:
   
if($quantity  1)
{
echo Sorry I can't seem to locate this item;
}
else
{
do this
}
So yes I have done exactly as you have stated and it still shows

the form.
   
Jennifer
   
   
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
   
   
   
--
PHP Ge

RE: [PHP] ASP to PHP

2002-04-23 Thread Maxim Maletsky \(PHPBeginner.com\)

Just try it on. I heard some good reviews about it.
And, if the site is not too complex, try estimating the time it would
take you to re-create the functionality and compare it to the time you
think you would take for debugging. I once had to do this and have
choosen rewriting the code ourselves.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: .ben [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 23, 2002 2:00 PM
To: PHP
Subject: RE: [PHP] ASP to PHP


I am in the process of porting an ASP site to PHP and am really chuffed
with how easy it is so far.  I am slightly worried that doing a straight
conversion may not be the best idea, but I plan to go through the site
again when i'm done, and optimise for PHP where possible.

 .b

 -Original Message-
 From: Cal Evans [mailto:[EMAIL PROTECTED]]
 Sent: 23 April 2002 12:53
 To: Chuck PUP Payne; [EMAIL PROTECTED]
 Subject: RE: [PHP] ASP to PHP


 Having moved a moderately sized website last year from ASP to PHP I 
 can say from experience that if you can re-write it, the move will go 
 smoother and you will have fewer lines of code. I ended up with about 
 1/2 as many lines of code to maintain after the port was done.
 =C=

 *
 * Cal Evans
 * Journeyman Programmer
 * Techno-Mage
 * http://www.calevans.com
 *


 -Original Message-
 From: Chuck PUP Payne [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 23, 2002 6:38 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] ASP to PHP


 I got a strange request from a client. He wants to be able to take his

 ASP pages and move them over to PHP so that he can run them on apache 
 on his linux server. I saw a tool yesterday ASP2PHP, but I am wanting 
 to know does it work, how much is lost, is it easy to use? Is there 
 another way to change
 ASP file to PHP with out a lot of re-writes?

 Chuck Payne


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] If else question

2002-04-23 Thread Maxim Maletsky \(PHPBeginner.com\)



OK, here's what I've done from your code.
Check the line I mentioned.



?

session_start();
$query = SELECT name FROM {$config[prefix]}_users WHERE
uid={$session[uid]};
$ret = mysql_query($query);
while($row = mysql_fetch_array($ret)) {

$user = $row['name'];

$query = SELECT uid, id, iname, image, quantity, type FROM
{$config[prefix]}_my_items WHERE uid={$session[uid]} AND id = '$id'
ORDER BY id; $ret = mysql_query($query);

while($row = mysql_fetch_array($ret)) {
$uiid = $row['uid'];
$iid = $row['id'];
$image = $row['image'];
$iname = $row['iname'];
$quantity = $row['quantity'];
$type = $row['type'];
// this is the problem if statement. Please don't yell
at me for my style. It is easy for me to read so I'm sorry if it's not
for you. if($quantity  1) { echo Sorry I can't seem to locate this
item; } else {

session_register(uiid);
session_register(iid);
session_register(image);
session_register(iname);
session_register(quantity);
session_register(type);


if($iid == $id) {
$display_block .=CENTERimg src=$image
border=0brfont size
=2$inameBR$quantityBR$typeBR/font/CENTER;

echo $display_blockBRBR;

if($type == food) {
//if the item food is present then set
an option and include in the form later
$thisoption=OPTION VALUE=\feed\Feed
my pet\n/OPTION;
}
else {
//if book or weapon is present then set
a blank
$thisoption=;
}
}
}
}


// !
}  // WHERE IS THIS COMING FROM
// 

//check if form has been submitted
if($submit) {
// better be if(!$submit)
}
else {

//if the form has not been submitted run the following

echo FORM ACTION='$PHP_SELF' METHOD='post';
echo SELECT NAME='sort' SIZE='1' ;
echo $thisoption;
echo OPTION VALUE='shop'Put in my shop/OPTION;
echo OPTION VALUE='locker'Put into my Footlocker/OPTION;
echo OPTION VALUE='discard'Discard this item/OPTION;
echo OPTION VALUE='donate'Donate this item/OPTION;
echo /SELECT;
echo INPUT TYPE='submit' VALUE='Submit' NAME='submit';
echo /FORM;

}


?


-





Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 23, 2002 7:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] If else question


Ok you asked for it.
Don't say I didn't warn you.

session_start();
$query = SELECT name FROM {$config[prefix]}_users WHERE
uid={$session[uid]}; $ret = mysql_query($query); while($row =
mysql_fetch_array($ret)) {

$user = $row['name'];



$query = SELECT uid, id, iname, image, quantity, type FROM
{$config[prefix]}_my_items WHERE uid={$session[uid]} AND id = '$id'
ORDER BY id; $ret = mysql_query($query); while($row =
mysql_fetch_array($ret)) {
  $uiid = $row['uid'];
 $iid = $row['id'];
  $image = $row['image'];
  $iname = $row['iname'];
  $quantity = $row['quantity'];
  $type = $row['type'];
// this is the problem if statement. Please don't yell at me for my
style. It is easy for me to read so I'm sorry if it's not for you.
if($quantity  1) { echo Sorry I can't seem to locate this item; }
else {

session_register(uiid);
session_register(iid);
session_register(image);
session_register(iname);
session_register(quantity);
session_register(type);


   if($iid == $id)
   {

$display_block .=CENTERimg src=$image border=0brfont size =
2$inameBR$quantityBR$typeBR/font/CENTER;

echo $display_blockBRBR;

  if($type == food)
  //if the item food is present then set an option and include in
the form later
  {
   $thisoption=OPTION VALUE=\feed\Feed my pet\n/OPTION;
  }
 else
{
//if book or weapon is present then set a blank
$thisoption=;
   }
  }
}
}
}
//check if form has been submitted
if($submit)
{

}
else
{

//if the form has not been submitted run the following


   echo FORM ACTION='$PHP_SELF' METHOD='post';
   echo SELECT NAME='sort' SIZE='1' ;
   echo $thisoption;
   echo OPTION VALUE='shop'Put in my shop/OPTION;
   echo OPTION VALUE='locker'Put into my Footlocker/OPTION;
   echo OPTION VALUE='discard'Discard this item/OPTION;
   echo OPTION VALUE='donate'Donate this item/OPTION;
   echo /SELECT;
   echo INPUT TYPE='submit' VALUE='Submit' NAME='submit';
   echo /FORM;


}

Jennifer



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system 

RE: [PHP] If else question

2002-04-23 Thread Maxim Maletsky \(PHPBeginner.com\)

Oh well.

The line I mentioned was not the right one.
I misSAW your comment.



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 23, 2002 7:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] If else question


Ok you asked for it.
Don't say I didn't warn you.

session_start();
$query = SELECT name FROM {$config[prefix]}_users WHERE
uid={$session[uid]}; $ret = mysql_query($query); while($row =
mysql_fetch_array($ret)) {

$user = $row['name'];



$query = SELECT uid, id, iname, image, quantity, type FROM
{$config[prefix]}_my_items WHERE uid={$session[uid]} AND id = '$id'
ORDER BY id; $ret = mysql_query($query); while($row =
mysql_fetch_array($ret)) {
  $uiid = $row['uid'];
 $iid = $row['id'];
  $image = $row['image'];
  $iname = $row['iname'];
  $quantity = $row['quantity'];
  $type = $row['type'];
// this is the problem if statement. Please don't yell at me for my
style. It is easy for me to read so I'm sorry if it's not for you.
if($quantity  1) { echo Sorry I can't seem to locate this item; }
else {

session_register(uiid);
session_register(iid);
session_register(image);
session_register(iname);
session_register(quantity);
session_register(type);


   if($iid == $id)
   {

$display_block .=CENTERimg src=$image border=0brfont size =
2$inameBR$quantityBR$typeBR/font/CENTER;

echo $display_blockBRBR;

  if($type == food)
  //if the item food is present then set an option and include in
the form later
  {
   $thisoption=OPTION VALUE=\feed\Feed my pet\n/OPTION;
  }
 else
{
//if book or weapon is present then set a blank
$thisoption=;
   }
  }
}
}
}
//check if form has been submitted
if($submit)
{

}
else
{

//if the form has not been submitted run the following


   echo FORM ACTION='$PHP_SELF' METHOD='post';
   echo SELECT NAME='sort' SIZE='1' ;
   echo $thisoption;
   echo OPTION VALUE='shop'Put in my shop/OPTION;
   echo OPTION VALUE='locker'Put into my Footlocker/OPTION;
   echo OPTION VALUE='discard'Discard this item/OPTION;
   echo OPTION VALUE='donate'Donate this item/OPTION;
   echo /SELECT;
   echo INPUT TYPE='submit' VALUE='Submit' NAME='submit';
   echo /FORM;


}

Jennifer



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] If else question

2002-04-23 Thread Maxim Maletsky \(PHPBeginner.com\)


Try this, Jennifer:

Without messing the rest of your code, change the line:

$quantity = $row['quantity'];

With this one:

$quantity = 0;

In other words: hardcode it for testing.

If else always prints, then you are missing something in your query.
Otherwise you've got something wrong in your code.





Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 23, 2002 7:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] If else question


Ok you asked for it.
Don't say I didn't warn you.

session_start();
$query = SELECT name FROM {$config[prefix]}_users WHERE
uid={$session[uid]}; $ret = mysql_query($query); while($row =
mysql_fetch_array($ret)) {

$user = $row['name'];



$query = SELECT uid, id, iname, image, quantity, type FROM
{$config[prefix]}_my_items WHERE uid={$session[uid]} AND id = '$id'
ORDER BY id; $ret = mysql_query($query); while($row =
mysql_fetch_array($ret)) {
  $uiid = $row['uid'];
 $iid = $row['id'];
  $image = $row['image'];
  $iname = $row['iname'];
  $quantity = $row['quantity'];
  $type = $row['type'];
// this is the problem if statement. Please don't yell at me for my
style. It is easy for me to read so I'm sorry if it's not for you.
if($quantity  1) { echo Sorry I can't seem to locate this item; }
else {

session_register(uiid);
session_register(iid);
session_register(image);
session_register(iname);
session_register(quantity);
session_register(type);


   if($iid == $id)
   {

$display_block .=CENTERimg src=$image border=0brfont size =
2$inameBR$quantityBR$typeBR/font/CENTER;

echo $display_blockBRBR;

  if($type == food)
  //if the item food is present then set an option and include in
the form later
  {
   $thisoption=OPTION VALUE=\feed\Feed my pet\n/OPTION;
  }
 else
{
//if book or weapon is present then set a blank
$thisoption=;
   }
  }
}
}
}
//check if form has been submitted
if($submit)
{

}
else
{

//if the form has not been submitted run the following


   echo FORM ACTION='$PHP_SELF' METHOD='post';
   echo SELECT NAME='sort' SIZE='1' ;
   echo $thisoption;
   echo OPTION VALUE='shop'Put in my shop/OPTION;
   echo OPTION VALUE='locker'Put into my Footlocker/OPTION;
   echo OPTION VALUE='discard'Discard this item/OPTION;
   echo OPTION VALUE='donate'Donate this item/OPTION;
   echo /SELECT;
   echo INPUT TYPE='submit' VALUE='Submit' NAME='submit';
   echo /FORM;


}

Jennifer



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] If else question

2002-04-23 Thread Maxim Maletsky \(PHPBeginner.com\)

Jennifer, satus!
People are nervous here!


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 23, 2002 7:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] If else question


Ok you asked for it.
Don't say I didn't warn you.

session_start();
$query = SELECT name FROM {$config[prefix]}_users WHERE
uid={$session[uid]}; $ret = mysql_query($query); while($row =
mysql_fetch_array($ret)) {

$user = $row['name'];



$query = SELECT uid, id, iname, image, quantity, type FROM
{$config[prefix]}_my_items WHERE uid={$session[uid]} AND id = '$id'
ORDER BY id; $ret = mysql_query($query); while($row =
mysql_fetch_array($ret)) {
  $uiid = $row['uid'];
 $iid = $row['id'];
  $image = $row['image'];
  $iname = $row['iname'];
  $quantity = $row['quantity'];
  $type = $row['type'];
// this is the problem if statement. Please don't yell at me for my
style. It is easy for me to read so I'm sorry if it's not for you.
if($quantity  1) { echo Sorry I can't seem to locate this item; }
else {

session_register(uiid);
session_register(iid);
session_register(image);
session_register(iname);
session_register(quantity);
session_register(type);


   if($iid == $id)
   {

$display_block .=CENTERimg src=$image border=0brfont size =
2$inameBR$quantityBR$typeBR/font/CENTER;

echo $display_blockBRBR;

  if($type == food)
  //if the item food is present then set an option and include in
the form later
  {
   $thisoption=OPTION VALUE=\feed\Feed my pet\n/OPTION;
  }
 else
{
//if book or weapon is present then set a blank
$thisoption=;
   }
  }
}
}
}
//check if form has been submitted
if($submit)
{

}
else
{

//if the form has not been submitted run the following


   echo FORM ACTION='$PHP_SELF' METHOD='post';
   echo SELECT NAME='sort' SIZE='1' ;
   echo $thisoption;
   echo OPTION VALUE='shop'Put in my shop/OPTION;
   echo OPTION VALUE='locker'Put into my Footlocker/OPTION;
   echo OPTION VALUE='discard'Discard this item/OPTION;
   echo OPTION VALUE='donate'Donate this item/OPTION;
   echo /SELECT;
   echo INPUT TYPE='submit' VALUE='Submit' NAME='submit';
   echo /FORM;


}

Jennifer



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Passing Arrays

2002-04-22 Thread Maxim Maletsky \(PHPBeginner.com\)

Add it to the session.
Sessions can handle arrays with no problems.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Matt Williams [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 11:47 AM
To: Boaz Yahav; PHP General (E-mail)
Subject: Re: [PHP] Passing Arrays


On Monday 22 April 2002 11:40 am, Boaz Yahav wrote:
 Suppose i have a multiple select posted to a script by a form. now i 
 have to send this array again with a new form to a new script.
  
 How do i do this?
  
 thanks
  
 berber


Hi Berber

you could serialize the array into a hidden field on the next form.

matt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] security

2002-04-22 Thread Maxim Maletsky \(PHPBeginner.com\)

Search archives, as a tip I'd suggest to encrypt the Credit Card numbers
with RC4 or some other algorithm.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Wilbert Enserink [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 11:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] security


Hi all,



I'm building a site where customers can store their personal
information. I'm thinking of storing their creditcardno's also. Can you
give me some general tips with regard to security. What is the way to go
here? 

thx. Wilbert

-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Better standards in PHP-coding

2002-04-22 Thread Maxim Maletsky \(PHPBeginner.com\)

Also very true.



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 6:50 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Better standards in PHP-coding


On Monday 22 April 2002 08:07, Maxim Maletsky wrote:
 I think standardization within the company is what important.

 I prefer tabs because when I have to delete a part of the line, I just

 hit back button once - not four times.

I prefer an editor which allows me to tab using spaces and to delete the

appropriate number of spaces when backspacing :)

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Logic is the chastity belt of the mind!
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Database and files

2002-04-22 Thread Maxim Maletsky \(PHPBeginner.com\)

Right, certain things is beter to keep in the Db. Keep present that the
file system is limited. You can't just have an unlimited amount of files
on the same directory.

PostgreSQL is the best choice on my opinion. mySQL might fail on a large
DB.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Richard Archer [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 12:41 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Database and files


At 11:25 AM +0100 22/4/02, Danny Shepherd wrote:

If you get multiple requests for files, expect the db to fall over very

quickly - what's wrong with storing them on the filesystem and having a

list of them in the db?

If your DB falls over, get a better one. You wouldn't do this with
Access, but MySQL or PostgreSQL will handle this with no problems.

And storing them in the file system requires the web server process to
have write access to the directory in which the files are stored. And so
will any other users on that server. Security nightmare.


One thing - note that that the header names and the actual mimetype are

in lower case. Got weird results with anything different.

Interesting tip. I'll try that out on Mac IE which never did download
properly, IIRC.

 ...R.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Backup of MySQL database

2002-04-22 Thread Maxim Maletsky \(PHPBeginner.com\)

I think it is already done a WHILE ago.
Look for it on source Forge or hotscripts.com. Include C/C++, Perl and
Shell scripting in your searches.


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: Julian [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 2:45 PM
To: PHP-General
Subject: [PHP] Backup of MySQL database


Hi list!!!

I want to make a script to do a backup of a MySQL DB and email me it. It
is posible?

Can anybody explain me how to do the backup?

Thanks! Julian


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Mass Mail {?!}

2002-04-22 Thread Maxim Maletsky \(PHPBeginner.com\)


Or just:

While(True) {
// send email
sleep(1);
if($tired==True)
Break;
}


Count how many mails you want and quit :-)



Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: CDitty [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 4:47 AM
To: Liam MacKenzie; PHP
Subject: Re: [PHP] Mass Mail {?!}


How about something like this.

?

$Total_emails = 100;
$i = 1;

if($Total_emails != $i){
// send email code

$i++;
}

?

This should be all you need.  I used something similar to crash my
work's 
email system by accident.  :)  Whoops.

CDitty

At 12:40 PM 4/22/2002 +1000, Liam MacKenzie wrote:
Hey all,
I was just wondering if someone's written a script that will let me 
send
lots of emails to an address, but with a small pause inbetween emails.

And no I'm not using this for spam, I need to test a SMTP server that 
I'm
developing.

Thanks for your help!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP editor for windows

2002-04-22 Thread Maxim Maletsky \(PHPBeginner.com\)

Edit Plus, PHPEdit ... Just browse the archives, Ben


Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins




-Original Message-
From: .ben [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 3:36 PM
To: PHP
Subject: [PHP] PHP editor for windows


Other than notepad, interdev, ultraedit, etc (which i currently use for
editing), does anyone know of a good editor for PHP for Windows, ideally
with syntax colouring, etc?

Cheers,

 .ben


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Easy Question

2001-10-05 Thread Maxim Maletsky \(PHPBeginner.com\)


 When you write a php script to access a database,edit 
 records, etc., is the entire thing 1 giant PHP page or a 
 bunch of different ones?  

A giant one

If it can be written both ways, 
 which is the better way to do it?

Depends how big is your 'giant'.

It is all about your coding style, but it is advisable not getting over
500 lines - saves you a lot of developing time.
However, too many (7, 10, more) includes will become noticeable.

Not all is said by this, there are so many reasons why use this or that,
but generally it is up to your own coding style.


Maxim Maletsky
www.PHPBeginner.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] ad rotation program

2001-10-04 Thread Maxim Maletsky \(PHPBeginner.com\)


Have you looked into phpAdsNew?

www.sf.net
And search for it there

Maxim Maletsky
www.PHPBeginner.com


 -Original Message-
 From: Michael Geier, CDM Systems Admin [mailto:[EMAIL PROTECTED]] 
 Sent: giovedi 4 ottobre 2001 23.39
 To: Wandrer; Joseph Bannon
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] ad rotation program
 
 
 check out Oasis on Freshmeat...I haven't used it, but I did 
 notice it on there. also, as already posted, PHPads.
 
 -Original Message-
 From: Wandrer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 04, 2001 2:12 PM
 To: Joseph Bannon
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] ad rotation program
 
 
 At 01:37 PM 10/4/01 -0500, you wrote:
 Has anyone on this list developed an ad rotation program in 
 PHP? Joseph
 PHP General Mailing List (http://www.php.net/)
 
 Joseph,
 
 dotBanner ( http://www.dot-banner.com ) is the one that I work on.
 
 We have your script pushing well over 6 million impressions 
 per day with no problem.
 - Robert
 
 ...out of all the software I have bought on the net, you 
 have provided me with the BEST service, HANDS DOWN man... You 
 should be very proud of this man... thanks so much! -Deejay
 
 Paul
 
 -
   dotBanner www.dot-banner.com
 -
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
 [EMAIL PROTECTED] To contact the list 
 administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
 [EMAIL PROTECTED] To contact the list 
 administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP is a Bloated Kludge, discuss!

2001-10-04 Thread Maxim Maletsky \(PHPBeginner.com\)



 (From behind filing cabinet where I am ducking preparing for flames).
 
 Is it just me or is there anyone else that thinks PHP suffers 
 from not being modular.  

It is just you and some other people similar to you. Thought this
question was up for a while :-)

 PHP on the other hand seems to load in ALL the code that MAY 
 be run. i.e. an include brings things in which are inside an 
 if,  even if the if equates to false.

Is it really true? I always though it wasn't.
AFAIN: Long time ago require() was working this way. But now, require()
and include() are the same. Loaded only when needed.

 This means that the language is not extendible in the way 
 others are.  If you do write a function you wish to include 
 in 'only the pages you wish to use'  you have to first 
 include it, then call it.

Well, it has it's pluses and it's minuses, it is extendable, though OOD
works a little different in it. But hey, it compiles on the fly,
remember? That's a plus for developers, especially newbies.

 This has also meant that things like spell checking functions 
 are built into the core module rather than called in as or 
 when they are needed.
 
 Then there is the way database connectivity is handled.
 
 There are a load of functions (again in the core language) 
 with there NAMES containing the name of the database you are 
 connecting to.

OK, true. But, this is necessary if you want PHP to automatically
connect to different DBs. 
A plus to portability and a minus to... (to what?)

 For example all MySQL functions are mysql_something and I 
 guess all oracle ones are oracle_something.  This would only 
 be a minor inconvenience because wrapper functions can be 
 written but from what I can gather different databases have 
 different functionality available.

That is why Sascha Sunmann wrote PHPLIB and (Stig?) Bakken created PEAR
(released with every PHP distribution, btw - just waiting for you to use
it)

 phplib.netuse.de
 php.net/pear

 I know this is partly because different databases have 
 different functionality.  what I would expect to see is a 
 load of generic function which attempt to provide same 
 functionality where it is available or implement some of the 
 functionality themselves.  Obviously for some of the less 
 sophisticated databases these functions would have to do more 
 work and maybe some functionality wouldn't be available in 
 certain databases (but only the things like stored procedures).
 
 Got a nast feeling that ASP (spit) does something like this.
 
 You may cry, it cant be done.  however I remember a 
 connectivity product that came from Borland (this was back in 
 the Paradox Days) which did just this, it even had 
 transaction handling built into this connectivity layer for DBase!
 
 Anyway I am playing Devils Advocate.

We all play it once at least ;-)

 What I do like about PHP is how quickly it can be learnt and 
 how quick you can build apps with it.  Maybe this is at the 
 expense of elegance.  Maybe PHP5 will address these issues -;)

Isn't it the greatest thing of it?
Just think of this - where else you can become a programmer in a short
time?
Compliling/executing/libraring/connecting just to make a simple
guestbook for your site.

 And there are certainly some very busy PHP sites, you should 
 see the traffic levels on indymedia.org during 
 anti-capitalist demonstrations and I am sure during the New 
 York attacks they went belistic.

Search archives for php sites or something like this. The topic comes
up every week or so :-)


Maxim Maletsky
www.PHPBeginner.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP is a Bloated Kludge, discuss!

2001-10-04 Thread Maxim Maletsky \(PHPBeginner.com\)

  PHP on the other hand seems to load in ALL the code that 
 MAY be run. 
  i.e. an include brings things in which are inside an if,  
 even if the 
  if equates to false.
 
 A quick check in the manual, it states that:
 
 Unlike include(), require() will always read in the target 
 file, even if the line it's on never executes. If you want to 
 conditionally include a file, use include(). The conditional 
 statement won't affect the require(). However, if the line on 
 which the require() occurs is not executed, neither will any 
 of the code in the target file be executed.  
 http://www.php.net/manual/en/function.require.php
 and
 http://www.php.net/manual/en/function.require-once.php
 
 
 So to do what you said i.e. conditionally load the 
 function/files that you want then you should use include(). 
 http://www.php.net/manual/en/function.include.php
 and
 http://www.php.net/manual/en/function.include-once.php
 
 So I don't buy this agument.

This is outdated. Look int othe archives - I had this discussion with
Zeev close to a year ago - since PHP 4.0.(something) require and include
behaves in the exactly same way.

Test it yourself on the latest release of PHP:


  require.test.php
 
 ?

 echo 'included?';

 if($go)
require 'require.error.test';

 ?
 

  require.error.test
 
 ?

 echo 'H1yup!/H1';

 parse error;

 ?
 

Access it with:
 1. require.test.php?go=e

And then try it with:
 2. require.test.php


What do you buy now?


Maxim Maletsky
www.PHPBeginner.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP is a Bloated Kludge, discuss!

2001-10-04 Thread Maxim Maletsky \(PHPBeginner.com\)


Of cource changing the require with include would explain everything :-)
Sorry, forgot to mention that :-)

Maxim Maletsky
www.PHPBeginner.com


 -Original Message-
 From: Maxim Maletsky (PHPBeginner.com) 
 [mailto:[EMAIL PROTECTED]] 
 Sent: venerdì 5 ottobre 2001 3.33
 To: 'Opec Kemp'; [EMAIL PROTECTED]
 Subject: RE: [PHP] PHP is a Bloated Kludge, discuss!
 
 
   PHP on the other hand seems to load in ALL the code that
  MAY be run.
   i.e. an include brings things in which are inside an if,
  even if the
   if equates to false.
  
  A quick check in the manual, it states that:
  
  Unlike include(), require() will always read in the target
  file, even if the line it's on never executes. If you want to 
  conditionally include a file, use include(). The conditional 
  statement won't affect the require(). However, if the line on 
  which the require() occurs is not executed, neither will any 
  of the code in the target file be executed.  
  http://www.php.net/manual/en/function.require.php
  and
  http://www.php.net/manual/en/function.require-once.php
  
  
  So to do what you said i.e. conditionally load the
  function/files that you want then you should use include(). 
  http://www.php.net/manual/en/function.include.php
  and
  http://www.php.net/manual/en/function.include-once.php
  
  So I don't buy this agument.
 
 This is outdated. Look int othe archives - I had this 
 discussion with Zeev close to a year ago - since PHP 
 4.0.(something) require and include behaves in the exactly same way.
 
 Test it yourself on the latest release of PHP:
 
 
   require.test.php
  
  ?
 
  echo 'included?';
 
  if($go)
   require 'require.error.test';
 
  ?
  
 
   require.error.test
  
  ?
 
  echo 'H1yup!/H1';
 
  parse error;
 
  ?
  
 
 Access it with:
  1. require.test.php?go=e
 
 And then try it with:
  2. require.test.php
 
 
 What do you buy now?
 
 
 Maxim Maletsky
 www.PHPBeginner.com
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
 [EMAIL PROTECTED] To contact the list 
 administrators, e-mail: [EMAIL PROTECTED]
 
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP is a Bloated Kludge, discuss!

2001-10-04 Thread Maxim Maletsky \(PHPBeginner.com\)


conditionally load the function/files that 
you want then you should use include(). 

Was the implication of the poster I replied to.


To the original I replied commenting each of his arguments, therefore I
knew his points.

Maxim Maletsky
www.PHPBeginner.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] ereg checking if its only numbers

2001-10-04 Thread Maxim Maletsky \(PHPBeginner.com\)

With ereg it could be:

 if(ereg(^[^[:digit:]]+$))
echo 'something else came through';

Untested though ... 

Maxim Maletsky
www.PHPBeginner.com



 -Original Message-
 From: Jack Dempsey [mailto:[EMAIL PROTECTED]] 
 Sent: venerdì 5 ottobre 2001 3.42
 To: Chris Aitken; PHP General Mailing List
 Subject: RE: [PHP] ereg checking if its only numbers
 
 
 if(!preg_match(/^\d+$/,$string){
   echo $string has something other than a number;
 }
 
 -Original Message-
 From: Chris Aitken [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 04, 2001 9:34 PM
 To: PHP General Mailing List
 Subject: [PHP] ereg checking if its only numbers
 
 
 
 Ive been playing around with ereg for about half an hour and 
 having no joy because I dont really understand the medhod 
 behind it and how it all works. But what im trying to do is 
 check to see if a 9 digit string is all numbers and nothing else
 
 $string1 = 123456789
 $string2 = 123456abc
 
 
 how would I check either string with an IF statement and make 
 it continue on string 1 (ie, all numbers) and error on string 
 2 (not all numbers).
 
 
 Any suggestions ?
 
 
 
 Thanks
 
 
 Chris
 
 --
  Chris Aitken - Administration/Database Designer - IDEAL Internet
   email: [EMAIL PROTECTED]  phone: +61 2 4628   fax: +61 
 2 4628 8890
   __-__
 It is said that if you line up all the cars in the world 
 end to end,
   some moron in a rotary will still to try and pass them
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
 [EMAIL PROTECTED] To contact the list 
 administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
 [EMAIL PROTECTED] To contact the list 
 administrators, e-mail: [EMAIL PROTECTED]
 
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] bulk e-mails

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)

You've already had a nice answer. Look for ezmlm. It is a very powerful
open source mailing manager.

You could store the data in mySQL database and administer it in your
favorite way via PHP or whatever. Then, loop your PHP code and (if you
need this of course) copy all the emails of users you need to send it to
into a temporary table. And run ezmlm to send emails. You can do it all
very automatically and maybe even in a better way that what I said.
Ezmlm is the greatest, with lots of features and add-ons. Even this list
uses it.

Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]] 
Sent: mercoledì 3 ottobre 2001 5.05
To: PHP-General
Subject: [PHP] bulk e-mails


Hello everyone,

I have a few questions about sending bulk e-mails.  We have a client who
has some customers that are signing up to win a prize in a contest.
These users can also join the e-mail club.  What's the best way to send
many, many e-mails?

I don't want to send an e-mail to each individual user (that can be
tough on the server).  I also don't want to just make a bunch of entries
in the To: header.  I don't want people to be able to see who else is on
the mailing list.  Could I solve that problem by putting their e-mails
in the bcc section of the header?

Any other ideas are appreciated...thanks,
Tyler Longren



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Simple Question, I think

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


Try also mod_rewrite of apache. It is great for doing such things.

Visit apache.org and search docs for mod_rewrite or simply look into
archives of this list.

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Ralph Guzman [mailto:[EMAIL PROTECTED]] 
Sent: mercoledi 3 ottobre 2001 10.03
To: Ratfish; [EMAIL PROTECTED]
Subject: RE: [PHP] Simple Question, I think


I would suggest you implement this at the web server level. If using
Apache, use virtual hosting or perhaps a rewrite condition if needed. If
you must do this in PHP, and  you want to do is redirect the user to a
particular directory depending on the URL they type, then something like
this should work:

switch ($HTTP_HOST) {
case www.firstdomain.com:
header(Location: http://www.domainname.com/dir_01;);
break;
case www.seconddomain.com:
header(Location: http://www.domainname.com/dir_02;);
break;
case www.thirddomain.com:
header(Location: http://www.domainname.com/dir_03;);
break;
}


Ralph

-Original Message-
From: Ratfish [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 7:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Simple Question, I think

All I want to do is what an ASP page I have is doing.

I just want to host multiple sites with one page like the one in the
article below until I can get my head around the real way of doing it.

http://www.zdnet.com/devhead/stories/articles/0,4413,2418330,00.html

Surely there is a PHP equivalent?

Thanks
Andrew

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] something like alert (javascript)

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)

Then what do you need?

We are not any sure on what your question is ...

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]] 
Sent: mercoledì 3 ottobre 2001 16.31
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP] something like alert (javascript)


Is there any function in PHP that is similar to alert() or confirm() of
javascript ? I tried die() but that's not what I need.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] How to simulate any browser

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


So you need a browser of your own?
You should be using 

 fosockopen()
 php.net/fsockopen

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Kamil Nowicki [mailto:[EMAIL PROTECTED]] 
Sent: mercoledi 3 ottobre 2001 17.47
To: PHP-list
Subject: [PHP] How to simulate any browser



Hello everyone!

I have a problem. My webpage (say webpage_1) needs to get some data
presented on other webpage (wepage_2). I tried to use
fopen("http://webpage_2?params","r") and got connection and stuff, but I
suppose that webpage_2 uses some script checking what type of browser
sent the request, and sends back an error message. I do not have cURL
library installed (and I can't install it cause I'm not an administrator
of the server and my administrator doesn't want to install it) so I
can't use it to pretend my PHP request is from IE, Netscape or any other
WWW browser.
I was thinking abous using sockets to communicate directly and make
a HTTP request manually, but I do not know the HTTP request
specifications (how to send all needed info including browser id).

If You know how to send browser info to WWW server using standard
PHP functions or some common libraries' functions, than PLEASE HELP ME.

Thanx in advance.

 Kamil 'Hilarion' Nowicki

PS.: I can send phpinfo() of my server on Your request.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Newlines in files

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


It did.

Try opening that file with a text editor.

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Big5ive [mailto:[EMAIL PROTECTED]] 
Sent: mercoledì 3 ottobre 2001 19.10
To: [EMAIL PROTECTED]
Subject: [PHP] Newlines in files


My Code:
$PW_LIST=../config/pw.txt;
$fp=fopen($PW_LIST,a);
fputs($fp,$username=$pw\n);
fclose($fp);

This should make a newline after printing $username=$pw, shouldn't it!?
But it doesn't!!!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP Knowledge Base solution?

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


I think you can take just about any forum or other script and modify it
on your own if you know how. And, what you're asking is relatively easy
to do from scratch as well. You should try at least.

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Michael O'Neal [mailto:[EMAIL PROTECTED]] 
Sent: mercoledi 3 ottobre 2001 22.53
To: Php-General@Lists. Php. Net
Subject: [PHP] PHP Knowledge Base solution?


Hi.

Anyone know of a Knowledge Base solution (Like you see from computer
manufacturers on their websites) done in PHP/MySQL? Something where a
user could search for entries on specific problems and such they might
have?

Please email me at [EMAIL PROTECTED] as I am on the digest.

Thanks,


mto

-- 

Michael O'Neal
Web Producer/ Autocrosser
ST 28 '89 Civic Si
-
 M   A   N   G   O
B  O  U  L  D  E  R
-
http://www.thinkmango.com
e- [EMAIL PROTECTED]
p- 303.442.1821
f- 303.938.8507


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Problem when displaying the $ character

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


It is the same thing.
trim() is enough to make it work.


Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Mauricio T?llez Jim?nez [mailto:[EMAIL PROTECTED]] On
Behalf Of EDUMEXICO
Sent: mercoledì 3 ottobre 2001 19.53
To: Dominik
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Problem when displaying the $ character


Hi, try this:

?

echo 
select name=\menu\
option value=\$item1\Item 1/option
option value=\$item2\Item 2/option
/select;

?

I hope this can help you. Cheers

On Wed, Oct 03, 2001 at 11:08:27AM -0700, Dominik wrote:
 Through php, I run a function that creates a list of items in a select

 menu as follows:
 
 select name=menu
 option value=? echo $item1; ?Item 1/option
 option value=? echo $item2; ?Item 2/option /select
 
 but here is how the source code looks:
 
 select name=menu
 option value=
 item1Item 1/option
 option value=
 item2Item 2/option
 /select
 
 It looks like php takes the $ character and inserts a return for it.  
 This though disrupts the value of the form element.  Is there anyway 
 to make this code appear like it should (with the option tag all on 
 one line instead of 2)?
 
 Thanks!
 Dominik
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
[EMAIL PROTECTED]

-- 
Mauricio Téllez Jiménez
Seguimiento Técnico EDUMEXICO
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Zamora No. 25, Col. Centro
C.P. 91000, Xalapa, Ver.
Tel. 52(28)17-86-87, 17-73-80
Fax. 52(28)18-64-13


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] file maniputation??

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


Not sure, but this 'wb' looks suspicious to me.

From the manual:

The mode may contain the letter 'b'. This is useful only on systems
which differentiate between binary and text files (i.e. Windows. It's
useless on Unix). If not needed, this will be ignored. 

Can you ignore it as well?

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Gerard Samuel [mailto:[EMAIL PROTECTED]] 
Sent: mercoledi 3 ottobre 2001 23.08
To: PHP
Subject: [PHP] file maniputation??


Hey all.  I have a script that uses that creates/manipulates files, and 
it works great on my end.  Thats no question.  There is a small 
percentage of my users that when they try to run the file it cannot 
create or modify files.  I suspected file ownership may be wrong on 
files and directories.  Just in case Im wrong, what else could be the 
matter??

Example code.
$file = foo/bar/example.php;
$config = array(x, y, z);
if ($fp = fopen($config_file, wb)) {
 foreach ($config as $line) {
 fwrite($fp, $line\n);
 }

Example error.
Warning: fopen(foo/bar/example.php,wb) - Permission denied in
/usr/local/psa/home/vhosts/httpsdocs/install.php on line 3429

Thanks


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] file reading and textarea problem

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)

Yup.

 fread()

Read on

 PHP.net/fread
 PHP.net/fgets

 ...to learn how to manipulate files.

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Nikola Veber [mailto:[EMAIL PROTECTED]] 
Sent: mercoledi 3 ottobre 2001 11.11
To: php forum
Subject: [PHP] file reading and textarea problem


Hi !

I'm having a problem with the following : I have a log file on my site,
that records date, 
time and the user's system. Each entry is placed in a new line. Now, I
can only read 
the first line with fgets($filename, 4096). Is there another function,
or the 4096 number 
should be changed in order to let me read the whole file.

Thanks
Nikola



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] cookie not set anymore by IE5 (localhost)

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


No formatting a developing station is a really stupid thing to do ;-)

Have you looked into your C:/docs/you/cookies? It should be there.
Hey, why instead don't you try to remove it? Set it to nothing - that's
it.

Logic: if at least a friend of yours sees it - means it works. Cookies
could be a pain, a real pain when testing your apps.

Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Chris Hayes [mailto:[EMAIL PROTECTED]] 
Sent: mercoledi 3 ottobre 2001 23.29
To: [EMAIL PROTECTED]
Subject: [PHP] cookie not set anymore by IE5 (localhost)


hi,
i'm having a cookie problem. Maybe you know Postnuke, anyway it 
requires cookies for users and the admin.

At first it worked fine, i tried to add functionailty, testing 
it on postnuke. Then i deleted some cookies, even deleted the 
windows/cookies/index.dat , installed some extra versions of 
postnuke. All on localhost (PHP4 Apache WIN98 IE5 ZoneAlarm 
MySQL).

Now i see to my amazement that netscape 6.1 works, so maybe 
this is not a php problem after all...

Anyway so i cannot set a cookie anymore with IE with PHP 
setcookie.


I even made a simple file:
?PHP
$info = 'cook infor';
  setcookie(nogeen,$info,time() + 15552000);
?
But no cookie appears.

External sites happily add cookies.

Headers_sent confirms i did not send a header yet.


What can i do (except format c:)

BTW it seems like Netscape also 


Chris H.


---
-
--  C.Hayes  Droevendaal 35  6708 PB Wageningen  the 
Netherlands  --
---
-

 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] This is SOOOO FREAKY!!! Laughed like HELL !!! :-)

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


I hope I wasn't just left over by not knowing that. 

Listen what I just came across on an Italian PHP mailing list (ok,
credit belongs to the founder of Italian largest PHP portal Michel
'ZioBudda' Morelli @ www.ziobudda.net).



According to him, if you add '?=PHPE9568F36-D428-11d2-A769-00AA001ACF42'
to any PHP page on your own server you will see one of the creators (?)
of PHP ...  looking a bit...  pretty..?..  how do I express that
fun? freaky? cool? You tell me :-)

Anyway, on all my servers it worked HA HA HA!!!

CHECK THAT OUT:

Try clicking here who's got PHP on Windows right now:
http://localhost/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42

Or here any of you want to see it on my site:
http://maxim.cx/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42

Or just add that damn
'?=PHPE9568F36-D428-11d2-A769-00AA001ACF42'
on any PHP page of your own site!

Is that you, Rasmus?

I laughed like hell. :-)

 you're a funny man 


Have fun guys :-)

 Maxim Maletsky 
 www.phpbeginner.com 





-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On
Behalf Of Michel 'ZioBudda' Morelli
Sent: mercoledì 3 ottobre 2001 17.34
To: [EMAIL PROTECTED]
Subject: [PHP]funzionalita' nascoste (da phpcenter.it)


_SPONSOR
_

Il tuo annuncio qui? [EMAIL PROTECTED]


__

In PHP sono state rinvenute due funzionalità nascoste (Easter Egg - Uova
di Pasqua). Infatti richiamando qualunque pagina in php e passandogli un
particolare parametro è possibile ottenre la foto di uno degli
sviluppatori di PHP in un atteggiamento strano
(?=PHPE9568F36-D428-11d2-A769-00AA001ACF42) ovvero la lista dei dei
crediti per PHP 4.0 (?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C1).
Per provare clicca in uno dei due link qui sotto:
- http://www.phpcenter.it/?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C1
- http://www.phpcenter.it/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42


-- 
Se ti prendo ti apro come una cozza...
--
Michel ZioBudda Morelli   [EMAIL PROTECTED]

ICQ UIN: 58351764   PR of Linux in Italy
http://www.ziobudda.net http://www.linuxlab.it


__
Info: http://www.ziobudda.net/mailman/listinfo/php-it


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] associative array syntax question

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)

Strange, I always though it should be working.

Have you tried $a[{$b['b']}] ? 

What version of PHP are you running?

Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Job Miller [mailto:[EMAIL PROTECTED]] 
Sent: giovedi 4 ottobre 2001 1.41
To: [EMAIL PROTECTED]
Subject: [PHP] associative array syntax question


why does: print $a[$b['b']] return:

parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'

but if I do it in two steps like:

$c=$b['b'];
print $a[$c];

it works fine.

I have tried dozens of syntax combinations using
quotes, no quotes, on one or both and can't get
anything to work.  any help would be greatly
appreciated.  The two step method is annoying.

Job
 

__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just
$8.95/month. http://geocities.yahoo.com/ps/info1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] write to multiple sql tables

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


PHP can only handle a  query at a time. If the database in question
allows you to construct a such query where you can write to multiple
files then you can. Go to the manual of your DB and look for the answer
there. For instance; look at the syntax of INSERT.

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: sc [mailto:[EMAIL PROTECTED]] 
Sent: giovedì 4 ottobre 2001 2.17
To: [EMAIL PROTECTED]
Subject: [PHP] write to multiple sql tables


Hi;

Is there any easy way of writing to multiple mysql tables in the one
database? ie. putting it all in the one query etc? instead of writing a
heap of code...

Any help would be great...

thx.

-sc

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] associative array syntax question

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


What about adding a few quotes above the problem?

$row['TICKER'] = 'NTAP';
$test = 'NTAP';
$quotes[$test] = '8.30';
 // $quotes[{$row[TICKER]}] = will that parse?
$quotes[$row[TICKER]] = will that parse?


Maxim Maletsky
www.PHPBeginner.com




-Original Message-
From: Job Miller [mailto:[EMAIL PROTECTED]] 
Sent: giovedi 4 ottobre 2001 2.21
To: [EMAIL PROTECTED]
Subject: RE: [PHP] associative array syntax question


here is sample output from my script:

win98/Apache 1.3.19/php4.0.5

variable being displayed = value

$row[TICKER] = NTAP
$test = NTAP
$quotes[$test] = 8.30
$quotes[{$row[TICKER]}] = will not parse
$quotes[$row[TICKER]] = will not parse

any ideas?

--- Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED]
wrote:
 Strange, I always though it should be working.
 
 Have you tried $a[{$b['b']}] ?
 
 What version of PHP are you running?
 
 Maxim Maletsky
 www.PHPBeginner.com
 
 
 
 -Original Message-
 From: Job Miller [mailto:[EMAIL PROTECTED]]
 Sent: giovedi 4 ottobre 2001 1.41
 To: [EMAIL PROTECTED]
 Subject: [PHP] associative array syntax question
 
 
 why does: print $a[$b['b']] return:
 
 parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'
 
 but if I do it in two steps like:
 
 $c=$b['b'];
 print $a[$c];
 
 it works fine.
 
 I have tried dozens of syntax combinations using
 quotes, no quotes, on one or both and can't get
 anything to work.  any help would be greatly
 appreciated.  The two step method is annoying.
 
 Job
  
 
 __
 Do You Yahoo!?
 NEW from Yahoo! GeoCities - quick and easy web site
 hosting, just
 $8.95/month. http://geocities.yahoo.com/ps/info1
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED] To
 contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 
 


__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just
$8.95/month. http://geocities.yahoo.com/ps/info1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] associative array syntax question

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)



-Original Message-
From: Maxim Maletsky (PHPBeginner.com)
[mailto:[EMAIL PROTECTED]] 
Sent: giovedi 4 ottobre 2001 2.02
To: 'Job Miller'
Subject: RE: [PHP] associative array syntax question



I tried on winXP/PHP4.0.6/Apache

?
$a = Array('print me');
$b = Array('b'=0);
print $a[$b['b']]

# prints:
# print me
?


Strange, should work though

Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Job Miller [mailto:[EMAIL PROTECTED]] 
Sent: giovedi 4 ottobre 2001 1.57
To: Maxim Maletsky (PHPBeginner.com)
Subject: RE: [PHP] associative array syntax question


no luck with that either.
I do the same thing in Perl all the time.
can it have anything to do with the fact that the
inner part is a fetch from a mySQL DB which returns an enumerated array,
so b is actually a constant (drop the quotes) referring to an index in
the result?

i tried $a[$b[b]] and $a[{$b[b]}], etc..

nothing works..


--- Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED]
wrote:
 Strange, I always though it should be working.
 
 Have you tried $a[{$b['b']}] ?
 
 What version of PHP are you running?
 
 Maxim Maletsky
 www.PHPBeginner.com
 
 
 
 -Original Message-
 From: Job Miller [mailto:[EMAIL PROTECTED]]
 Sent: giovedi 4 ottobre 2001 1.41
 To: [EMAIL PROTECTED]
 Subject: [PHP] associative array syntax question
 
 
 why does: print $a[$b['b']] return:
 
 parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'
 
 but if I do it in two steps like:
 
 $c=$b['b'];
 print $a[$c];
 
 it works fine.
 
 I have tried dozens of syntax combinations using
 quotes, no quotes, on one or both and can't get
 anything to work.  any help would be greatly
 appreciated.  The two step method is annoying.
 
 Job
  
 
 __
 Do You Yahoo!?
 NEW from Yahoo! GeoCities - quick and easy web site
 hosting, just
 $8.95/month. http://geocities.yahoo.com/ps/info1
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] To
 contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 


__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just
$8.95/month. http://geocities.yahoo.com/ps/info1


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] associative array syntax question - got it!

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)

Well, the actual problem wasn't that. It was you not posting your code
entirely ;-)
Often the bugs happen right where you don't except them, just like
anything in this life ;-)

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Job Miller [mailto:[EMAIL PROTECTED]] 
Sent: giovedi 4 ottobre 2001 2.44
To: Maxim Maletsky (PHPBeginner.com); [EMAIL PROTECTED]
Subject: Re: [PHP] associative array syntax question - got it!


Maxim,

I figured it out.  Thanks for your help

PHP can't interpolate within string when nested
associative array is used.  the nested aa must be
appended with dot notation, and if you try to print it
within the outer quotes it balks!

print td$a[B]td.$quotes[$a[B]].td
   ^  ^^ 
 A  B

This works, B switched with A won't work though.  
 

Thanks again,

Job
--- Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED]
wrote:
 
 
 -Original Message-
 From: Maxim Maletsky (PHPBeginner.com) 
 [mailto:[EMAIL PROTECTED]]
 Sent: giovedi 4 ottobre 2001 2.02
 To: 'Job Miller'
 Subject: RE: [PHP] associative array syntax question
 
 
 
 I tried on winXP/PHP4.0.6/Apache
 
 ?
   $a = Array('print me');
   $b = Array('b'=0);
   print $a[$b['b']]
 
   # prints:
   # print me
 ?
 
 
 Strange, should work though
 
 Maxim Maletsky
 www.PHPBeginner.com
 
 
 
 -Original Message-
 From: Job Miller [mailto:[EMAIL PROTECTED]]
 Sent: giovedi 4 ottobre 2001 1.57
 To: Maxim Maletsky (PHPBeginner.com)
 Subject: RE: [PHP] associative array syntax question
 
 
 no luck with that either.
 I do the same thing in Perl all the time.
 can it have anything to do with the fact that the
 inner part is a fetch from a mySQL DB which returns
 an enumerated array,
 so b is actually a constant (drop the quotes)
 referring to an index in
 the result?
 
 i tried $a[$b[b]] and $a[{$b[b]}], etc..
 
 nothing works..
 
 
 --- Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED]
 wrote:
  Strange, I always though it should be working.
  
  Have you tried $a[{$b['b']}] ?
  
  What version of PHP are you running?
  
  Maxim Maletsky
  www.PHPBeginner.com
  
  
  
  -Original Message-
  From: Job Miller [mailto:[EMAIL PROTECTED]]
  Sent: giovedi 4 ottobre 2001 1.41
  To: [EMAIL PROTECTED]
  Subject: [PHP] associative array syntax question
  
  
  why does: print $a[$b['b']] return:
  
  parse error, expecting `T_STRING' or `T_VARIABLE'
 or `T_NUM_STRING'
  
  but if I do it in two steps like:
  
  $c=$b['b'];
  print $a[$c];
  
  it works fine.
  
  I have tried dozens of syntax combinations using
  quotes, no quotes, on one or both and can't get
  anything to work.  any help would be greatly
  appreciated.  The two step method is annoying.
  
  Job
   
  
  __
  Do You Yahoo!?
  NEW from Yahoo! GeoCities - quick and easy web
 site
  hosting, just
  $8.95/month. http://geocities.yahoo.com/ps/info1
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED] To
  contact the list administrators, e-mail: 
  [EMAIL PROTECTED]
  
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
  To contact the list administrators, e-mail: 
  [EMAIL PROTECTED]
  
 
 
 __
 Do You Yahoo!?
 NEW from Yahoo! GeoCities - quick and easy web site
 hosting, just
 $8.95/month. http://geocities.yahoo.com/ps/info1
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 


__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just
$8.95/month.
http://geocities.yahoo.com/ps/info1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Add $String to $Num ???

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


$sess = $String.$Num;
session_register($sess);

 ..is your answer :-)

 ...you're welcome :-)

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: giovedi 4 ottobre 2001 2.53
To: [EMAIL PROTECTED]
Subject: [PHP] Add $String to $Num ???


Hi,

I have a variable called $String which can contain 3 random numbers like
so...

$String=12,94,423;

I then have $Num which is a single number from 1 - 20, I want to add
$String 
and $Num together like this

$String$Num

So I would end up with $String1=12,94,423; and then I can enter that
value 
into my session

session_register(String.$Num);

I have tried everyway I can think of but it never works

The reason for doing this is so I can store multiple $Strings in the
session 
and use them later for a search.

Can anyone help?

Thanks
Ade

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] associative array syntax question - got it!

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)

Yes, that does for sure

Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Matthew Loff [mailto:[EMAIL PROTECTED]] 
Sent: giovedi 4 ottobre 2001 4.02
To: 'Job Miller'; 'Maxim Maletsky (PHPBeginner.com)';
[EMAIL PROTECTED]
Subject: RE: [PHP] associative array syntax question - got it!



Have you tried using curly brackets?

print td$a[B]td{$quotes[$a[B]]}td

Does that work?  Just cuious...


-Original Message-
From: Job Miller [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 03, 2001 8:44 PM
To: Maxim Maletsky (PHPBeginner.com); [EMAIL PROTECTED]
Subject: Re: [PHP] associative array syntax question - got it!


Maxim,

I figured it out.  Thanks for your help

PHP can't interpolate within string when nested
associative array is used.  the nested aa must be
appended with dot notation, and if you try to print it
within the outer quotes it balks!

print td$a[B]td.$quotes[$a[B]].td
   ^  ^^ 
 A  B

This works, B switched with A won't work though.  
 

Thanks again,

Job
--- Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED]
wrote:
 
 
 -Original Message-
 From: Maxim Maletsky (PHPBeginner.com)
 [mailto:[EMAIL PROTECTED]]
 Sent: giovedi 4 ottobre 2001 2.02
 To: 'Job Miller'
 Subject: RE: [PHP] associative array syntax question
 
 
 
 I tried on winXP/PHP4.0.6/Apache
 
 ?
   $a = Array('print me');
   $b = Array('b'=0);
   print $a[$b['b']]
 
   # prints:
   # print me
 ?
 
 
 Strange, should work though
 
 Maxim Maletsky
 www.PHPBeginner.com
 
 
 
 -Original Message-
 From: Job Miller [mailto:[EMAIL PROTECTED]]
 Sent: giovedi 4 ottobre 2001 1.57
 To: Maxim Maletsky (PHPBeginner.com)
 Subject: RE: [PHP] associative array syntax question
 
 
 no luck with that either.
 I do the same thing in Perl all the time.
 can it have anything to do with the fact that the
 inner part is a fetch from a mySQL DB which returns
 an enumerated array,
 so b is actually a constant (drop the quotes)
 referring to an index in
 the result?
 
 i tried $a[$b[b]] and $a[{$b[b]}], etc..
 
 nothing works..
 
 
 --- Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED]
 wrote:
  Strange, I always though it should be working.
  
  Have you tried $a[{$b['b']}] ?
  
  What version of PHP are you running?
  
  Maxim Maletsky
  www.PHPBeginner.com
  
  
  
  -Original Message-
  From: Job Miller [mailto:[EMAIL PROTECTED]]
  Sent: giovedi 4 ottobre 2001 1.41
  To: [EMAIL PROTECTED]
  Subject: [PHP] associative array syntax question
  
  
  why does: print $a[$b['b']] return:
  
  parse error, expecting `T_STRING' or `T_VARIABLE'
 or `T_NUM_STRING'
  
  but if I do it in two steps like:
  
  $c=$b['b'];
  print $a[$c];
  
  it works fine.
  
  I have tried dozens of syntax combinations using
  quotes, no quotes, on one or both and can't get
  anything to work.  any help would be greatly
  appreciated.  The two step method is annoying.
  
  Job
   
  
  __
  Do You Yahoo!?
  NEW from Yahoo! GeoCities - quick and easy web
 site
  hosting, just
  $8.95/month. http://geocities.yahoo.com/ps/info1
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED] To
  contact the list administrators, e-mail:
  [EMAIL PROTECTED]
  
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
  To contact the list administrators, e-mail:
  [EMAIL PROTECTED]
  
 
 
 __
 Do You Yahoo!?
 NEW from Yahoo! GeoCities - quick and easy web site
 hosting, just
 $8.95/month. http://geocities.yahoo.com/ps/info1
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 


__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just
$8.95/month. http://geocities.yahoo.com/ps/info1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: RE: [PHP] write to multiple sql tables

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)

You can't do it through PHP.

';' - won't work

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Frank M. Kromann [mailto:[EMAIL PROTECTED]] 
Sent: giovedì 4 ottobre 2001 6.24
To: Maxim Maletsky (PHPBeginner.com)
Cc: 'sc'; [EMAIL PROTECTED]
Subject: Re: RE: [PHP] write to multiple sql tables


Some databsaes allows batches of sql statements. Thes can be passed to
the db server in one query and the statements are usally separated by ;

If you are executing a batch of statements each returning a result you
will have to process each result in your code. This is supported by
ODBC, MS SQL and FrontBase (that I know of)

If you want to insert/update data in multiple tables you might also want
to choose a database with support for transactions, as this will ensure
the consistancy of your data.

- Frank

 
 PHP can only handle a  query at a time. If the database in question 
 allows you to construct a such query where you can write to multiple 
 files then you can. Go to the manual of your DB and look for the 
 answer there. For instance; look at the syntax of INSERT.
 
 Maxim Maletsky
 www.PHPBeginner.com
 
 
 -Original Message-
 From: sc [mailto:[EMAIL PROTECTED]]
 Sent: giovedì 4 ottobre 2001 2.17
 To: [EMAIL PROTECTED]
 Subject: [PHP] write to multiple sql tables
 
 
 Hi;
 
 Is there any easy way of writing to multiple mysql tables in the one 
 database? ie. putting it all in the one query etc? instead of writing 
 a heap of code...
 
 Any help would be great...
 
 thx.
 
 -sc
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] To
 contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] To 
 contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)



Without following your logic I can give an example of how style sheets
on PHPBeginner.com work:


In the page we have 
link rel=stylesheet href=/styles.php

And in the styles.php we have all the possible DB connections, browser
checks by (PHP SNIFF) and so and so on.

You cold even try to call the class this way with Get: 
link rel=stylesheet href=/styles.php?foo=foobar=baz

That will work as well.

But one thing you cannot do is defining variable on index.php hoping
they would become available in styles.php - those are TOTALY separated
processes. Something like if you would have a page with two frames.

So, here's another thing.
The only reason of using external CSS file is to have it automatically
cached by your browser so it loads once per session. By default it will
not. You're gonna need to review your headers, adding cache control to
it.

Hope it gave you an idea.

Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Jason Dulberg [mailto:[EMAIL PROTECTED]] 
Sent: giovedì 4 ottobre 2001 6.19
To: [EMAIL PROTECTED]
Subject: [PHP] php in css not working with IF's


I have a common css file that is being used across several virtual
hosts. Basically, what I am trying to do is use the same css file even
though several text colors/sizes need to be changed depending on what
site/platform its being used on.

I have my sql query (retrieves $site_style) in the file that includes
the css file and a bunch of IF statements inside the css file itself.
The only problem is that the css is not being generated properly.

For some reason, the IF statements are not being processed correctly/at
all. I can echo the variables through the index.php and the variables
are set to global. Its just that styles.php seems to almost bypass the
IF and use the 1st set of variables even though it shouldn't be.

Here's an example from the css (styles.php) - there are about 5 IF
statements in there but here's the basic idea of them all:

?php
//index.php creates platform and site style require(index.php);

if (($BROWSER_PLATFORM == Win)  (($site_style!==10) ||
($site_style!==9))) {
$pc8=8;
$pc9=9;
$pc10=10;
$pc12=12;
$pc13=13;
$pc14=14;
$text=#ff;
$heading=#2E4471;
}
?

.standard {
font-family:verdana, arial;
font-size: ?=$pc10;?pt;
color:?=$text;?;
}

The call from site style 10
link rel=stylesheet href=/styles.php

If I go to a $site_style 10, it still uses the variables defined within
the example IF statement even though it clearly shouldn't. If I type in
the URL to styles.php from a $site_style 10, it shows the wrong tags.

Is it a problem with my IF statements or is something else going over my
head?

Thanks again for any help - I've been trying to figure this out for days
to no avail...

__
Jason Dulberg
Extreme MTB
http://extreme.nas.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)

Thanks Rasmus.

The link you provided will become a great resource for PHPBeginner.com

Cheers!

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: giovedi 4 ottobre 2001 6.58
To: Jason Dulberg
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's


 Theoretically, either/or I'm assuming. If A isn't 10 or A isn't 9...

But since A cannot be both 9 and 10 at the same time, A will *always*
not be one of them.

It's exactly the same as saying: if (!(A==9 AND A==10))

Obviously A cannot be both 9 and 10 at the same time so the above will
be:

  if(!(false))  which is the same as   if(true)

Some people find it helpful to draw Venn diagrams of their boolean
logical expressions.  See
http://www.lib.csub.edu/infocomp/search/boolean/venn.htm
for a simple description of those.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


Do you want to do it?
PHPBeginner.com and many other PHP sites would greatly appreciate it,
Rasmus.

Though, NOT and XOR are often unknown to beginners, I noticed it in
their codes.

Anyway, it is a great idea, I think. I see so many neo programmers
confusing with it. Lots of PHP developers are coming from web
development industry where they've often seen few other things but
Macromedia. Obviously it takes them ages to get logical operators as it
is rarely documented for very beginners level. For instance, my
assistants at my previous job were categorically refusing looking onto
manuals trying religiously to understand logicals from raw code samples.


Maxim Maletsky
www.PHPBeginner.com




-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: giovedi 4 ottobre 2001 7.09
To: Maxim Maletsky (PHPBeginner.com)
Cc: 'Jason Dulberg'; [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's


Would make a nice little PHP-GD exercise for someone to build a PHP app
that took a boolean logical expression and produced a Venn diagram.
Maybe limit it to 3 or less terms to not make your brain explode.

-Rasmus

On Thu, 4 Oct 2001, Maxim Maletsky (PHPBeginner.com) wrote:

 Thanks Rasmus.

 The link you provided will become a great resource for PHPBeginner.com

 Cheers!

 Maxim Maletsky
 www.PHPBeginner.com


 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: giovedi 4 ottobre 2001 6.58
 To: Jason Dulberg
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] php in css not working with IF's


  Theoretically, either/or I'm assuming. If A isn't 10 or A isn't 9...

 But since A cannot be both 9 and 10 at the same time, A will *always* 
 not be one of them.

 It's exactly the same as saying: if (!(A==9 AND A==10))

 Obviously A cannot be both 9 and 10 at the same time so the above will
 be:

   if(!(false))  which is the same as   if(true)

 Some people find it helpful to draw Venn diagrams of their boolean 
 logical expressions.  See 
 http://www.lib.csub.edu/infocomp/search/boolean/venn.htm
 for a simple description of those.

 -Rasmus






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


Wonderful!

Update as all on your start so we can contribute!

P.S: and happy birthday!
Real-life story: my ex manager asked me once: Dude, I heard you're
leaving office at 2am, are you also coding on your birthdays and
Christmas?

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Jack Dempsey [mailto:[EMAIL PROTECTED]] 
Sent: giovedì 4 ottobre 2001 7.34
To: [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's


i'll start it...will be fun and i've got some coldfusion proponents i'd
love to show it to...a little swamped with work though, and monday's my
21st, so i don't think i'll be doing much coding, but hey, its
opensource, you do a lil, i do a lil, it'll be done in no time...

jack

-Original Message-
From: Maxim Maletsky (PHPBeginner.com)
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 04, 2001 1:24 AM
To: 'Rasmus Lerdorf'
Cc: 'Jason Dulberg'; [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's



Do you want to do it?
PHPBeginner.com and many other PHP sites would greatly appreciate it,
Rasmus.

Though, NOT and XOR are often unknown to beginners, I noticed it in
their codes.

Anyway, it is a great idea, I think. I see so many neo programmers
confusing with it. Lots of PHP developers are coming from web
development industry where they've often seen few other things but
Macromedia. Obviously it takes them ages to get logical operators as it
is rarely documented for very beginners level. For instance, my
assistants at my previous job were categorically refusing looking onto
manuals trying religiously to understand logicals from raw code samples.


Maxim Maletsky
www.PHPBeginner.com




-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: giovedi 4 ottobre 2001 7.09
To: Maxim Maletsky (PHPBeginner.com)
Cc: 'Jason Dulberg'; [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's


Would make a nice little PHP-GD exercise for someone to build a PHP app
that took a boolean logical expression and produced a Venn diagram.
Maybe limit it to 3 or less terms to not make your brain explode.

-Rasmus

On Thu, 4 Oct 2001, Maxim Maletsky (PHPBeginner.com) wrote:

 Thanks Rasmus.

 The link you provided will become a great resource for PHPBeginner.com

 Cheers!

 Maxim Maletsky
 www.PHPBeginner.com


 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: giovedi 4 ottobre 2001 6.58
 To: Jason Dulberg
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] php in css not working with IF's


  Theoretically, either/or I'm assuming. If A isn't 10 or A isn't 9...

 But since A cannot be both 9 and 10 at the same time, A will *always* 
 not be one of them.

 It's exactly the same as saying: if (!(A==9 AND A==10))

 Obviously A cannot be both 9 and 10 at the same time so the above will
 be:

   if(!(false))  which is the same as   if(true)

 Some people find it helpful to draw Venn diagrams of their boolean 
 logical expressions.  See 
 http://www.lib.csub.edu/infocomp/search/boolean/venn.htm
 for a simple description of those.

 -Rasmus






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


Ok. Wll show you with an example:

if (($site_style!==10)  ($site_style!==9)  ($site_style!==8))
{ }

elseif ($site_style==10) {
}


Should simply be 

 if($site_style != ('10' or '9' or '8')) {}

Bla bla bla


Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Maxim Maletsky (PHPBeginner.com)
[mailto:[EMAIL PROTECTED]] 
Sent: giovedì 4 ottobre 2001 7.56
To: 'Jason Dulberg'; 'Rasmus Lerdorf'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's


Jason, are not a dope

As mentioned to you by Rasmus:
just move those !== off the script replacing them with !=


That is what causes your error.


Maxim Maletsky
www.PHPBeginner.com




-Original Message-
From: Jason Dulberg [mailto:[EMAIL PROTECTED]] 
Sent: giovedì 4 ottobre 2001 7.43
To: Rasmus Lerdorf
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's


Thanks for sticking with me here and for your examples!!

So basically, I need to use AND instead of OR.

if (($site_style!==10)  ($site_style!==9)  ($site_style!==8))
{ }

elseif ($site_style==10) {
}

hrm... it didn't work.

Sorry for being such a dope about this :(

Jason



 Ok, you are clearly not following along here...  ;)
 
 You have (let $site_style = A for brevity):
 
 if( A!=10 OR A!=9 OR A!=8 )
 
 When A=10 this becomes:
 
 if( 10!=10 OR 10!=9 OR 10!=8 )
  falsetrue true
 
 if( false OR true OR true ) is the same as if (true)
 
 Seriously, try drawing the Venn diagram for your expression.
 
 Or try substituting common english.
 
 if Jason is not 21 or Jason is not 20 or Jason is no 19 let him into
 the cool club.
 
 Say Jason is 21, is he allowed in?  Sure he is, because one of the
 conditions for getting into the cool club is that Jason is not 20.  It

 doesn't matter that one of the other conditions says to not let Jason
 in. If the people writing the rules wanted to force all the conditions

 to apply they would have written:
 
 if Jason is not 21 AND Jason is not 20 AND Jason is not 19, let him
 into the cool club.
 
 -Rasmus
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] how to decrease serverload easily?

2001-10-02 Thread Maxim Maletsky \(PHPBeginner.com\)


What about in Europe and Japan. I live between Italy and Tokyo. I only
met Zeev Suraski and Doron (the CEO of Zend) representing my company on
a meeting in Tokyo this June. What about you? Are there any speeches you
do in my locations?


Maxim Maletsky
www.PHPBeginner.com




-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: martedi 2 ottobre 2001 18.21
To: ReDucTor
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] how to decrease serverload easily?


 Would be nice and fun to goto one of them, but I live in Australia and

 I doubt, thats where you go  :D hehe

I have given talks in Australia.  Both in Sydney and Canberra.  And I
will be at linux.conf.au in Brisbane in February.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] how to decrease serverload easily?

2001-10-02 Thread Maxim Maletsky \(PHPBeginner.com\)

Yey! Let's do a little party on Ibiza!

:-)

Though, Spain is OK too :-)



Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: paharito [mailto:[EMAIL PROTECTED]] 
Sent: martedì 2 ottobre 2001 18.39
To: [EMAIL PROTECTED]
Subject: Re: [PHP] how to decrease serverload easily?


hehehe... are you going to travel to Spain?

You can title like: the Rasmus World Tour ;)

- Original Message - 
From: Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED]
To: 'Rasmus Lerdorf' [EMAIL PROTECTED]; 'ReDucTor'
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 6:29 PM
Subject: RE: [PHP] how to decrease serverload easily?


 
 What about in Europe and Japan. I live between Italy and Tokyo. I only

 met Zeev Suraski and Doron (the CEO of Zend) representing my company 
 on a meeting in Tokyo this June. What about you? Are there any 
 speeches you do in my locations?
 
 
 Maxim Maletsky
 www.PHPBeginner.com
 
 
 
 
 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: martedi 2 ottobre 2001 18.21
 To: ReDucTor
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] how to decrease serverload easily?
 
 
  Would be nice and fun to goto one of them, but I live in Australia 
  and
 
  I doubt, thats where you go  :D hehe
 
 I have given talks in Australia.  Both in Sydney and Canberra.  And I 
 will be at linux.conf.au in Brisbane in February.
 
 -Rasmus
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] To
 contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
[EMAIL PROTECTED]
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] how to decrease serverload easily?

2001-10-02 Thread Maxim Maletsky \(PHPBeginner.com\)


What's in Paris?
I know that PHP international Conference will take place in Frankfurt, I
saw your name there as well. But what is it going to be in Paris? Where
could I get some info about it?


Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: martedi 2 ottobre 2001 18.32
To: Maxim Maletsky (PHPBeginner.com)
Cc: 'ReDucTor'; [EMAIL PROTECTED]
Subject: RE: [PHP] how to decrease serverload easily?


Nothing planned for Italy or Japan right now.  Frankfurt, Paris,
Birmingham, Bucaramanga (Columbia) and Brisbane are on the schedule for
the next 6 months.

-Rasmus

On Tue, 2 Oct 2001, Maxim Maletsky (PHPBeginner.com) wrote:


 What about in Europe and Japan. I live between Italy and Tokyo. I only

 met Zeev Suraski and Doron (the CEO of Zend) representing my company 
 on a meeting in Tokyo this June. What about you? Are there any 
 speeches you do in my locations?


 Maxim Maletsky
 www.PHPBeginner.com




 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: martedi 2 ottobre 2001 18.21
 To: ReDucTor
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] how to decrease serverload easily?


  Would be nice and fun to goto one of them, but I live in Australia 
  and

  I doubt, thats where you go  :D hehe

 I have given talks in Australia.  Both in Sydney and Canberra.  And I 
 will be at linux.conf.au in Brisbane in February.

 -Rasmus





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Htaccess / regex / php I dont know why it won't work

2001-10-02 Thread Maxim Maletsky \(PHPBeginner.com\)


I think this was supposed to work:

.htaccess

RewriteEngine On
RewriteRule ^(.*)\.zajfe\.org$  redirect.php?url=$1   [L]


Are you sure it doesn't? If it doesn't then meas they

 1. don't have mod_rewrite (phphinfo shows you the modules loaded)
 2. don't allow .htaccess to override httpd.conf rules.

Also read about mod_rewrite, right in the manual there are a few
examples to do what you need. Always if you have it loaded.


Maxim Maletsky
www.PHPBeginner.com




-Original Message-
From: affixcom [mailto:[EMAIL PROTECTED]] 
Sent: martedì 2 ottobre 2001 20.54
To: [EMAIL PROTECTED]
Subject: [PHP] Htaccess / regex / php I dont know why it won't work


Hi,
I have a website hosted on a cobalt server with my own domain, but not
my own IP. I have a full access to my root web, but not higher (means
can't change any *.conf files). My domain is wildcarded I want to be
able to redirect based on the entry, IE if a user types
http://hello.mydomain.com he will go to http://mydomain.com/hello=20 if
a user types http://another.mydomain.com he will go to
http://mydomain.com/another=20

The redirect method of apache doesn't work because I leanred that that
is based on an absolute path from the server I tried php scripts that
read the subdomain and use it in the header function but it won't work.
I came to the conclusion after a lot of tests that rewriterule from the
htaccess is the the best.

htaccess script: (doesn't work)
RewriteEngine On
RewriteRule ^(.*)\.zajfe\.org$  redirect.php?url=$1   [L]
connected to the page redirect.php where
?header(location:http://www.zajfe.org/$url;);?
PHP script: (doesn't work)
?
$domain = yourdomain.com;
$default_page = main.shtml;
$underdomaene = $HTTP_HOST;
$underdomaene = eregi_replace(\..$domain, , $underdomaene);
$underdomaene = eregi_replace(www\., , $underdomaene); $underdomaene
= strtolower($underdomaene); if (is_dir($DOCUMENT_ROOT/$underdomaene))
{
   header(Location: http://$domain/$underdomaene;);
 }
else {
 if (!$REQUEST_URI || $REQUEST_URI == /) {
  include($DOCUMENT_ROOT/$default_page);
 }
 else {
  header(Location: http://$domain$REQUEST_URI;);
 }
}
?

I am open to ANY suggestion, CGI / ASP / PHP / SSI (it is all on the
server), I want it to work

Thanks

Gab



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] A powerful editor!

2001-10-02 Thread Maxim Maletsky \(PHPBeginner.com\)

EditPlus is the best. Many nice functions and, I think, it is more
adapted for HTML/PHP development that TextPad. 

What I can't live without when developing on windows are those drag 
drop customs of EditPlus. I find it pretty handy. on VIM is great as
well.

Hey, look into archives. There are thousands posts about Editor.

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]] 
Sent: martedì 2 ottobre 2001 23.20
To: Dean Householder; [EMAIL PROTECTED]
Subject: Re: [PHP] A powerful editor!


I just have to ask what EXACTLY you mean by nicer colors as Textpad
Allows you to set any element of a Syntax Definition to any color
between
(0,0,0) and (255,255,255).  Last I checked 16.7M colors was plenty  =P

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com


- Original Message -
From: Dean Householder [EMAIL PROTECTED]
To: Alex Shi [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 3:57 PM
Subject: Re: [PHP] A powerful editor!


 I used to use TextPad until I found EditPlus.  I'm also amazed by it's

 power.  It has more than I could even use including everything TextPad

 has and nicer colors for the different styles.  You can find it at 
 http://www.editplus.com.

 Dean Householder
 Daylight Creations
 http://www.daylightcreations.com



 - Original Message -
 From: Alex Shi [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, October 01, 2001 6:08 PM
 Subject: [PHP] A powerful editor!


  Hello folks,
 
  Today, I found a very powerful editor, called TextPad. I said it is 
  'powerful' because it can recognize syntax of php, html, java, 
  css and also
many
  many more great featuresmuch better that Windows Notepad. You 
  can download and try. You need to take a few minutes to explore it 
  and
 maximize
  its functionality for you.
 
  Here is the link:
  http://www.textpad.com/
 
  Alex
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED] To 
  contact the list administrators, e-mail: 
  [EMAIL PROTECTED]
 
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] To 
 contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php graphics generation

2001-10-01 Thread Maxim Maletsky \(PHPBeginner.com\)


Check out netcratf.com
Their graphs are auto generated by (I think) PHP.

Also you can use them a lot for many other kind of charts and stats
graphs.


Maxim Maletsky
www.PHPBeginner.com




-Original Message-
From: Chip [mailto:[EMAIL PROTECTED]] 
Sent: lunedì 1 ottobre 2001 6.43
To: [EMAIL PROTECTED]
Subject: [PHP] php graphics generation


I have been using php for simple things so far, and am just starting to
look 
into the image generation functions of php. I am wondering just what
people 
use these for in real-life applications, some real references. I know
what 
the books say can be done, I am interested in what is being done with
it. Just out of curiosity,

--
Chip W.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php graphics generation

2001-10-01 Thread Maxim Maletsky \(PHPBeginner.com\)


netcraFT.com, sorry

Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Maxim Maletsky (PHPBeginner.com)
[mailto:[EMAIL PROTECTED]] 
Sent: lunedì 1 ottobre 2001 8.54
To: 'Chip'; [EMAIL PROTECTED]
Subject: RE: [PHP] php graphics generation



Check out netcratf.com
Their graphs are auto generated by (I think) PHP.

Also you can use them a lot for many other kind of charts and stats
graphs.


Maxim Maletsky
www.PHPBeginner.com




-Original Message-
From: Chip [mailto:[EMAIL PROTECTED]] 
Sent: lunedì 1 ottobre 2001 6.43
To: [EMAIL PROTECTED]
Subject: [PHP] php graphics generation


I have been using php for simple things so far, and am just starting to
look 
into the image generation functions of php. I am wondering just what
people 
use these for in real-life applications, some real references. I know
what 
the books say can be done, I am interested in what is being done with
it. Just out of curiosity,

--
Chip W.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Namo Web Editor

2001-10-01 Thread Maxim Maletsky \(PHPBeginner.com\)

 by searching google, perhaps

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Justin Rodino [mailto:[EMAIL PROTECTED]] 
Sent: martedi 2 ottobre 2001 5.30
To: Petras Virzintas
Cc: PHP General List
Subject: Re: [PHP] Namo Web Editor


Where does one find this Namo Web Editor?

===
Justin
Network Engineer/Systems Analyst
Interlink Companies

On Tue, 2 Oct 2001, Petras Virzintas wrote:

 Date: Tue, 2 Oct 2001 11:35:51 +1000
 From: Petras Virzintas [EMAIL PROTECTED]
 To: PHP General List [EMAIL PROTECTED]
 Subject: [PHP] Namo Web Editor
 
 Hi, apparently the Namo Web Editor has a PHP generator together with a

 MySQL interface. Is this truly an alternative to products such as 
 PhpEd? Has anyone used it for production applications? Any other 
 useful comments?
 
 Petras
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] mysql query for current id-1

2001-10-01 Thread Maxim Maletsky \(PHPBeginner.com\)



What about this:

$sql=select id,agent,host, DATE_FORMAT(time_in, '%M %d, %Y, %l:%i') AS
unixdate from logged_in WHERE userid='$current_user' ORDER BY id DESC
LIMIT 1;


I think this should work for your case.

Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Jason Dulberg [mailto:[EMAIL PROTECTED]] 
Sent: martedì 2 ottobre 2001 6.04
To: [EMAIL PROTECTED]
Subject: [PHP] mysql query for current id-1


This is kindof a weird question so bear with me as I try to explain.

I have a session table that gets updated when a user logs in/out. If
they don't logout, some info is left unchanged. I have a cron script
that takes care of the stray sessions so that's all good. In the
sessions table, there's a field self_logout which is Y when they
logout properly and N if the cron script removes their session.

What I'd like to do is when the user logs in next time, a search will be
made to look at that users last login session info. If they didn't log
out properly, a notice will appear.

So theoretically, I need to search for something like:

users current id -1 or their last time of visit.

Here is the sql query that I have so far. But I think that I need to
remove the self_logout='N' because that doesn't show the actual last
result; rather it shows the last result where they didn't properly
logout.

$sql=select id,agent,host, DATE_FORMAT(time_in, '%M %d, %Y, %l:%i') AS
unixdate from logged_in WHERE (self_logout='N') AND
(userid='$current_user') ORDER BY id DESC LIMIT 1,1;

Here is my trimmed down table structure:

CREATE TABLE logged_in (
id tinyint(4) DEFAULT '0' NOT NULL auto_increment,
session varchar(100) DEFAULT '0' NOT NULL,
time_in timestamp(14),
time_out varchar(50) DEFAULT '-' NOT NULL,
self_logout char(1) DEFAULT 'N' NOT NULL,
KEY id (id)
);

Did that make any sense? To sum it all up, I just want to remind people
to click logout if they forgot the last time.

Thanks for any suggestions!!

__
Jason Dulberg
Extreme MTB
http://extreme.nas.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Namo Web Editor

2001-10-01 Thread Maxim Maletsky \(PHPBeginner.com\)


From http://www.namo.com/products/we4/info/features/we4_sitewiz.html

Do you still think you have to learn about HTML tags, JavaScript, and
Photoshop? Do you still think you have to buy all those expensive and
hard-to-learn programs? Namo WebEditor 4 comes with Site Wizard that
helps you create a professional looking Web site with minimum effort
from you.

I always depreciated WYSIWYG software, especially when they mention
those things about HTML. HTML is the alphabet of the internet and as
such should be well known by any webmaster and whoever else is
interested in this kind of software.

Still, it feels like it is better than Dreamveawer and Microsoft
FrontPage (oh boy, I pronounced devil's name)

Just my 0.2c
Nice lead, Justin.

Maxim Maletsky
www.PHPBeginner.com




-Original Message-
From: Maxim Maletsky (PHPBeginner.com)
[mailto:[EMAIL PROTECTED]] 
Sent: martedi 2 ottobre 2001 5.55
To: 'Justin Rodino'; 'Petras Virzintas'
Cc: 'PHP General List'
Subject: RE: [PHP] Namo Web Editor


 by searching google, perhaps

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Justin Rodino [mailto:[EMAIL PROTECTED]] 
Sent: martedi 2 ottobre 2001 5.30
To: Petras Virzintas
Cc: PHP General List
Subject: Re: [PHP] Namo Web Editor


Where does one find this Namo Web Editor?

===
Justin
Network Engineer/Systems Analyst
Interlink Companies

On Tue, 2 Oct 2001, Petras Virzintas wrote:

 Date: Tue, 2 Oct 2001 11:35:51 +1000
 From: Petras Virzintas [EMAIL PROTECTED]
 To: PHP General List [EMAIL PROTECTED]
 Subject: [PHP] Namo Web Editor
 
 Hi, apparently the Namo Web Editor has a PHP generator together with a

 MySQL interface. Is this truly an alternative to products such as
 PhpEd? Has anyone used it for production applications? Any other 
 useful comments?
 
 Petras
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] mysql query for current id-1

2001-10-01 Thread Maxim Maletsky \(PHPBeginner.com\)


... DESC LIMIT 1,1

As you wrote yourself.

Sorry, haven't taken in consideration ;-)


Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Jason Dulberg [mailto:[EMAIL PROTECTED]] 
Sent: martedì 2 ottobre 2001 6.59
To: Maxim Maletsky (PHPBeginner.com); [EMAIL PROTECTED]
Subject: RE: [PHP] mysql query for current id-1


Thank you for your lightning fast response!!

I tried your query but it appears to be coming up with the current id
rather than the users last login.

__
Jason Dulberg
Extreme MTB
http://extreme.nas.net



 -Original Message-
 From: Maxim Maletsky (PHPBeginner.com) 
 [mailto:[EMAIL PROTECTED]]
 Sent: October 2, 2001 12:14 AM
 To: 'Jason Dulberg'; [EMAIL PROTECTED]
 Subject: RE: [PHP] mysql query for current id-1




 What about this:

 $sql=select id,agent,host, DATE_FORMAT(time_in, '%M %d, %Y, %l:%i') 
 AS unixdate from logged_in WHERE userid='$current_user' ORDER BY id 
 DESC LIMIT 1;


 I think this should work for your case.

 Maxim Maletsky
 www.PHPBeginner.com



 -Original Message-
 From: Jason Dulberg [mailto:[EMAIL PROTECTED]]
 Sent: martedì 2 ottobre 2001 6.04
 To: [EMAIL PROTECTED]
 Subject: [PHP] mysql query for current id-1


 This is kindof a weird question so bear with me as I try to explain.

 I have a session table that gets updated when a user logs in/out. If 
 they don't logout, some info is left unchanged. I have a cron script 
 that takes care of the stray sessions so that's all good. In the 
 sessions table, there's a field self_logout which is Y when they 
 logout properly and N if the cron script removes their session.

 What I'd like to do is when the user logs in next time, a search will 
 be made to look at that users last login session info. If they didn't 
 log out properly, a notice will appear.

 So theoretically, I need to search for something like:

 users current id -1 or their last time of visit.

 Here is the sql query that I have so far. But I think that I need to 
 remove the self_logout='N' because that doesn't show the actual last

 result; rather it shows the last result where they didn't properly 
 logout.

 $sql=select id,agent,host, DATE_FORMAT(time_in, '%M %d, %Y, %l:%i') 
 AS unixdate from logged_in WHERE (self_logout='N') AND
 (userid='$current_user') ORDER BY id DESC LIMIT 1,1;

 Here is my trimmed down table structure:

 CREATE TABLE logged_in (
 id tinyint(4) DEFAULT '0' NOT NULL auto_increment,
 session varchar(100) DEFAULT '0' NOT NULL,
 time_in timestamp(14),
 time_out varchar(50) DEFAULT '-' NOT NULL,
 self_logout char(1) DEFAULT 'N' NOT NULL,
 KEY id (id)
 );

 Did that make any sense? To sum it all up, I just want to remind 
 people to click logout if they forgot the last time.

 Thanks for any suggestions!!

 __
 Jason Dulberg
 Extreme MTB
 http://extreme.nas.net


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] To 
 contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] MySQL Ability

2001-10-01 Thread Maxim Maletsky \(PHPBeginner.com\)



Yes Devin, mySQL is fast enough, but it is not *really* a database.
There are many reasons why some say mySQL is rather close to a file
system with SQL interface than to a DBMS. If you really care about how
robust and efficient your database is then you should look into
PostgreSQL which by many is considered the best open source DBMS.

 
Maxim Maletsky
www.PHPBeginner.com




-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: martedi 2 ottobre 2001 5.50
To: Devin Pittman
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] MySQL Ability


sure

On Tue, 2 Oct 2001, Devin Pittman wrote:

 I would like to begin coding a online website creation tool for 
 clients of my small web design firm, and I'd like to use MySQL for the

 backend. I only have one question - is MySQL fast enough and robust 
 enough to handle large amounts of data?  For example entire pages of 
 text, etc.

 Thanks for any help,
 Devin






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] The Kewl Script

2001-09-30 Thread Maxim Maletsky \(PHPBeginner.com\)


Hey, The Kewl Script is now v0.1.1 :-)

I reduced it's size by double. It is now loading (that very PNG logo) in
only 226k instead of 440 as before. (remember those 1.440 of once? Now
pathetic).
I ported it to use a hybrid of CSS/HTML which slows a bit the browser
down but having less size it is way better acceptable than before, plus
kewl script is now smart enough to choose where to use CSS and where
FONT depending on occurrences of that color.

I still cannot figure out how to get it two-dimensional. I mean to be
able to calculate it vertically, not only horizontally. A few tentative
brought me almost nowhere. 

So, what will be the next step now?
Ideas, please!


 http://maxim.cx/test/img.php 
 http://maxim.cx/test/img.phps (source)



Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: ReDucTor [mailto:[EMAIL PROTECTED]] 
Sent: lunedì 30 luglio 2001 8.42
To: Maxim Maletsky (PHPBeginner.com)
Subject: Re: [P H P] The Histor of The Kewl Script


I can't seem to access the source code...and the image is turning out
spaced
- Original Message -
From: Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED]
To: 'ReDucTor' [EMAIL PROTECTED]
Sent: Sunday, September 30, 2001 10:35 AM
Subject: RE: [P H P] The Histor of The Kewl Script



 Nope. At least I haven't seen it. Will look better soon.
 Hey, I'm coming pretty close. Check the HTML source out of the

 http://maxim.cx/test/img2.php
 http://maxim.cx/test/img2.phps (source)




 Maxim Maletsky
 www.PHPBeginner.com



 -Original Message-
 From: ReDucTor [mailto:[EMAIL PROTECTED]]
 Sent: lunedì 30 luglio 2001 0.58
 To: Maxim Maletsky (PHPBeginner.com)
 Subject: Re: [P H P] The Histor of The Kewl Script


 So there is no Register New Project when you login, just below your 
 Logout window?
 - Original Message -
 From: Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED]
 To: 'ReDucTor' [EMAIL PROTECTED]
 Sent: Sunday, September 30, 2001 5:06 AM
 Subject: RE: [P H P] The Histor of The Kewl Script


  OK, when you confirm me the thing I will add you.
  I am going to open the account now. The problem is that I am having 
  some difficulties doing it - I find no Register New Project 
  button... Pretty funny...
 
 
  Maxim Maletsky
  www.PHPBeginner.com
 
 
 
  -Original Message-
  From: ReDucTor [mailto:[EMAIL PROTECTED]]
  Sent: domenica 29 luglio 2001 20.21
  To: Maxim Maletsky (PHPBeginner.com)
  Subject: Re: [P H P] The Histor of The Kewl Script
 
 
  Yep, Its ReDucT0r, i would use ReDucTor, but i lost the pass to 
  that, and it just doesn't like to send the password
  - Original Message -
  From: Maxim Maletsky (PHPBeginner.com) 
  [EMAIL PROTECTED]
  To: 'ReDucTor' [EMAIL PROTECTED]
  Sent: Sunday, September 30, 2001 4:19 AM
  Subject: RE: [P H P] The Histor of The Kewl Script
 
 
   Alright,
   I will add you.
  
   Do you have an account there?
   If not then you should sign up with them. Give me your username 
   and you will be added as one of the developers and later on you 
   tell me what else you want to contribute to - there are several 
   categories of responsibilities
  
   Maxim Maletsky
   www.PHPBeginner.com
  
  
   -Original Message-
   From: ReDucTor [mailto:[EMAIL PROTECTED]]
   Sent: domenica 29 luglio 2001 20.13
   To: Maxim Maletsky (PHPBeginner.com)
   Subject: Re: [P H P] The Histor of The Kewl Script
  
  
   Yep...
   - Original Message -
   From: Maxim Maletsky (PHPBeginner.com) 
   [EMAIL PROTECTED]
   To: 'ReDucTor' [EMAIL PROTECTED]
   Sent: Sunday, September 30, 2001 4:13 AM
   Subject: RE: [P H P] The Histor of The Kewl Script
  
  
I am opening a project on Source Forge.
Want to participate?
   
   
Maxim Maletsky
www.PHPBeginner.com
   
   
   
-Original Message-
From: ReDucTor [mailto:[EMAIL PROTECTED]]
Sent: domenica 29 luglio 2001 20.09
To: Maxim Maletsky (PHPBeginner.com)
Subject: Re: [P H P] The Histor of The Kewl Script
   
   
3.768 seconds isn't to bad what does it get if it does the 
display

with out the array output?
   
you should pop on the openprojects php irc channel...Might be a 
little
  
easier to talk about the best methods of doing this :D hehe
   
  - James ReDucTor Mitchell
- Original Message -
From: Maxim Maletsky (PHPBeginner.com) 
[EMAIL PROTECTED]
To: 'ReDucTor' [EMAIL PROTECTED]
Sent: Sunday, September 30, 2001 3:54 AM
Subject: RE: [P H P] The Histor of The Kewl Script
   
   

 It is in a way similar to what I am doing now.
 See the non-working sample @ http://maxim,cx/test/img2.php

 I am trying to avoid too many loops, especially those with 
 image

 functions.

 What I want to do it to make script smarter, thus selecting 
 where to use one byte css name and where two bytes. The one 
 with

 the most occurrences is more important, no?

 Here's it working

RE: [PHP] The Kewl Script

2001-09-30 Thread Maxim Maletsky \(PHPBeginner.com\)

You're absolutely right, Ashley.

The only browser you can go wild with is IE - which crashes eventually.
;-)

If I could reduce the sizes of HTML itself then, and only then, it makes
sense working on the compatibilities. With PHP it should not be a
problem as managing to find out users setups is relatively easy.


Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]] 
Sent: domenica 30 settembre 2001 9.51
To: [EMAIL PROTECTED]
Subject: Re: [PHP] The Kewl Script


Maxim Maletsky (PHPBeginner.com) wrote:

 I ported it to use a hybrid of CSS/HTML which slows a bit the browser 
 down but having less size it is way better acceptable than before, 
 plus kewl script is now smart enough to choose where to use CSS and 
 where FONT depending on occurrences of that color.

I'd just like to know what browsers (and versions) on what platforms
are you viewing these pages of yours.  I have Nutscrape 4.78 and 6.1 and
IE 5.5, as well as 6.0, on Winblows 98, and all four of them can not
display your rendered page.  IE just plain crashes.  At least Nutscrape
tries, and manages just fine, with the image all compressed and
unidentifiable.


 So, what will be the next step now?

Make it work properly?  grin

--
H | Life is the art of drawing without an eraser. - John Gardner
  +
  Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
  Director of Internet Operations / SysAdmin. 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Does PHP + PHP CACHE can vs JSP ?

2001-09-27 Thread Maxim Maletsky \(PHPBeginner.com\)

Both will do good jobs, but is the site is very loaded PHP might take
less resources than jsp and asp from the server. Yet has to be well
configured. It all depends on how you use it.

PHP is a great solution for most heavy sites. I never had any problems
with it on a 4+ million pv/month site. Most of other developers will
probably agree with me.


Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: mydata [mailto:[EMAIL PROTECTED]] 
Sent: giovedì 27 settembre 2001 9.04
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Does PHP + PHP CACHE can vs JSP ?


I just want to know which is best solution , if my web site is heavy
loaded.


mydata



Jason G. [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 A good question is:  Do you REALLY need the speed difference, or 
 should
you
 be asking which is the best language to do Dynamic Web Development 
 in???  Which is better supported, which is most cost effective, which 
 is Open Source, which is Better...

 -Jason Garber
 deltacron.com

 At 02:48 PM 9/27/2001 +0800, mydata wrote:
 Hi,
 I heard about JSP a lot recently though I doing PHP programing now. 
 somebody said jsp is most fastest in (asp , php , jsp). I want to 
 know if it is true . And if I use PHP + php cache , can I speed
up
 PHP as same as JSP as they said.
 
 I just want to know which is the best solution ,(php + php cache) or 
 jsp
.
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] To 
 contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] HTML table to MySQL table conversion

2001-09-27 Thread Maxim Maletsky \(PHPBeginner.com\)

Uff..  Don't envy you...

Anyway, if someone (hopefully) was cutingpasting the cells in you could
do a combination of fopen/explode/regex to split the data into
coma-separated values. For example, stripping out every HTML tag
replacing it with a coma and a space will create you a dump file.

Also, you could try using MS Excel or Access, if mr. Magic Microsoft
Excel allows you to import data from an HTML table you could then export
it from there as comma separated values and prepare yourself a dump file
this way.

There are ways, man. But be careful not to take more efforts for PHP
solution that what it would be getting an intern guy/girl pasting the
staff :-)


Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: RNie [mailto:[EMAIL PROTECTED]] 
Sent: giovedì 27 settembre 2001 12.53
To: [EMAIL PROTECTED]
Subject: [PHP] HTML table to MySQL table conversion


Hello there,

Anyone has done this before? Would like to see some sample code to build
a converter from HTML table to a MySql table. Someone put an enourmous
amount of data in HTML tables and now we would like to put it in MySQL
database. We would not like to do this manually.

Thank you!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Receive Header.

2001-09-26 Thread Maxim Maletsky \(PHPBeginner.com\)


Have you looked into GetImageSize()? php.net/getimagesize
Though, I don't know if it works with remote files. Try it.


Maxim Maletsky
PHPBeginner.com



-Original Message-
From: Marian Vasile [mailto:[EMAIL PROTECTED]] 
Sent: mercoledì 26 settembre 2001 8.48
To: [EMAIL PROTECTED]
Subject: [PHP] Receive Header.


I have a dir, full with bounch of pictures.
I need to find out the size of pictures, from another server.
I can't ftp or anything like this, so I need to open those pics, and
find out the size. The problem is that is too slow for a lot of pics but
I woder... I can't find out the size without downloading the entire file
? (sometimes browser shows the size from the beginning)

Any idea ?

Any help will be greatly appreciated !
Thank you,
Marian


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] one pattern, one string, multiple results

2001-09-26 Thread Maxim Maletsky \(PHPBeginner.com\)


Hi Richard.

Subsrt_count() is what you are looking for:
int substr_count (string haystrack, string needle)
php.net/substr_count

P.S: Helen Fielding's Bridget Jones Diary is a nice novel, hun?


Maxim Maletsky
PHPBeginner.com



-Original Message-
From: Richard Baskett [mailto:[EMAIL PROTECTED]] 
Sent: mercoledi 26 settembre 2001 9.01
To: PHP General
Subject: [PHP] one pattern, one string, multiple results


I just can not seem to figure this out.

If i have a pattern 'arc' and I want to search the string:
an arc is an archer, but what about marc and darcy?

How can I find out how many occurances of arc is within that string?  I
know I can do an explode and then compare it, but when you have huge
amounts of text... is this the best way?  Or is there something better?
Any help would be great I have been struggling with this for awhile,
since I really do not want to explode, pun intended :)

Rick


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Building Dynamic Value list using ohp

2001-09-26 Thread Maxim Maletsky \(PHPBeginner.com\)


1. this:
print(option value=\$row[0]\$row[0]/option);
 should be this:
print(option value=\{$row[0]}\{$row[0]}/option);
 or like this:
echo 'option value='.$row[0].''.$row[0].'/option');

The reason for it is that within double quote you can parse for 'simple'
variables only (es: $var, not $var[]). Otherwise it gives you a parse
error.

2. this: 
mysql_connect ('localhost', 'root', 'monty');
 better be this: 
mysql_connect ('localhost', '', ''); // for security
reasons obviously, you don't wanna give the password our to the group,
even so it is your local server (you might not be original with the
password on production machines, no?)


Hope it helps,
Maxim Maletsky

PHPBeginner.com




-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED]] 
Sent: mercoledì 26 settembre 2001 15.31
To: [EMAIL PROTECTED]
Subject: [PHP] Building Dynamic Value list using ohp


Hi all,

I'm having a problem with dynamically building a value list.

My code:

?php
mysql_connect ('localhost', 'root', 'monty');
mysql_select_db ('Heronsql');
   $query = (select HEI from heronuser); // LINE 22 on original script
   $result = mysql_query($query, $mysql_link);
 if(mysql_num_rows($result)) {
   // show all HEIs as options in select form
   while($row = mysql_fetch_row($result))
   {
  print(option value=\$row[0]\$row[0]/option);
   }
 }
?

But this generates:

Parse error:  parse error in c:\program files\apache
group\apache\htdocs\bizflyers\login.php on line 22

Any suggestions?

Regards

George



_

Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Getting the file size, wtihout download... is this possible ?

2001-09-26 Thread Maxim Maletsky \(PHPBeginner.com\)


AFAIAC,
The only function that gets you image size is GetImageSize() which you
claimed cannot do remote check. Therefore, I do not think you can manage
this without downloading/copying the file to your server.


Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Marian Vasile [mailto:[EMAIL PROTECTED]] 
Sent: mercoledì 26 settembre 2001 16.14
To: [EMAIL PROTECTED]
Subject: [PHP] Getting the file size, wtihout download... is this
possible ?


It is possible to get the filesize for couple files on other server,
without downloading ?

Probably this will be not fully resolved, but is there any way ?

Thanx,
M



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >