Re: [PHP] Update db with $_POST

2005-03-15 Thread Ligaya Turmelle
assuming you are using PEAR DB - $result =& $db->query("UPDATE items SET (item_name, item_desc, item_price, extraprice) VALUES (?,?,?,?) WHERE item_id = 3", array($_POST['title'], $_POST['description'], $_POST['price'], $_POST['extraprice'])); if (PEAR::isError($result)) { echo "Error: There

Re: [PHP] if table not exists

2005-03-15 Thread Ligaya Turmelle
have you looked at the MySQL manual? http://dev.mysql.com/doc/mysql/en/create-table.html John Taylor-Johnston wrote: How do I get PHP to create a table, if one does not already exist? I have to do something with: $news = mysql_query($sql) or die(print mysql_error()); What can I also add something t

[PHP] Re: Can I use ftp_put to bypass upload_max_filesize?

2005-03-15 Thread Esad Hajdarevic
I'm not sure, but using multipart encoding may help, it essentially breaks the huge file into smaller chunks. Esad Sed wrote: I have been thinking about a way to upload a file through a web-browser, bigger than the upload_max_filesize is set in the php.ini on the server. Is it somehow possible, to

[PHP] QuickForm->process()

2005-03-15 Thread Esad Hajdarevic
Hi everyone, Shouldn't void HTML_QuickForm::process (mixed $callback [, bool $mergeFiles = TRUE]) actually return the value returned by the callback function? One example when this may be handy: if ($form->process(array(&$fb,'processForm'), false)) { //data processed (FormBuilder's processForm

Re: [PHP] Reading posted form variables

2005-03-15 Thread Ligaya Turmelle
I cheat. when I am putting something into a hidden field that will have HTML - I base64_encode it. then when the receiving page gets it I decode it. It keeps the html from accidentally showing up and "hides" it from the user. It's ugly - but effective. Simon Allison wrote: Hey, I have a

[PHP] Re: is_a() against instanceof

2005-03-15 Thread Christian Stadler
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Eli schrieb: > - ($cls instanceof ClassName) *requires* from ClassName to be declared, > and generates a fatal error when ClassName is not declared. How about if (class_exists('ClassName') AND $cls instanceof ClassName) { ... } Regards, Christia

Re: [PHP] password Boxes

2005-03-15 Thread Kevin
"Richard Lynch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Does anyone know how to change the style of password boxes so when the > > characters are entered an asterisk appears rather that a smal circle? > > > > Or is this just determed by the OS and uncangable with CSS or Jav

Re: [PHP] Ad software

2005-03-15 Thread James Williams
Ryan A wrote: Hey, I am looking for a software that just lists adverts... eg: Like ebay but without the bidding Requirements are simple, so simple that i am sure something like this exists and i dont have to write it myself: 0.They must register first then... 1.offer the person to put in his ad det

[PHP] Ad software

2005-03-15 Thread Ryan A
Hey, I am looking for a software that just lists adverts... eg: Like ebay but without the bidding Requirements are simple, so simple that i am sure something like this exists and i dont have to write it myself: 0.They must register first then... 1.offer the person to put in his ad details, a few o

Re: [PHP] if table not exists

2005-03-15 Thread John Taylor-Johnston
> http://dev.mysql.com/doc/mysql/en/create-table.html Thanks. Then this looks reasonable? Would anyone code it differently? # $server = "localhost"; $user = "myname"; $pass = "mypass"; $db = "mydb"; $table = "demo_assignment1"; ###

[PHP] Reading posted form variables

2005-03-15 Thread Simon Allison
Hey, I have a form which allows users to enter a message and then submits to a confirmation page which displays the submitted message, and it has a form with a hidden field which uses php to retrieve the message posted from the initial page and posts that message if the user clicks the submit b

RE: [PHP] Re: Can I use ftp_put to bypass upload_max_filesize?

2005-03-15 Thread SED
Are you meaning timeout limit? Not PHP script execution limit in php.ini? What I understand, the PHP script does not run until the file is uploaded to the server via POST. SED -Original Message- From: Eli [mailto:[EMAIL PROTECTED] Sent: 15. mars 2005 23:27 To: php-general@lists.php.net S

Re: [PHP] Re: Update db with $_POST

2005-03-15 Thread Danny Brow
On Tue, 2005-03-15 at 18:45 -0500, Jason Barnett wrote: > Danny Brow wrote: > > Thanks for looking, > > > > I figured it out, after RTFM for db, I found that I needed to do field=? > > instead of using VALUES (). > > > > > > > > Example: > > > > $db->query('UPDATE items SET item_name=?, item_desc=

Re: [PHP] warning & question about mysql sessions & concurrency

2005-03-15 Thread Brian
session_write_close() is also nice in that freeing the lock doesn't destroy your existing copy of the session variables, you can still use them in the rest of your script just remember that they exist in your current script as they were when you called session_start(), even if some other script mod

[PHP] Re: is_a() against instanceof

2005-03-15 Thread Eli
Jason Barnett wrote: Eli wrote: ... - is_a($cls,"ClassName") *doesn't require* from ClassName to be declared, and return false when ClassName is not declared. ... Try is_subclass_of() http://php.net/manual/en/function.is-subclass-of.php is_subclass_of() is not exactly like is_a(), in that it will

Re: [PHP] Re: recommending a PHP book?

2005-03-15 Thread Matt Zandstra
As the author, I'm precluded from _recommending_ my book 'PHP 5 Objects Patterns and Practice'. Nevertheless it does cover design patterns in general and enterprise patterns in particular, so it's relevant to the thread. http://www.amazon.com/exec/obidos/tg/detail/-/1590593804 It's worth taking

Re: [PHP] Re: bulk emailer

2005-03-15 Thread Manuel Lemos
Hello, on 03/14/2005 07:37 PM Chris W. Parker said the following: Usually you can tell the sendmail program to just queue the messages instead of deliverying them immediately using the delivery mode switch od . If you want to see how that is done, take a look at the sendmail_message_class of this p

Re: [PHP] if table not exists

2005-03-15 Thread Steve Buehler
http://dev.mysql.com/doc/mysql/en/create-table.html At 03:29 PM 3/15/2005, John Taylor-Johnston wrote: How do I get PHP to create a table, if one does not already exist? I have to do something with: $news = mysql_query($sql) or die(print mysql_error()); What can I also add something to $sql? $sql =

Re: [PHP] php compiler

2005-03-15 Thread Manuel Lemos
Hello, on 03/15/2005 03:05 AM Warren Vail said the following: I could be wrong, but I believe that all the Java apps out there are not native binary machine code either? unless you count the JRE (Java Runtime Environment). Seems to me that is the way things are today, with JRE's all having "run t

[PHP] if table not exists

2005-03-15 Thread John Taylor-Johnston
How do I get PHP to create a table, if one does not already exist? I have to do something with: $news = mysql_query($sql) or die(print mysql_error()); What can I also add something to $sql? $sql = "if not exists CREATE TABLE `demo_assignment1` ... John snip $server = "local

Re: [PHP] Can I use ftp_put to bypass upload_max_filesize?

2005-03-15 Thread Vidyut Luther
I don't think so. Considering you won't be able to initiate an ftp connection via a form.you could write some rpc type thing to do it, but it'd be more work than just changing your .ini setting. -- Vidyut Luther http://www.phpcult.com/ SED wrote: I have been thinking about a way to upload a fil

[PHP] Calling a function from the parent class

2005-03-15 Thread Eli
Hi, func(); //echo: B ?> How can I call func() of class A from $cls object (that when I call func() it will echo "A" and not "B")? Changing functions names or declaring another function in class B that will call parent::func() are not good for me. -thanks, Eli -- PHP General Mailing List (http

[PHP] Update db with $_POST

2005-03-15 Thread Danny Brow
I'm trying to update some form data with this db update query and it's not working, I'm not getting an error either. $db->query("UPDATE items SET item_name = $_POST[title], item_desc = $_POST[description], item_price = $_POST[price], extraprice = $_POST[extraprice] WHERE item_id = 3"); & I've t

Re: [PHP] Re: PHP-CLI Debugging Question

2005-03-15 Thread Jochem Maas
Jason Barnett wrote: Davy Durham wrote: No, I was looking for php to print each line of the code as it executes it. In that case, you want ob_implicit_flush() http://php.net/manual/en/function.ob-implicit-flush.php I think he is looking to print out the actual line of sourcecode that are being run

[PHP] Re: Can I use ftp_put to bypass upload_max_filesize?

2005-03-15 Thread Eli
Sed wrote: Is it somehow possible, to use ftp_put to upload a file bigger than the upload_max_filesize is set in the php.ini? (eg. upload 100Mb while upload_max_filesize is set to 16MB) You will have also to consider the browser's timeout limit. Uploading a 100MB file via HTTP POST will probably t

[PHP] opendir

2005-03-15 Thread Steve Buehler
So that I could use the opendir feature with an ftp url, I downloaded php-5.0.3 and used the following to make the cgi version: ./configure --enable-ftp make cp ./sapi/cgi/php /root Here is my script: start of script /root/z.php #!/root/php ftp://login:[EMAIL PROTECTED]/SHARE1/')) { ech

[PHP] RE: Update db with $_POST

2005-03-15 Thread Danny Brow
Thanks for looking, I figured it out, after RTFM for db, I found that I needed to do field=? instead of using VALUES (). Example: $db->query('UPDATE items SET item_name=?, item_desc=?, item_price=?, extraprice=? WHERE item_id = 3', array($_POST['title'], $_POST['description'], $_

[PHP] Re: recommending a PHP book?

2005-03-15 Thread Jeremiah Fisher
"PHP 5 Power Programming" by Andi Gutmans, Stig Bakken, and Derick Rethans may be worth the read for you. It doesn't mention an MVC, but they do talk a little about patterns in PHP. However, you probably won't find much in-depth coverage of patterns in PHP. There are alot of good books written

Re: [PHP] Re: PHP-CLI Debugging Question

2005-03-15 Thread Jason Barnett
Jochem Maas wrote: > Jason Barnett wrote: > >> Davy Durham wrote: >> >>> No, I was looking for php to print each line of the code as it >>> executes it. >>> >> >> >> In that case, you want ob_implicit_flush() >> >> http://php.net/manual/en/function.ob-implicit-flush.php > > > I think he is looking

Re: [PHP] How to call a function from $classname

2005-03-15 Thread Jochem Maas
Colin Ross wrote: under PHP5 at least, you should only be able to use $Class::method for public methods with a class, correct? there is a reason the class is called Test. say it slowly. let it sink in... ;-) basically write a test class and play with it, e.g: class Test { public static functio

[PHP] Re: Update db with $_POST

2005-03-15 Thread Jason Barnett
Danny Brow wrote: > Thanks for looking, > > I figured it out, after RTFM for db, I found that I needed to do field=? > instead of using VALUES (). > > > > Example: > > $db->query('UPDATE items SET item_name=?, item_desc=?, item_price=?, > extraprice=? WHERE item_id = 3', > array($_POS

[PHP] Re: is_a() against instanceof

2005-03-15 Thread Jason Barnett
Eli wrote: ... > - is_a($cls,"ClassName") *doesn't require* from ClassName to be > declared, and return false when ClassName is not declared. ... Try is_subclass_of() http://php.net/manual/en/function.is-subclass-of.php -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-quest

[PHP] Re: Calling a function from the parent class

2005-03-15 Thread Jason Barnett
Eli wrote: ... > How can I call func() of class A from $cls object (that when I call > func() it will echo "A" and not "B")? > ... func(); /** Produces A as expected If you don't need $this in your function A::func then this is the best way to go. */ A::func(); /** Produces A, as expected */ $met

[PHP] is_a() against instanceof

2005-03-15 Thread Eli
Hi, PHP5 uses the 'instanceof' keyword instead of the deprecated is_a() function. But there's a big difference between the two: - is_a($cls,"ClassName") *doesn't require* from ClassName to be declared, and return false when ClassName is not declared. - ($cls instanceof ClassName) *requires* fro

Re: [PHP] parse error, unexpected T_ENCAPSED_AND_WHITESPACE

2005-03-15 Thread Jeff Schmidt
Hello, Sorry about that. I took the source down after I solved the problem. The problem was a nasty type of syntax error caused by PHP implementation of HEREDOC string delimiting. I was using HEREDOC to stuff multiple lines of HTML into a string, in several places in my file, which is all fin

[PHP] Re: recommending a PHP book?

2005-03-15 Thread Philip Olson
Do. Not. Cross. Post. Use ONE mailing list at a time. Please have all further replies to this unfortunate thread go to php-general and only php-general. Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date of the end of support (security updates)

2005-03-15 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Hi i am searching the date of the end of support for the different versions of php there is no support as such. php4 is pretty much bugfix only. all the new work is being focused on php5. php3? (cue trumpets, cue 70's yellow, scrolling text, 'once a upon a time, long long a

[PHP] Can I use ftp_put to bypass upload_max_filesize?

2005-03-15 Thread SED
I have been thinking about a way to upload a file through a web-browser, bigger than the upload_max_filesize is set in the php.ini on the server. Is it somehow possible, to use ftp_put to upload a file bigger than the upload_max_filesize is set in the php.ini? (eg. upload 100Mb while upload_max_fi

Re: [PHP] How to call a function from $classname

2005-03-15 Thread Jochem Maas
André Pletschette wrote: Thankyou, That works ;) Here the code: $get_table_fields_cmd = $classname."::intializeClass(\$dbConnect);"; eval($get_table_fields_cmd); welldone for figuring a way to do it! I have to tell you tho that eval() is a very heavy function to use - my advice don't use it unless

Re: [PHP] Re: PHP-CLI Debugging Question

2005-03-15 Thread Jason Barnett
Davy Durham wrote: > No, I was looking for php to print each line of the code as it executes it. > In that case, you want ob_implicit_flush() http://php.net/manual/en/function.ob-implicit-flush.php signature.asc Description: OpenPGP digital signature

Re: [PHP] Re: PHP-CLI Debugging Question

2005-03-15 Thread Davy Durham
No, I was looking for php to print each line of the code as it executes it. Jason Barnett wrote: Davy Durham wrote: Hi.. I'm working on converting some CLI (not CGI) bash scripts to php and was wondering if there's an equivalent to 'set -x' from bash in php set -x in bash basically causes the st

[PHP] Re: Auto logout

2005-03-15 Thread Jason Barnett
Vaibhav Sibal wrote: > Hi > I wanted to implement an auto-logout feature for my project so that if > a terminal is left unattended for say 10 minutes, it should > automatically logoff the user. Apart from this, there is another How critical is it that the user be automatically logged out after 10

Re: [PHP] Auto logout

2005-03-15 Thread Dan Tappin
I do not think there is really any way around the dual login from the same browser issue. As for the auto-logout I have a suggestion. I have the same set-up for one of my sites. I have a session MySQL database and I track the id of a user once they login and then that record is updated with a

[PHP] RE: [PHP-DB] recommending a PHP book?

2005-03-15 Thread Bastien Koert
Martin Fowler is the man behind most of this style of Enterprise Architecture (http://www.martinfowler.com/books.html#eaa) His Pof EAA is the definitive book on this and is used as the model for php bastien From: "Danny Lin" <[EMAIL PROTECTED]> To: php-db@lists.php.net, phpdoc@lists.php.net, ph

[PHP] Auto logout

2005-03-15 Thread Vaibhav Sibal
Hi I wanted to implement an auto-logout feature for my project so that if a terminal is left unattended for say 10 minutes, it should automatically logoff the user. Apart from this, there is another problem that I am encountering with my authentication scheme, the scene is as follows : (1) I am usi

Re: [PHP] listing directories

2005-03-15 Thread Richard Lynch
> if ($dir = opendir($path)) > { > while($file = readdir($dir)) > { > if ($file != "." && $file != "..") > { > echo "$file"; > if (is_dir($file)) USE: is_dir("$path/$file") to get the full pathname so that PHP has some idea *which* directory it's suppose

Re: [PHP] listing directories

2005-03-15 Thread [EMAIL PROTECTED]
I replaced is_dir() with filetype() and code works just fine. But the question is still there! :) -afan [EMAIL PROTECTED] wrote: Ok, I wasn't able to find anything in archive to fit my needs... This is a problem: To display content of directory I have this code: if ($dir = opendir($path)) { whil

Re: [PHP] PHP file as homepage?

2005-03-15 Thread Joe Harman
Hey Phil, this can be defined in the apache config file Joe On Tue, 15 Mar 2005 11:10:30 -0500, Phil Neeb <[EMAIL PROTECTED]> wrote: > I've noticed that PHP.net uses index.php as its homepage and well, I'm > curious as to how that's possible. Is it the server setup that allows > them to load a

Re: [PHP] PHP file as homepage?

2005-03-15 Thread Robby Russell
On Tue, 2005-03-15 at 11:10 -0500, Phil Neeb wrote: > I've noticed that PHP.net uses index.php as its homepage and well, I'm > curious as to how that's possible. Is it the server setup that allows > them to load a php file as their homepage or something else? > Apache handles this... or your w

[PHP] OT - C programming

2005-03-15 Thread Jason Barnett
Rasmus Lerdorf wrote: > Jason Barnett wrote: > >> Jay Blanchard wrote: ... > In the end you are probably much better off learning a bit of C or C++ > and writing your own PHP extensions than hoping that someone will make a > compiler that will magically speed everything up. PHP was designed > spec

Re: [PHP] file/array manipulation

2005-03-15 Thread Richard Lynch
> Hello > > I'm trying to manipulate a text(.csv) file using php. I've read the file > and can print each line, > but I need to write where column A is missing > > ColumnAColumnB > > RABC company > ABC company > ABC company >

Re: [PHP] making links out of records? newbie

2005-03-15 Thread Nick
Thanks, that seems to work fine. Richard Lynch wrote: Hi there, i have a page called squad.php which queries a mysql table and outputs all the squad members from by football team. This is fine, however i would like to make each returned record into a hyperlink which when clicked on displays more de

Re: [PHP] PHP file as homepage?

2005-03-15 Thread Richard Lynch
> I've noticed that PHP.net uses index.php as its homepage and well, I'm > curious as to how that's possible. Is it the server setup that allows > them to load a php file as their homepage or something else? Yes. http://apache.org Search for "Index" I believe. -- Like Music? http://l-i-e.com/

Re: [PHP] PHP file as homepage?

2005-03-15 Thread Graham Cossey
On Tue, 15 Mar 2005 11:10:30 -0500, Phil Neeb <[EMAIL PROTECTED]> wrote: > I've noticed that PHP.net uses index.php as its homepage and well, I'm > curious as to how that's possible. Is it the server setup that allows > them to load a php file as their homepage or something else? Yes, it's normal

[PHP] Re: recommending a PHP book?

2005-03-15 Thread Jim Plush
Hey Danny, no good books on that subject regarding php/mcv that I've seen but PHP Architecht has some good articles on MVC, I believe they have a free issue that has a huge article on PHP/MVC. www.phparch.com Danny Lin wrote: Can any one recommend a good book that discusses MVC design patterns w

Re: [PHP] function reverse to get_object_vars

2005-03-15 Thread Richard Lynch
> Hello > > Do you know how to implement function reverse to get_object_vars? > For example if I have class and I wish to set it's properties from > database with loop through the columns in table? If you are willing to have the object properties be the same names as the columns, you do an assign

Re: [PHP] PHP file as homepage?

2005-03-15 Thread Chris Ramsay
Usually index.php is defined as a default document in httpd.conf if you are using apache, or set using the internet services dialogue in IIS On Tue, 15 Mar 2005 11:10:30 -0500, Phil Neeb <[EMAIL PROTECTED]> wrote: > I've noticed that PHP.net uses index.php as its homepage and well, I'm > curious

Re: [PHP] PHP file as homepage?

2005-03-15 Thread Chris Shiflett
Phil Neeb wrote: I've noticed that PHP.net uses index.php as its homepage and well, I'm curious as to how that's possible. Is it the server setup that allows them to load a php file as their homepage or something else? You can specify these, in order or preference, with the DirectoryIndex directiv

Re: [PHP] Array Help

2005-03-15 Thread Richard Lynch
> I'm running into the problem of not having a server that gives me database > access or ability to use files to store my data ... Yeah, I know, it > sucks. If switching servers isn't an option, just pay for another one somewhere, and then re-direct or something. The time you save HAS to be worth

Re: [PHP] PHP file as homepage?

2005-03-15 Thread John Nichel
Phil Neeb wrote: I've noticed that PHP.net uses index.php as its homepage and well, I'm curious as to how that's possible. Is it the server setup that allows them to load a php file as their homepage or something else? Using Apache? Change and/or add your DirectoryIndex; restart Apache. -- Joh

Re: [PHP] incrementing a number from a text file

2005-03-15 Thread Richard Lynch
BAD (probably): Select blablabla FROM t1,t2,t3 WHERE customers LIKE '%$s%' OR name LIKE '%$s%' OR domain LIKE '%$s%' OR email LIKE '%$s%' OR log LIKE '%$s%' AND t1.id = t2.t1_id AND t1.id = t3.t1_id GOOD (usually): Select blablabla FROM t1,t2,t3 WH

Re: [PHP] listing directories

2005-03-15 Thread Chris Ramsay
[snip] > How I can get answers on this queastion? I have a same problem and don't > want to bother you again with same thing :) [/snip] Check out the mail archive, mate... http://marc.theaimsgroup.com/?l=php-general&r=1&w=2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] listing directories

2005-03-15 Thread [EMAIL PROTECTED]
Ok, I wasn't able to find anything in archive to fit my needs... This is a problem: To display content of directory I have this code: if ($dir = opendir($path)) { while($file = readdir($dir)) { if ($file != "." && $file != "..") { echo "$file"; if (is_dir($file

Re: [PHP] php compiler

2005-03-15 Thread Rasmus Lerdorf
Jason Barnett wrote: Jay Blanchard wrote: [snip] Sooo.. I'm assuming there's no stable project for compiling php code to native binary machine code huh? (I've done some searching) Even anything commercial? (I didn't care for Zend's optimizer so much.. still has *RUN*time configuration) [/snip] ht

Re: [PHP] croping an image with GD and putting it into html code

2005-03-15 Thread Richard Lynch
> This function will return only the raw data for the new thumbnail > image. Is there a way to output the thumbnail image directly to a > tag in my html file? You *can* do that, but it's such a bad idea, I don't even remember how... And not all browsers support it anyway. > Is there a way to do

[PHP] Re: PHP file as homepage?

2005-03-15 Thread Jason Barnett
Phil Neeb wrote: > I've noticed that PHP.net uses index.php as its homepage and well, I'm > curious as to how that's possible. Is it the server setup that allows > them to load a php file as their homepage or something else? Yes. I don't know for 100% sure what they're using, but it's likely Apa

Re: [PHP] Why is the behavior between Apache2 and Tomcat so different?

2005-03-15 Thread Richard Lynch
> I have the same piece of PHP script running on either Apache2 or Tomcat. > On Tomcat, I have the folllowing errors: > 1- Cannot modify header information - headers already sent Figure out what's sending out HTML / text / blank lines / error messages *before* your header() call, and make it

[PHP] Re: listing directories

2005-03-15 Thread Jason Barnett
[EMAIL PROTECTED] wrote: > How I can get answers on this queastion? I have a same problem and don't > want to bother you again with same thing :) Thanks for being considerate! Check out STFA below... -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http

RE: [PHP] listing directories

2005-03-15 Thread Jay Blanchard
[snip] Hi guys, Few days ago somebody asked something about listing content of directories and subdirectories. How I can get answers on this queastion? I have a same problem and don't want to bother you again with same thing :) [/snip] http://www.php.net/readdir -- PHP General Mailing List (htt

Re: [PHP] listing directories

2005-03-15 Thread [EMAIL PROTECTED]
That's a problem - didn't know where to look :) Thanks! Chris Ramsay wrote: [snip] How I can get answers on this queastion? I have a same problem and don't want to bother you again with same thing :) [/snip] Check out the mail archive, mate... http://marc.theaimsgroup.com/?l=php-general&r=

Re: [PHP] How to call a function from $classname

2005-03-15 Thread Jochem Maas
André Pletschette wrote: Hi, What do I have to do to call a function from $classname? Like: $classname->test( ); class Test { function doIt() { echo "done it!\n"; } } $className = "Test"; $t = new $className; $t->doIt(); // also look at the functions // call_user_func() and call_user_func

[PHP] PHP file as homepage?

2005-03-15 Thread Phil Neeb
I've noticed that PHP.net uses index.php as its homepage and well, I'm curious as to how that's possible. Is it the server setup that allows them to load a php file as their homepage or something else? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u

Re: [PHP] How to call a function from $classname

2005-03-15 Thread André Pletschette
Thankyou, That works ;) Here the code: $get_table_fields_cmd = $classname."::intializeClass(\$dbConnect);"; eval($get_table_fields_cmd); André François-Xavier Lacroix wrote: Maybe With the eval() function ? Hi, What do I have to do to call a function from $classname? Like: $classname->test( ); Tha

Re: [PHP] making links out of records? newbie

2005-03-15 Thread Richard Lynch
> Hi there, i have a page called squad.php which queries a mysql table and > outputs all the squad members from by football team. This is fine, > however i would like to make each returned record into a hyperlink which > when clicked on displays more details about that player. I believe i > need

Re: [PHP] listing directories

2005-03-15 Thread John Nichel
[EMAIL PROTECTED] wrote: Hi guys, Few days ago somebody asked something about listing content of directories and subdirectories. How I can get answers on this queastion? I have a same problem and don't want to bother you again with same thing :) Search the archives. -- John C. Nichel ÜberGeek Keg

[PHP] recommending a PHP book?

2005-03-15 Thread Danny Lin
Can any one recommend a good book that discusses MVC design patterns with PHP (and mySQL)? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] listing directories

2005-03-15 Thread [EMAIL PROTECTED]
Hi guys, Few days ago somebody asked something about listing content of directories and subdirectories. How I can get answers on this queastion? I have a same problem and don't want to bother you again with same thing :) Thanks -afan -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: [PHP] How to call a function from $classname

2005-03-15 Thread Richard Davey
Hello André, Tuesday, March 15, 2005, 3:42:44 PM, you wrote: AP> What do I have to do to call a function from $classname? Like: $classname->test( ); Erm, you do exactly that. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I f

Re: [PHP] How to call a function from $classname

2005-03-15 Thread François-Xavier Lacroix
Maybe With the eval() function ? Hi, What do I have to do to call a function from $classname? Like: $classname->test( ); Thankyou, André -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to call a function from $classname

2005-03-15 Thread Dan Joseph
> What do I have to do to call a function from $classname? > > Like: $classname->test( ); Two methods: First: $classname = new ClassName(); $classname->test(); Second: ClassName::test(); -- -Dan Joseph "Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, a

[PHP] How to call a function from $classname

2005-03-15 Thread André Pletschette
Hi, What do I have to do to call a function from $classname? Like: $classname->test( ); Thankyou, André -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How can i calculate total process time?

2005-03-15 Thread JoShQuNe \(TR\)
Thnx for yr answers. I fixed it. Problem was the places of codes. They were line under line now i took to the beginning and itz calculating correctly.. The code was: //Beginning $mtime = explode(" ",microtime()); $starttime = $mtime[1] + $mtime[0]; //Just before i print $mtime = explode(" ",microt

Re: [PHP] How can i calculate total process time?

2005-03-15 Thread John Nichel
Chris Boget wrote: // At the very beginning of the script $startTime = date( 'U' ); // At the very end of the script $endTime = date( 'U' ); echo 'Total processing time: ' . ( $endTime - $startTime ) . ' second(s)'; I would use microtime instead of date('U') or time(); since date and time deal i

Re: [PHP] Is their something like $classname::$tablename ?

2005-03-15 Thread André Pletschette
I now solved my third problem as followed, I write the fields of a table into global Variables. If anybody has a better (nicer) way of doing this, I would be pleased to know ;) /** * Returns the Fields of a class */ static function getFields($classname) { $tablename = self:

[PHP] Re: PHP-CLI Debugging Question

2005-03-15 Thread Jason Barnett
Davy Durham wrote: > Hi.. I'm working on converting some CLI (not CGI) bash scripts to php > and was wondering if there's an equivalent to 'set -x' from bash in php > > set -x in bash basically causes the statements to be printed to stderr > as they are executed. Does php have something similar? >

Re: [PHP] How can i calculate total process time?

2005-03-15 Thread Ken
I do that for my site and sometimes for some very strange reason it returns a negative figure. so i use abs() to make sure it's positive always (but then it might not be true value...) On Tue, 15 Mar 2005 09:08:31 -0600, Chris Boget <[EMAIL PROTECTED]> wrote: > > Hi, i wanna ask if anybody knows

RE: [PHP] Screen resolution in php

2005-03-15 Thread Jay Blanchard
[snip] How can i get the screen resolutin in php. I've read that i can't this. With java i can do this. document.write("Your Screen Resolution Is : "); document.write(screen.width + " x " + screen.height); My question is how can pass the screen resolution from java to a variable? It is a better

Re: [PHP] How can i calculate total process time?

2005-03-15 Thread John Nichel
JoShQuNe (TR) wrote: Hi, i wanna ask if anybody knows how to calculate the total process time of a script. I guess there exists a function to perform but i dont know which one it is. I mean if u c any PHP Nuke site, it says this page is produced in seconds. I made some codes it calculates bu

[PHP] Re: Screen resolution in php

2005-03-15 Thread Jim Plush
you can get the resolution from javascript then pass that info to php using HTTP REQUEST http://jibbering.com/2002/4/httprequest.html or super low budget way could be to get that information from javascript then right after forward the page using javascript with the resolution variable in the q

Re: [PHP] Screen resolution in php

2005-03-15 Thread John Nichel
[EMAIL PROTECTED] wrote: Hi, How can i get the screen resolutin in php. I've read that i can't this. With java i can do this. document.write("Your Screen Resolution Is : "); document.write(screen.width + " x " + screen.height); My question is how can pass the screen resolution from java to a vari

Re: [PHP] newbie:changing variable to type resource

2005-03-15 Thread Jason Barnett
Saswat Praharaj wrote: ... > Without which I can't distinguish between different connections. > > Regards, > -Saswat > http://ecoustics-cnet.com.com/Tracking+PCs+anywhere+on+the+Net/2100-1029_3-5600055.html -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA

Re: [PHP] How can i calculate total process time?

2005-03-15 Thread Chris Boget
> Hi, i wanna ask if anybody knows how to calculate the total process > time of a script. I guess there exists a > function to perform but i dont know which one it is. I mean if u c any > PHP Nuke site, it says this page is produced in seconds. I made > some codes it calculates but i dont beli

Re: [PHP] php compiler

2005-03-15 Thread Jason Barnett
Jay Blanchard wrote: > [snip] > Sooo.. I'm assuming there's no stable project for compiling php code to > native binary machine code huh? (I've done some searching) Even > anything commercial? (I didn't care for Zend's optimizer so much.. still > > has *RUN*time configuration) > [/snip] > > http:

[PHP] Screen resolution in php

2005-03-15 Thread virtualsoftware
Hi, How can i get the screen resolutin in php. I've read that i can't this. With java i can do this. document.write("Your Screen Resolution Is : "); document.write(screen.width + " x " + screen.height); My question is how can pass the screen resolution from java to a variable? It is a better w

RE: [PHP] How can i calculate total process time?

2005-03-15 Thread Jay Blanchard
[snip] Hi, i wanna ask if anybody knows how to calculate the total process time of a script. I guess there exists a function to perform but i dont know which one it is. I mean if u c any PHP Nuke site, it says this page is produced in seconds. I made some codes it calculates but i dont beli

[PHP] 5.0.3 will not compile on solaris x86 v9 - zend_strtod fails to compile

2005-03-15 Thread Bob Tadlock
5.0.3 will not compile on solaris x86 v9 - zend_strtod fails to compile 5.0.2 compiles and runs fine PHP 5.0.3 solaris x86 version 9 gcc 3.3.2 (gnu) make 3.80 (gnu) flex 2.5.4 (gnu) bison 1.875 (gnu) m4 1.4.2 (gnu) autoconf 2.59 (gnu) automake 1.9 (gnu) perl 5.6.1 gzip 1.3.3 (gnu) tar 1.14 (gnu)

[PHP] making links out of records? newbie

2005-03-15 Thread Nick
Hi there, i have a page called squad.php which queries a mysql table and outputs all the squad members from by football team. This is fine, however i would like to make each returned record into a hyperlink which when clicked on displays more details about that player. I believe i need to use

[PHP] How can i calculate total process time?

2005-03-15 Thread JoShQuNe \(TR\)
Hi, i wanna ask if anybody knows how to calculate the total process time of a script. I guess there exists a function to perform but i dont know which one it is. I mean if u c any PHP Nuke site, it says this page is produced in seconds. I made some codes it calculates but i dont believe tha

[PHP] Re: TPC-W Implementation for PHP

2005-03-15 Thread Jason Barnett
Devraj Mukherjee wrote: > Hi everyone, > > We are implementing the Transaction Process Council (Web) standard in > PHP and are going to make it available under a LGPL license. Is there > anyone there who would be interested in making use of this to benchmark > the performance of their web setup? >

[PHP] Re: Zend II api's RETURN_STRING macro

2005-03-15 Thread Jason Barnett
Usya Usya wrote: ... Please do not send multiple messages to the list, especially that many so close together. -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-general&w=2 STFM | http://php.net/manual/en/index.php STFW

  1   2   >