Re: [PHP] Sort a text string by last word before separator

2004-06-23 Thread Evan Nemerson
If I were you I'd use preg_match_all() so you get the first and last name as separate elements, then use usort() to create a custom sorting function based on strnatcasecmp() Be careful about middle names and the such. On Thursday 24 Jun 2004 04:38, Andre Dubuc wrote: > Given a text string: > >

Re: [PHP] SQL Case sensitivity

2004-06-23 Thread Evan Nemerson
http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html should do the trick, provided you're using MySQL. On Wednesday 23 Jun 2004 20:14, Gabe wrote: > I hope I don't get too chastised for a double post ( posted in .db first > ), but I'm hoping someone can help me. > > I'm using PHP with ADOdb ( a

Re: [PHP] Object Oriented Programming in PHP

2004-06-23 Thread Chris Shiflett
--- Eric Marden <[EMAIL PROTECTED]> wrote: > I'm interested in getting up to speed on OOP in PHP can anyone > recommend some good titles for me to pick up? George Schlossnagle gave a good talk on this last night at NYPHP. His slides aren't up yet, but they should appear here soon: http://www.

[PHP] Object Oriented Programming in PHP

2004-06-23 Thread Eric Marden
I'm interested in getting up to speed on OOP in PHP can anyone recommend some good titles for me to pick up? Thanks! --- eric marden http://xentek.net --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Php survey+database

2004-06-23 Thread Joel Kitching
I think he wants us to tell him how to set up PHP and a database, and then write some PHP code to add survey results to the database. So, get on it! On Thu, 24 Jun 2004 13:07:28 +1000, Ligaya Turmelle <[EMAIL PROTECTED]> wrote: > > So what is your question. > > Respectfully, > Ligaya Turmelle >

Re: [PHP] PHP+GD on FreeBSD 5.1

2004-06-23 Thread Curt Zirzow
* Thus wrote Jason Williard: > I have been having an extremely difficult getting PHP installed with > GD support on a FreeBSD 5.1 system. While I can get the default GD > package installed, I can't seem to get it installed with JPEG support. > Does anyone know of any good tutorials or instruction

Re: [PHP] Determine whether $_GET has a value

2004-06-23 Thread Chris Shiflett
--- Terence <[EMAIL PROTECTED]> wrote: > Say you have a querystring - index.php?myname=joe > > To determine whether myname has a value I have come to the following > conclusions / shortcomings when using one of the following: There is an inherent problem in the varying ways that people interpret

[PHP] Determine whether $_GET has a value

2004-06-23 Thread Terence
Hi, Say you have a querystring - index.php?myname=joe To determine whether myname has a value I have come to the following conclusions / shortcomings when using one of the following: ISSET = as long as the variable myname exists it's set, but there's no guarantee of a value !EMPTY = if your nam

[PHP] Re: Php survey+database

2004-06-23 Thread Ligaya Turmelle
So what is your question. Respectfully, Ligaya Turmelle "Tommie Ramirez.Andujar" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dear colleagues.. > > I am new to php and I am trying to do the following, to create a php file > that may contain some kind of form or survey and the dat

Re: [PHP] issue with inheriting private property from abstract class in php5rc3

2004-06-23 Thread Curt Zirzow
* Thus wrote Marek Kilimajer: > Chris wrote --- napísal:: > >if anyone can, would you please explain why the below code does what it > >does? I would expect $this->test in TestInstance to refer to the > >inherited $test from Test. Using php5RC3. Thanks. > > > > >abstract class Test { > >pr

[PHP] Php newbe need help with a script

2004-06-23 Thread PHPme
Hi There! I only "used" php and never did any scripts in the last time by my self. Now i searched a script but its so frustrated - i didnt had found anything that i can use for my needs. I want to get a script that can do the following: If a user visits my Website - the visitor should get send t

Re: [PHP] issue with inheriting private property from abstract class

2004-06-23 Thread Justin Patrin
It's still a member, it just can't be accessed by the sub-class's methods. If you call the parent's methods or a method in the parent is called that isn't defined in the subclass, the private property is still there are still used as normal. On Wed, 23 Jun 2004 18:35:14 -0400, Chris <[EMAIL PROTEC

Re: [PHP] issue with inheriting private property from abstract class

2004-06-23 Thread Chris
ok, i understand now that private members are NOT inherited. i guess it was just throwing me off that var_dump()/print_r() display the parents private member, even tho its not really a member of the subclass. thanks Marek Kilimajer wrote: Chris wrote --- napísal:: if anyone can, would you pleas

[PHP] Re: MHTML in email

2004-06-23 Thread Manuel Lemos
Hello, On 06/23/2004 06:15 PM, Juan Pablo Herrera wrote: I need to attach a file extension .mhtml in function mail, but i too need view the content from the body of e-mail.That is everything! MHTML messages are just HTML messages with alternative plain text version in the same body. You may want

Re: [PHP] Re: I don't want to use include

2004-06-23 Thread Ulrik S. Kofod
If calling the backup function can wait till after your output is generated, then you can echo/print the output call " flush(); " and then call the backup routine. Then the backup won't apper to be slowing down as it is running after the output is send to the user. brgds QT sagde: > Dear sirs,

[PHP] attach ICO [icon] files to a file thru php

2004-06-23 Thread grahama
is it possible to attach a custom icon [like an ICO file on the server] to a file thru php ? I want to automatically generate a generic text file [ which is XML that launches a Quicktime Movie] that has a custom icon attached to it... then, I want to automatically send that newly created file

[PHP] PHP+GD on FreeBSD 5.1

2004-06-23 Thread Jason Williard
I have been having an extremely difficult getting PHP installed with GD support on a FreeBSD 5.1 system. While I can get the default GD package installed, I can't seem to get it installed with JPEG support. Does anyone know of any good tutorials or instructions for people with basic general knowl

Re: [PHP] issue with inheriting private property from abstract class in php5rc3

2004-06-23 Thread Marek Kilimajer
Chris wrote --- napísal:: if anyone can, would you please explain why the below code does what it does? I would expect $this->test in TestInstance to refer to the inherited $test from Test. Using php5RC3. Thanks. class TestInstance extends Test { public function __construct() { $

Re: [PHP] issue with inheriting private property from abstract class in php5rc3

2004-06-23 Thread Justin Patrin
Do you have E_STRICT turned on? If not, I believe PHP5 lets you access private / protected vars wherever you want. On Wed, 23 Jun 2004 13:40:48 -0400, Chris <[EMAIL PROTECTED]> wrote: > > if anyone can, would you please explain why the below code does what it > does? I would expect $this->test i

Re: [PHP] MHTML in email

2004-06-23 Thread Justin Patrin
You could just put the file contents in the body and set its content-type to text/html. On Wed, 23 Jun 2004 18:15:03 -0300 (ART), Juan Pablo Herrera <[EMAIL PROTECTED]> wrote: > > Hi! > I need to attach a file extension .mhtml in function mail, but i too need > view the content from the body of e

[PHP] MHTML in email

2004-06-23 Thread Juan Pablo Herrera
Hi! I need to attach a file extension .mhtml in function mail, but i too need view the content from the body of e-mail.That is everything! Regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Get users MAC-address of visitor

2004-06-23 Thread Matt Matijevich
[snip] What i am thinking about is using the MAC-address instead of the IP-address to ban troublesome users from forums etc. [/snip] Do you make people login? If you do couldn't you just flag troublesome users and not allow them to login. -- PHP General Mailing List (http://www.php.net/) To unsu

[PHP] issue with inheriting private property from abstract class in php5rc3

2004-06-23 Thread Chris
if anyone can, would you please explain why the below code does what it does? I would expect $this->test in TestInstance to refer to the inherited $test from Test. Using php5RC3. Thanks. class TestInstance extends Test { public function __construct() { $this->test = 0; }

Re: [PHP] Get users MAC-address of visitor

2004-06-23 Thread Marek Kilimajer
Yngve wrote --- napísal:: Hi! I wonder how i can retrive the MAC-address of the visitor using PHP? What i am thinking about is using the MAC-address instead of the IP-address to ban troublesome users from forums etc. If i just use the IP-address some users will just change it. I know that it´s poss

Re: [PHP] Filesize

2004-06-23 Thread Justin Patrin
On Wed, 23 Jun 2004 16:30:59 -0400, Geethanandh Kandasamy <[EMAIL PROTECTED]> wrote: > > while(($theFile = readdir($theDir)) !== FALSE){ > > != not !== > !== is correct, check the manual. If you had a directory named 0, != false would be false. -- paperCrane --Justin Patrin-- -- PHP General

Re: [PHP] Get users MAC-address of visitor

2004-06-23 Thread Travis Low
I don't think you can get that information. The packet at the MAC level is encpasulating the IP datagram. When the datagram is passed along to another network (e.g. through a router), another MAC packet is constructed, and the payload (datagram) of the original MAC packet is placed into the ne

[PHP] Get users MAC-address of visitor

2004-06-23 Thread Yngve
Hi! I wonder how i can retrive the MAC-address of the visitor using PHP? What i am thinking about is using the MAC-address instead of the IP-address to ban troublesome users from forums etc. If i just use the IP-address some users will just change it. I know that it´s possibly to spoof the MAC a

RE: [PHP] Filesize SOLVED

2004-06-23 Thread Jay Blanchard
[snip] > Boy you'd think that this would be simple, but I get no filesize with > the following [/snip] I HAVE gone loopy I was concating the directory HANDLE instead of the directory PATH...problem solved, idiot slapped in/on forehead -- PHP General Mailing List (http://www.php.net/) To u

Re: [PHP] Filesize

2004-06-23 Thread Geethanandh Kandasamy
while(($theFile = readdir($theDir)) !== FALSE){ != not !== On Wed, 23 Jun 2004 15:06:52 -0500, Jay Blanchard <[EMAIL PROTECTED]> wrote: > > Boy you'd think that this would be simple, but I get no filesize with > the following > > for($i = 4; $i < count($arrDirectory); $i++){ >if(is_dir

Re: [PHP] Filesize

2004-06-23 Thread Marek Kilimajer
Jay Blanchard wrote --- napísal:: Boy you'd think that this would be simple, but I get no filesize with the following for($i = 4; $i < count($arrDirectory); $i++){ if(is_dir($arrDirectory[$i])){ if($theDir = opendir($arrDirectory[$i])){ while(($theFil

RE: [PHP] Filesize

2004-06-23 Thread Jay Blanchard
[snip] the file should be in he same folder as that of the php script, otherwise you have to mention the absolute/relative path [/snip] I have tried the absolute path, it doesn't waork. Crud. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Filesize

2004-06-23 Thread Geethanandh Kandasamy
the file should be in he same folder as that of the php script, otherwise you have to mention the absolute/relative path Geethanandh On Wed, 23 Jun 2004 15:06:52 -0500, Jay Blanchard <[EMAIL PROTECTED]> wrote: > > Boy you'd think that this would be simple, but I get no filesize with > the follow

Re: [PHP] Filesize

2004-06-23 Thread Matt Matijevich
[snip] Have I gone loopy? Wait, don't answer that. Do I need to do something else to get the file size? I have read and searched, but to no avail yet. TIA! [/snip] Have you tried absolute path in filesize($theFile); or maybe chdir to $arrDirectory[$i] -- PHP General Mailing List (http://www.php

[PHP] Filesize

2004-06-23 Thread Jay Blanchard
Boy you'd think that this would be simple, but I get no filesize with the following for($i = 4; $i < count($arrDirectory); $i++){ if(is_dir($arrDirectory[$i])){ if($theDir = opendir($arrDirectory[$i])){ while(($theFile = readdir($theDir)) !== FALSE){

[PHP] Re: Form + database / PHP survey + database

2004-06-23 Thread James E Hicks III
On Wednesday 23 June 2004 03:32 pm, tommie ramirez.andujar wrote: > Dear colleagues.. > > I am new to mysql and I am trying to do the following, to create a php file > that may contain some kind of form or survey and the data entered may be > added to a database. Here's the code of the html form >

[PHP] SQL Case sensitivity

2004-06-23 Thread Gabe
I hope I don't get too chastised for a double post ( posted in .db first ), but I'm hoping someone can help me. I'm using PHP with ADOdb ( and an MS Access 2000 db ) to write a simple SQL statement but was running into some case sensitivity issues. Here's my SQL currently: SELECT autoQuesID,f

RE: [PHP] Php survey+database

2004-06-23 Thread Chris W. Parker
tommie ramirez.andujar on Wednesday, June 23, 2004 12:31 PM said: > I am new to php and I am trying to do the following, to create a php > file that may contain some kind of form or survey and the data > entered may be added to a database... > Here the code of the ht

[PHP] Re: printing out messages while processing a file

2004-06-23 Thread Gerben
just use the flush() method. this will send all text that is already pinted see the documentation for more info example: print "hello"; flush(); sleep(1000); print " world"; gr GB "Merlin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi there, > > I am writing a backup_restore f

[PHP] Php survey+database

2004-06-23 Thread tommie ramirez.andujar
Dear colleagues.. I am new to php and I am trying to do the following, to create a php file that may contain some kind of form or survey and the data entered may be added to a database... Here the code of the html form - Survey Survey Is reading important?

[PHP] Re: bad programming?

2004-06-23 Thread Kim Steinhaug
Could be something about the server environment, you could try changing to : $_SERVER["REQUEST_METHOD"] Run a phpinfo() and see what variables are active on your new server. I know that IIS webservers lack alot of the variables we take for granted mostly. -- -- Kim Steinhaug

Re: [PHP] bad programming?

2004-06-23 Thread bbonkosk
Try: if ($_SERVER['REQUEST_METHOD'] == 'POST') and then read: http://us4.php.net/reserved.variables -Brad - Original Message - From: Amanda Hemmerich <[EMAIL PROTECTED]> Date: Wednesday, June 23, 2004 12:13 pm Subject: [PHP] bad programming? > We just moved a bunch of code from one web

Re: [PHP] bad programming?

2004-06-23 Thread Matt Matijevich
[snip] The part that's not working is the $REQUEST_METHOD=='POST' line. [/snip] try $_SERVER['REQUEST_METHOD'] instead of $REQUEST_METHOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] bad programming?

2004-06-23 Thread Amanda Hemmerich
We just moved a bunch of code from one web hosting company to another. Now, one of the pages no longer works. I have been sort of starting from scratch, and the first line is still not working. Am I using something that I shouldn't be? Here is a code snippet: if ($REQUEST_METHOD=='POST') { f

[PHP] Re: Benchmarking a script

2004-06-23 Thread Kim Steinhaug
If you have an apache webserver setup you should look into the ab, apache benchmark suite. This will give you a very good tool to benchmark your files in its correct environment without altering your code. If youre on a windows plattform and cant locate the ab.exe tool please tell me and I'll emai

Re: [PHP] Re: CSV explode problem

2004-06-23 Thread V Patel
Thanks Justin. Works like a charm vp On Wed, 23 Jun 2004 08:48:57 -0700, Justin Patrin <[EMAIL PROTECTED]> wrote: > > > V Patel wrote: > > > I have a csv string. But the string also contains other strings with commas. > > > > Explode is not working with this kind of string. For example, > > >

RE: [PHP] OT? Getting peer reviews for an entire application

2004-06-23 Thread Chris W. Parker
Jason Barnett on Tuesday, June 22, 2004 11:23 PM said: > I'm not really > looking for people to help me "accomplish task X" as much as I'm > looking for people to just make suggestions for general code > improvement. > > So, where else might I find people that are

[PHP] Re: CSV explode problem

2004-06-23 Thread Justin Patrin
V Patel wrote: I have a csv string. But the string also contains other strings with commas. Explode is not working with this kind of string. For example, 1,2,3,"this string gets parsed , at the comma" Result of explode(",",string) is 1 2 3 this string gets parsed at the comma But what I want is 1 2

Re: [PHP] CSV explode problem

2004-06-23 Thread Matt Matijevich
[snip] Any help with parsing a string to replace those comma in string? [/snip] this was in the user comments on http://www.php.net/manual/en/function.fgetcsv.php function csv_split($line,$delim=',',$removeQuotes=true) { #$line: the csv line to be split #$delim: the delimiter to split by #$remov

[PHP] PHP-based XML utilities

2004-06-23 Thread Jason Barnett
Hey all, I've been working a lot more with XML recently and it seems like there's been a fair number of other people using XML too (based on the moderate number of XML-based problems showing up on this list). So, I thought I might build a form with PHP that helps people trying to work with XML

Re: [PHP] CSV explode problem

2004-06-23 Thread V Patel
Justing, I will be waiting for your response Thanks, vp On Wed, 23 Jun 2004 08:19:55 -0700, Justin Patrin <[EMAIL PROTECTED]> wrote: > > V Patel wrote: > > > Input is a large string. We have no control over the file, so its not > > coming from the file. > > > > Any help with parsing a string t

Re: [PHP] CSV explode problem

2004-06-23 Thread Justin Patrin
V Patel wrote: Input is a large string. We have no control over the file, so its not coming from the file. Any help with parsing a string to replace those comma in string? On Wed, 23 Jun 2004 10:12:16 -0500, Matt Matijevich <[EMAIL PROTECTED]> wrote: [snip] I have a csv string. But the string also

Re: [PHP] CSV explode problem

2004-06-23 Thread V Patel
Input is a large string. We have no control over the file, so its not coming from the file. Any help with parsing a string to replace those comma in string? On Wed, 23 Jun 2004 10:12:16 -0500, Matt Matijevich <[EMAIL PROTECTED]> wrote: > > > [snip] > I have a csv string. But the string also con

Re: [PHP] Trying to create and save a DOM XML file.

2004-06-23 Thread Matt Matijevich
[snip] So I have: $doc->save("/tmp/test.xml"); This does not work Thoughts? [/snip] you have this in your previous email $doc->dump_mem() . Just do this $file = $doc->dump_mem(); then write $file to a file. there is also this http://www.php.net/manual/en/function.domdocument-dump-file.p

Re: [PHP] CSV explode problem

2004-06-23 Thread Matt Matijevich
[snip] I have a csv string. But the string also contains other strings with commas. [/snip] is the csv coming from a file? if it is try http://www.php.net/manual/en/function.fgetcsv.php if not there is some user comments on that page that might help. -- PHP General Mailing List (http://www.p

[PHP] Re: .NFO files and .PNG images

2004-06-23 Thread r4BBiT
On Tue, 22 Jun 2004 12:05:02 -0400, R4bbit <[EMAIL PROTECTED]> wrote: can anyone please help with thist? hi, i'm having troubles converting ascii extended symbols, for exaple one of them looks like that 'Ü' in win, but in unicode, or old ibm dos extended ascii its black box. most of ascii art u

[PHP] Trying to create and save a DOM XML file.

2004-06-23 Thread Eric L. Sammons
I have created an XML, via php, and doing a dump_mem() everything looks as expected. Now I need to have it write to a file. I have found the function DOMDocument->save(); however, when used it appears that it is unknown. I believe this may be deprecated or because I am using domxml_new_doc()

[PHP] CSV explode problem

2004-06-23 Thread V Patel
I have a csv string. But the string also contains other strings with commas. Explode is not working with this kind of string. For example, 1,2,3,"this string gets parsed , at the comma" Result of explode(",",string) is 1 2 3 this string gets parsed at the comma But what I want is 1 2 3 this str

Re: [PHP] Help with creating an XML Document

2004-06-23 Thread Gabriel Birke
I think you only have to change one line of your php code: $text = $doc->create_text_node("00"); instead of $text = $doc->create_text_node($el["00"]); With best regards Gabriel Birke -- KONTOR4_Neue Medien Plathnerstraße 5 30175 Hannover Fax: +49 51184 48 98 99 mailto:[EMAIL PROTECTED] http

Re: [PHP] Help with creating an XML Document

2004-06-23 Thread Matt Matijevich
[snip] Can someone help me fix my code so that when I add an element I can also set some contents or a value for that element? example 000 [/snip] $doc = domxml_new_doc("1.0"); $root = $doc->add_root("Server"); $root->set_attribute("Name", "pxtest01"); $el = $doc->create_element("Serial_Num

[PHP] Help with creating an XML Document

2004-06-23 Thread Eric L. Sammons
Using PHP 4.3.2 I am trying to create an XML file that looks similar to the following: 0 0 DL380 8th Floor 2 Customer Upgrade I get the following output: Using the following code: add_root("Server"); $root->set_attribute("Name", "pxtest01"); $el = $doc->create_element("Seria

Re: [PHP] ISAPI vs CGI

2004-06-23 Thread Gerard Samuel
On Wednesday 23 June 2004 05:08 am, Jason Wong wrote: > On Wednesday 23 June 2004 16:42, Vincent DUPONT wrote: > > I have a script that need to run on ISAPI module on one server and on CGI > > on anther server. I would like my code to be able to react differently > > depending on the CGI/ISAPI mode

Re: [PHP] Re: Benchmarking a script

2004-06-23 Thread raditha dissanayake
Anguz wrote: Jason Barnett wrote: Well you could put all of your function definitions into a separate file. Then, just include the function file before you loop through the code that uses the functions. Or as an alternative you could also do: But this really isn't a good idea. Try to put th

[PHP] Anybody have RLIB compiled for OS X?

2004-06-23 Thread Don Myers
Anybody have the open source report writer via PHP compiled for OS X Here is the URL http://rlib.sicompos.com/ Don Myers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: I don't want to use include

2004-06-23 Thread Jason Barnett
Qt wrote: Dear sirs, Actually I am using virtual server and I think I have no write to use crontab/ But this methods become to me interesting. I will try to learn more about how to use crontab and where can I find that in my virtual server? This isn't exactly a PHP issue, it's your operating system

RE: [PHP] How to create doc file.

2004-06-23 Thread Jay Blanchard
[snip] Please help me. I need create *.doc file in php script. In this file, will be data from mysql database. Is it possible ? [/snip] http://catb.org/~esr/faqs/smart-questions.html Yes it is possible. It requires that you have COM and a way to search the internet for the answers. Google, being

[PHP] Parsing entities in XML attributes

2004-06-23 Thread Gabriel Birke
Hello! I've got an XML file that has the following tag: I parse it with the following handler (simplified a bit): function start_tag($parser, $name, $attrs) { global $text; if($name == "CUSTOMTEXT") $text = $attrs['TEXT']; // more tags here .. } When I echo

[PHP] How to create doc file.

2004-06-23 Thread Roman Duriancik
Please help me. I need create *.doc file in php script. In this file, will be data from mysql database. Is it possible ? Thanks you roman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Solaris - IPlanet - Initialized PHP Module frequently

2004-06-23 Thread masro
Ok, i got an Backtrace bash-2.03# gdb /netscape/server4/bin/https/bin/ns-httpd core.ns-httpd.22451.5.60001.60001.1087980112 GNU gdb 6.1 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute

[PHP] Re: session_is_registered gets session values only after doing some output first !?

2004-06-23 Thread Jason Barnett
Frank Rust wrote: I try to check if a session is registered. This works fine if I first do some output echo "abc"; if (!session_is_registered('userid')) { do_something(); } else { redirect_to_somewhere(); } and I can't redirect to another page ... If I comment out the echo statement I get alw

[PHP] Re: I don't want to use include

2004-06-23 Thread QT
Dear sirs, Actually I am using virtual server and I think I have no write to use crontab/ But this methods become to me interesting. I will try to learn more about how to use crontab and where can I find that in my virtual server? If I use include in my script, I need to wait result of included s

[PHP] Re: session_is_registered gets session values only after doing some output first !?

2004-06-23 Thread Daniel Kullik
Frank Rust wrote: I try to check if a session is registered. This works fine if I first do some output echo "abc"; if (!session_is_registered('userid')) { do_something(); } else { redirect_to_somewhere(); } and I can't redirect to another page ... If I comment out the echo statement I get alw

[PHP] Re: Benchmarking a script

2004-06-23 Thread Anguz
Jason Barnett wrote: Well you could put all of your function definitions into a separate file. Then, just include the function file before you loop through the code that uses the functions. Or as an alternative you could also do: But this really isn't a good idea. Try to put the function def

[PHP] session_is_registered gets session values only after doing some output first !?

2004-06-23 Thread Frank Rust
I try to check if a session is registered. This works fine if I first do some output echo "abc"; if (!session_is_registered('userid')) { do_something(); } else { redirect_to_somewhere(); } and I can't redirect to another page ... If I comment out the echo statement I get always false and $_S

[PHP] Re: Benchmarking a script

2004-06-23 Thread Jason Barnett
Well you could put all of your function definitions into a separate file. Then, just include the function file before you loop through the code that uses the functions. Or as an alternative you could also do: But this really isn't a good idea. Try to put the function definitions into a sepa

Re: [PHP] ISAPI vs CGI

2004-06-23 Thread Jason Wong
On Wednesday 23 June 2004 16:42, Vincent DUPONT wrote: > I have a script that need to run on ISAPI module on one server and on CGI > on anther server. I would like my code to be able to react differently > depending on the CGI/ISAPI mode. > > How can I detect the running mode of PHP?? > is there a

Re: [PHP] printing out messages while processing a file

2004-06-23 Thread Jason Wong
On Wednesday 23 June 2004 14:41, Greg Donald wrote: > On Wed, 23 Jun 2004 08:34:17 +0200, Merlin <[EMAIL PROTECTED]> wrote: > > I am writing a backup_restore file which creates directories and picture > > files with different resolutions out of an original file. > > > > After each process completes

[PHP] ISAPI vs CGI

2004-06-23 Thread Vincent DUPONT
Hi, I have a script that need to run on ISAPI module on one server and on CGI on anther server. I would like my code to be able to react differently depending on the CGI/ISAPI mode. How can I detect the running mode of PHP?? is there a $_SERVER variable or anything?? vincent -- PHP General M

[PHP] Benchmarking a script

2004-06-23 Thread Anguz
Hello, I have a script I am optimizing and want to compare the before and after in speed. So I wrote a few lines to loop this script but I have a problem. In the script I'm optimizing there's some function definitions and when the script starts the second iteration it throws an error because th

[PHP] Re: How to add carriage returns??

2004-06-23 Thread Justin Patrin
Brent Clements wrote: Ok I have a general problem. I have a textarea on an html form. Well when the user get's to the end of the textarea, it wrap's around. The problem with this is that unless they do a carriage return, the text entered into the textarea is a very long line. So when ever they su

[PHP] Re: MySQL question

2004-06-23 Thread David Robley
John Taylor-Johnston wrote: > Sorry, MySQL question. Any takers? If I search for 'margaret atwood', I > get results in no real structured heirachy. Any thoughts? > > atwood' IN BOOLEAN MODE);>Search color="blue">ccl.ccl_main For: margaret > atwood - 275 record(s) found > > John The results fr