Re: [PHP] Paging HOWTO for PHP n' MYSQL

2002-10-02 Thread Rasmus Lerdorf
Just pass the current position from one page to the next and use a LIMIT start,num clause. -Rasmus On Wed, 2 Oct 2002, Francisco Vaucher wrote: Hi people, i've been searching for a while in google and vivisimo for docs that treats paging techniques for php and mysql. And so far i seek

Re: [PHP] Help with CHdir

2002-10-02 Thread Rasmus Lerdorf
Your code makes no sense and the error message is telling you exactly what you did wrong. opendir() returns a directory handle to be passed to readdir(). Calling chdir() on a directory handle makes no sense. You want to chdir to the same string that you passed to opendir() -Rasmus On Wed, 2

Re: [PHP] Help with Numbers

2002-10-02 Thread Christopher J. Crane
Thank you very much, I did not know sort would work this way. Makes complete sense now though. Thansk again I will give it a shot. Rasmus Lerdorf [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Sort the arrays and pick off the first and last elements. On Wed, 2

[PHP] addslashes and remove slashes.

2002-10-02 Thread Anil Garg
Hi, Is it so that in php 4.2.3 we have to do both...addslashes and removeslashes ?? coz in one of the older versions the things are goin fine without using removeslashes but it doesnet seem to be the case in php4.2.2. thanx and regards anil -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] addslashes and remove slashes.

2002-10-02 Thread Rasmus Lerdorf
No, nothing has changed in recent memory with respect to this. On Wed, 2 Oct 2002, Anil Garg wrote: Hi, Is it so that in php 4.2.3 we have to do both...addslashes and removeslashes ?? coz in one of the older versions the things are goin fine without using removeslashes but it doesnet seem

[PHP] Global variables

2002-10-02 Thread Anna Gyor
Hello, how can I use global variables in my web portal? I have read the php documentation, but it works only in the same file. I want use more global variable on many php site. For example: In login.php I use the code $first=mysql_result($result,0,FIRST_NAME); and I want to print

[PHP] (bad file descriptor) is a BUG

2002-10-02 Thread Robert Samuel White
I was able to work around this solution by using it on a different server with a different version of PHP. I decided to do this after reviewing the search results at Google.com This is a known bug that the PHP development team has chosen to ignore, as this article clearly outlines:

Re: [PHP] Setting date fields in mysql queries

2002-10-02 Thread Frank
Hi, it's a great tip to install PhpMyAdmin - or phpPgAdmin for PostgresSQL - this will only take you at most half an hour even for a newcomer. You can then easily test queries, see any error messages and see what result they have on tables. In this case I'd echo out the query echo $query =

[PHP] counting number of records in a MySQL table; how do I get the result?

