Re: [PHP] Array instead of Switch

2003-02-22 Thread Markas
"David Otton" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 22 Feb 2003 03:28:22 -, you wrote: > > >Let's say I need to take one of 20 actions depending on a form selection. I > >could use a switch statement with 20 cases, but I could also do something > >like: > > > >// Pre

[PHP] Re: Getting a Multiple Select Form Field's Value

2003-02-22 Thread Markas
Just replace the name of your element to "select[]" , and you'll get all the selected values as a php array under the name of $_GET['select']. "Mike Walth" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello: > > I'm trying to get the value from the following form field. > > >

[PHP] HELP: Memory exceeding

2003-02-21 Thread Markas
Hi... I got a big site, which is not very well constructed inside, and the script began to throw (rather often, but NOT always) a fatal error " Fatal error: Allowed memory size of 8388608 bytes exhausted ", every time in different places. I wonder how should I debug that, as there is pretty much co

[PHP] Re: :( This fact ruins my understanding of php :( please explain!

2002-10-09 Thread Markas
p;$a){return $a;} > > for ($i=0; $i < 100; $i++){$a = & f($big);} > > --- > Seairth Jacobs > [EMAIL PROTECTED] > > > "Markas" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I tried some trivial

Re: [PHP] This fact ruins my understanding of php :( please explain!

2002-10-09 Thread Markas
ng place. > > Basically things are optimized for the most common case. > > -Rasmus > > On Tue, 8 Oct 2002, Markas wrote: > > > I tried some trivial expirements: > > > > /* here I define an array $big, which I guess would "eat" ~100kb of memory */ >

[PHP] :( This fact ruins my understanding of php :( please explain!

2002-10-08 Thread Markas
I tried some trivial expirements: /* here I define an array $big, which I guess would "eat" ~100kb of memory */ for($i=0; $i<1; $i++) { $big[$i] = "1234567890"; } /* this func only returns the value it gets as a param...*/ function f($a){return $a;} $start = microtime(); /* here all the j

[PHP] This fact ruins my understanding of php :( please explain!

2002-10-08 Thread Markas
I tried some trivial expirements: /* here I define an array $big, which I guess would "eat" ~100kb of memory */ for($i=0; $i<1; $i++) { $big[$i] = "1234567890"; } /* this func only returns the value it gets as a param...*/ function f($a){return $a;} $start = microtime(); /* here all the j

[PHP] This fact ruins my understanding of php :( please explain!

2002-10-08 Thread Markas
I tried some trivial expirements: /* here I define an array $big, which I guess would "eat" ~100kb of memory */ for($i=0; $i<1; $i++) { $big[$i] = "1234567890"; } /* this func only returns the value it gets as a param...*/ function f($a){return $a;} $start = microtime(); /* here all t

[PHP] Re: Printing a PHP Class

2002-08-01 Thread Markas
Its hard to imagine anything better and clear than what print_r() or even var_dump() outputs... "Marty McGowan" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > PHPers, > In a genaology application, where I add individuals to > an array: > > $everyone[] = new I

Re: [PHP] PROBLEM

2002-08-01 Thread Markas
Yes I always arguing that its better to store date as an ordinary int "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I don't store anything in date format (eg -MM-DD)... I store them as a > unix time stamp -- see time() in the manual. > > T

[PHP] HELP! Problem configuring PHP

2002-07-30 Thread Markas
Hello, people. So the problem. I have apache running with php-module. Recently I've upgraded the 4.0.6 version up to 4.2.2. All my php configuration directives in httpd.conf (php_flag, php_admin_flag, php_value, php_admin_value) are not working now. When I change libphp4.so back to 4.0.6 the direc

[PHP] Re: fullname

2002-07-30 Thread Markas
Sveix. I guess if the space or any other character is needed between MORE than TWO strings, this is a good construction: $fullname = join(" ", array($session["f_name"], $session["l_name"],$session["middle_name"], ...)); P.S. I sometimes use this construct for generating sql statements "Mantas

[PHP] PHP directives in httpd.conf problems

2002-07-30 Thread Markas
Hello, people. So the problem. I have apache running with php-module. Recently I've upgraded the 4.0.6 version up to 4.2.2. All my php configuration directives in httpd.conf (php_flag, php_admin_flag, php_value, php_admin_value) are not working now. When I change libphp4.so back to 4.0.6 the direc

Re: [PHP] HELP !!! : Sablotron and not good HTML

2002-07-08 Thread Markas
the RFCs, use a validator, Sablotron will stop complaining. > (eg: ) <- (note method to close an image > tag) > > ..mike.. > > On Mon, 2002-07-08 at 16:52, Markas wrote: > > Sablotron seems not to like, when in my xsl file occurs "not good" html, > > like (without

[PHP] HELP !!! : Sablotron and not good HTML

2002-07-08 Thread Markas
Sablotron seems not to like, when in my xsl file occurs "not good" html, like (without closing tag), so how can I deal with this problem?!!! Checking and fixing all my HTML , which I want to use in XSL is not the way for me..., so I really HAVE to produce bad "not XML like" HTML, so I'll have to

[PHP] Re: Transfer Session Vars to different server

2002-04-08 Thread Markas
If you store your session vars in database, there will be no problem with retrieving sessions vars... You even can use native php4 functions for handling sessions, storing them in DB... Look in php manual for session_set_save_handler() function, or write your completely own code for db sessions.

[PHP] Re: PHP from HTML

2002-04-07 Thread Markas
1. Instead of ? you could use server side includes (this would work on SERVER2 side) below would work on client side: 2. Some Javascript file, which could be downloaded from SERVER1, like

Re: [PHP] A Small Bug Giving Me A Big Headache

2002-03-03 Thread Markas
$SQLString = "INSERT INTO Movies (Title, Actors, Review, Reviewer, Short) VALUES ('$Title','$Actors','$Review','$Reviewer','$Short')"; As the manual says: Note: Unlike the two other syntaxes, variables will not be expanded when they occur in single quoted strings. ... So maybe some your fiel

Re: [PHP] Checking how many users are logged in?

2002-03-03 Thread Markas
This jaust what I wanted to say... but while reading this I got to question: Is it possible to count active sessions, if the one uses php's sessions without writing any handler functions, just what php4 provides by default? > > >I have a site with logins, etc. I was wondering if there's any way

[PHP] Re: cursor focus

2002-03-03 Thread Markas
Hi, PHP will do NOTHING with cursor position in your page, because it's running on server. Perhaps what you've read is generating some Javascript (which actually places the cursor) with PHP... Hmmm, if you are not running Javascript, maybe an attribute TABINDEX, which almost every html tag has, w

[PHP] Re: shopping cart question

2002-03-02 Thread Markas
Why not use php's sessions, where php uses cookies for getting phpsessid, and if no cookies are available, it automatically adds those id's to every href (you can manage that in php's conf file) Jon Feldhammer <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED].; > The way I see it, there