2002-10-02 Thread DonPro
Hi, I need to do either an insert or update into a MySQL table. Insert if there are 0 records or update if one record exist: This is my code snippet: if (mysql_query(SELECT COUNT(*) FROM AuthNum) == 0) { mysql_query(INSERT into AuthNum (FirstNum, LastNum, NextNum) VALUES (1,2,3),$dblink);

Re: [PHP] counting number of records in a MySQL table; how do I get the result?

2002-10-02 Thread Kevin Stone
$result = mysql_query(); if (mysql_num_rows($result) $x) -Kevin - Original Message - From: DonPro [EMAIL PROTECTED] To: php list [EMAIL PROTECTED] Sent: Wednesday, October 02, 2002 2:35 PM Subject: [PHP] counting number of records in a MySQL table; how do I get the result? Hi, I

Re: [PHP] counting number of records in a MySQL table; how do I getthe result?

2002-10-02 Thread Rasmus Lerdorf
$ret = mysql_query(SELECT count(*) as foo FROM AuthNum); $result = mysql_fetch_array($ret); echo $result['foo']; One of many ways... -Rasmus On Wed, 2 Oct 2002, DonPro wrote: Hi, I need to do either an insert or update into a MySQL table. Insert if there are 0 records or update if one

[PHP] MORE Problems with PHP as CGI and Flash !!!!!!!!!!

2002-10-02 Thread Rebekah Garner
Here is the URL to a project that is far as I am concerned was finished. http://www.overbrookfarm.myiglou.com It is a Flash site that uses PHP for dynamically updating text in some text fields. If I can direct you to the Stallions menu---pick a horse. A page should load that has a picture of

Fw: [PHP] Global variables

2002-10-02 Thread Kevin Stone
As far as I know there is no way to set a site-wide global from within a script. Use PHP Sessions or set a Cookie and then print the variable in any script you want by calling $_SESSION['first'] or $COOKIES['first'];. But you'll need a starting point for your visitors in order for this to work.

Re: [PHP] eregi_replace / preg_match_all

2002-10-02 Thread Jennifer Swofford
Extraordinarily helpful; thank you very much! Thanks to both Mike and Kevin on this. Jen Why does this work: $contents = eregi_replace((\)(.(/))*[A-Z0-9_/-]+(.gif|.jpg), \blah.gif, $contents); But this does not: preg_match_all((\)(.(/))*[A-Z0-9_/-]+(.gif|.jpg),

[PHP] no errors ?

2002-10-02 Thread gamin
hi, i'm running PHP 4.0.6 with apache on RedHat 7.2 , error_reporing is set to default(2039) in the php.ini file : my script is as follows : ? qwe; dsf ? But i dont get even a parse error or anything Any clues to what is going wrong ? thx gamin. -- PHP General Mailing List

[PHP] Some mcrypt function don't seem to work.

2002-10-02 Thread Scott Fletcher
Hi! I had PHP compiled with the --with-mcrypt option. So, when I use this script, PHP spit out the error Warning: could not open encryption module but it work fine if I use other script like $SSL_CIPHER_USEKEYSIZE. --clip-- mcrypt_module_open(MCRYPT_TripleDES, , MCRYPT_MODE_ECB, );

Re: [PHP] Inheritance and a class function: on what class was it called?

2002-10-02 Thread Debbie Dyer
I probably should've used the term static from the beginning. - maybe The mistake is mine not yours. I know about the :: operator I use it all the time (but within classes parent::function() etc) - but I never realised until now that PHP will let you use any class before instantiation (and

Re: [PHP] no errors ?

2002-10-02 Thread Jason Reid
Check ur php.ini, there are settings to display showing absolutly any error, warning, and message. they are probaly set to not show them. error_reporting = E_ALL ~E_NOTICE thats what i use, only displays what i need Jason Reid [EMAIL PROTECTED] -- AC Host Canada www.achost.ca - Original

Re: [PHP] no errors ?

2002-10-02 Thread Robert Cummings
Shot in the dark that may or may not help... Look into display_errors and log_errors. I think those are the names. They control where error output goes. Cheers, Rob. gamin wrote: hi, i'm running PHP 4.0.6 with apache on RedHat 7.2 , error_reporing is set to default(2039) in the php.ini

Re: [PHP] Inheritance and a class function: on what class was itcalled?

2002-10-02 Thread Rasmus Lerdorf
The mistake is mine not yours. I know about the :: operator I use it all the time (but within classes parent::function() etc) - but I never realised until now that PHP will let you use any class before instantiation (and nearly all my PHP work uses classes). I have never even attempted to try

[PHP] Server API

2002-10-02 Thread Alex Shi
Hi, My hosting provider still using CGI as Server API. I think this is way too much dropped behind. On my own development server I use Apache as Server API. However, maybe this could be a kind of consideration for the situation that multi-sites hosted on one server? I am thinking I'd better

Re: [PHP] Inheritance and a class function: on what class was it called?

2002-10-02 Thread Nick Eby
PHP allows static method calls... But back to my original question... inside a method that has been called statically, can I determine for what class the method was called? Again, obviously the question is only applicable if there is some inheritance involved, and the child class does not

[PHP] reg exp matching/replacing

2002-10-02 Thread Jennifer Swofford
I'm getting much closer to achieving my goal here. Now, I'm missing yet one more element. Here is my code: -- $filename = newexample.html; $fd = fopen ($filename, r); $contents = fread ($fd, filesize ($filename)); preg_match_all('{\/*[A-z0-9_/-]+(.gif|.jpg)}', $contents, $matches);

Re: [PHP] Inheritance and a class function: on what class was itcalled?

2002-10-02 Thread Rasmus Lerdorf
Since static method calls are completely disconnected from any class instance asking which class the method call is from is rather meaningless, and no, I don't think there is any way to get that. -Rasmus On Wed, 2 Oct 2002, Nick Eby wrote: PHP allows static method calls... But back to my

RE: [PHP] Quick question.

2002-10-02 Thread David Freeman
I am the webmaster of the site, i pay for the server space, is that what you mean? First up Simon, I deleted over a hundred lines of no longer relevant content from your message including things like signatures. You should probably trim messages down when you reply to them... Next up,

Re: [PHP] Inheritance and a class function: on what class was it called?

2002-10-02 Thread Debbie Dyer
Without them being defined in some special way? I am very surprised that after 7 years of OOP I dont know that but I will check it out tomorrow. Debbie - Original Message - From: Rasmus Lerdorf [EMAIL PROTECTED] To: Nick Eby [EMAIL PROTECTED] Cc: Debbie Dyer [EMAIL PROTECTED]; [EMAIL

Re: [PHP] Inheritance and a class function: on what class was it called?

2002-10-02 Thread Nick Eby
which is what I suspected... thanks for confirming. and yes, the call is disconnected from any class _instance_, but not from any class. as you said before, PHP has some OO differences from java, etc, and this is one of them... if you had static members, then methods called statically would

RE: [PHP] counting number of records in a MySQL table; how do I get the result?

2002-10-02 Thread John W. Holmes
$result = mysql_query(); if (mysql_num_rows($result) $x) -Kevin This won't work because a SELECT COUNT(*) query always returns a row, even if it returns zero as the value. $result = mysql_query(SELECT COUNT(*) FROM ... ); $count = mysql_result($result,0); ---John Holmes... - Original

RE: [PHP] Global variables

2002-10-02 Thread John W. Holmes
how can I use global variables in my web portal? I have read the php documentation, but it works only in the same file. I want use more global variable on many php site. For example: In login.php I use the code $first=mysql_result($result,0,FIRST_NAME); and I want to print

RE: [PHP] PHP User Name on Win2000

2002-10-02 Thread John W. Holmes
If you are using IIS, then PHP runs as the IIS user, IUSR_computer_name. If your computer name is Mango, then it'd be IUSR_MANGO. ---John Holmes... -Original Message- From: Ionut Ciocirlan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 2:54 PM To: PHP List Subject:

Re: [PHP] Global variables

2002-10-02 Thread Peter J. Schoenster
On 2 Oct 2002 at 22:06, Anna Gyor wrote: how can I use global variables in my web portal? I have read the php documentation, but it works only in the same file. I want use more global variable on many php site. For example: In login.php I use the code

Re: [PHP] no errors ?

2002-10-02 Thread Jason Young
I noticed that by default, my display_errors was actually OFF, and the only way to see my errors was through Apache's error.log file I don't know if that's already been checked, but... figured I'd try to help. -Jason Gamin wrote: Yes, On both my development machine and implmetation

Re: [PHP] no errors ?

2002-10-02 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, Is short_tags on? ~Pauly On Wednesday 02 October 2002 05:51 pm, gamin wrote: hi, i'm running PHP 4.0.6 with apache on RedHat 7.2 , error_reporing is set to default(2039) in the php.ini file : my script is as follows : ? qwe; dsf ?

Re: [PHP] MORE Problems with PHP as CGI and Flash !!!!!!!!!!

2002-10-02 Thread antis0cial d0rk
I took a course on PHP for Flash and the entire class ran into this problem. There was a problem with the Flash plug-in awhile back that was causing problems with dynamic text being loaded. Have your client download and install the most recent plug-in and that should fix the problem. -

Re: [PHP] getImageSize

2002-10-02 Thread tuxen
check the permissions on the directory the image is in as well On Wed, 2002-10-02 at 12:51, Dan McCullough wrote: anyone know what migth cause this error. I changed the mode to 777, made sure that is was the correct owner.group. getimagesize: Unable to open

[PHP] Trouble with understanding arrays

2002-10-02 Thread Christopher J. Crane
I am having problems with arrays. I guess I just don't understand them all that well. I have an simple array of stock tickers. Then for each ticker I go to Yahoo to get their current price and try to push the Name of the ticker and it's value into an associative array(I think). Then I want to

[PHP] Re: Access denied to php files in Netscape 6

2002-10-02 Thread Chris Nielsen
I still haven't figured this out. URL problems? No. The first time I tried it I copied the URL directly out of my IE address bar to just check the file in Netscape quick to see how it looked. You are not authorized to view this page HTTP 401.3 - Access denied by ACL on resource Internet

[PHP] Re: Access denied to php files in Netscape 6

2002-10-02 Thread Chris Nielsen
Forgot to mention that I have no proxy settings set for either IE or Netscape. Chris Nielsen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I still haven't figured this out. URL problems? No. The first time I tried it I copied the URL directly out of my IE

Re: [PHP] counting number of records in a MySQL table; how do I get the result?

2002-10-02 Thread Jeff Bluemel
so why not take that resulting row, and then do an if on it to see if the value is a zero? an extra step, but it would work John W. Holmes [EMAIL PROTECTED] wrote in message 002c01c26a66$61f0e1a0$7c02a8c0@coconut">news:002c01c26a66$61f0e1a0$7c02a8c0@coconut... $result = mysql_query(); if

Re: [PHP] counting number of records in a MySQL table; how do I get

2002-10-02 Thread Dan Koken
Or another way if you don't want a result when it's zero. $rslt = mysql_query(SELECT count(*) as cnt FROM tbl having cnt 0); HTH.. Have a great day.. Dan Rasmus Lerdorf wrote: $ret = mysql_query(SELECT count(*) as foo FROM AuthNum); $result = mysql_fetch_array($ret); echo $result['foo'];

Re: [PHP] How can I check for variances in spelling within formtext input fields?

2002-10-02 Thread Justin French
Hi, 1. you might start by removing things which are common problems... make everything lowercase, uppercase, uppercasewords, etc etc (if not permanent, just for comparison). You may also strip out leading and trailing whitespace, multiple spaces, etc etc. You may choose to remove LTD, PTY,

Re: [PHP] extract domain name from a URL

2002-10-02 Thread Justin French
I think parseurl() does what you want... it's in the manual (surprise surprise!!) http://php.net/parseurl Justin on 03/10/02 5:18 AM, Joseph Szobody ([EMAIL PROTECTED]) wrote: Folks, I want to keep track of referers to my site. I want to store the domain name of the referer in a db

Re: [PHP] Global variables

2002-10-02 Thread Tom Rogers
Hi, Thursday, October 3, 2002, 6:06:52 AM, you wrote: AG Hello, AG how can I use global variables in my web portal? I have read the php AG documentation, but it works only in the same file. AG I want use more global variable on many php site. AG For example: AG In login.php I use the code AG

[PHP] Incrementing the value

2002-10-02 Thread Uma Shankari T.
Hello , a href=Delay.php?hid=?php echo $hid+1; ?img src=Gif/nextque.gif border=0/a While clicking this link the $hid value get incremented and fetch the value from the database according to that..the same thing is working in linux platform and it is not working for the windows

Re: [PHP] Incrementing the value

2002-10-02 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, I've helped you as far as I can without actually seeing the rest of the script to check if that value gets overridden somewhere else. - From the sample you are giving us everything looks ok *if* register_globals is on(and you say that it is).

[PHP] How do you strip Header Info from displaying on your browser?

2002-10-02 Thread Phil Powell
If you go to http://valsignalandet.com/feedback.php you can get a clearer indication of what I am trying to get rid of. Following is my function using to produce the stuff up there, which I don't want, instead, I either want cookie-driven information or nothing (if no cookie is set):

[PHP] using fopen() to download remote files

2002-10-02 Thread Rusty Small
I have written a script in which the main purpose is to download html pages from multiple web servers. I'm using the fopen() function to download these pages. I would like to be able to download only the source (text) and no binary data as this would greatly improve the speed of my script.

RE: [PHP] Trouble with understanding arrays

2002-10-02 Thread Andy Crain
It looks like your problem is simply in the debug line, where you echo print_r(array_values($TickersCurrent)); You shouldn't call array_values() before print_r(), since array_values generates an indexed array of only the values (quotes), not the keys (tickers), of the supplied array, essentially

[PHP] dba_open () help

2002-10-02 Thread Charlie
I am hoping someone can please help me. I belong to a large online game, which hosts several sub games. Each sub games has been assigned a certain amount of space with which to put up a website. The site itself is running with php enabled but mysql is limited for security reasons. So I have

[PHP] VERY NEWBIE php_* mod_* --with- question

2002-10-02 Thread Aleksandar
Hello List for the first time, I am very new to php but impressed from what i've seen so far. I managed to configure php w/ mysql and db2 do some selects, inserts ... What I am inerested in is what are all those mod_php* and php_* on the distribution's CDs e.g. if they are installed how do i

[PHP] RE: [PHP-INST] VERY NEWBIE php_* mod_* --with- question

2002-10-02 Thread Brian . Duke
Well, I'm not the best qualified to answer this question but here goes my best shot (Guru's watch me here make sure I don't screw this up). Starting with Apache. Apache does not actually process your *.php files. There is another engine that takes care of that called Zend. There are a couple

<    1   2