[PHP] security risk by using remote files with include(); ?

2006-03-23 Thread Merlin
Hi there, I am wondering if I am opening a potential security risk by including files on remote servers. I am doing an include ('http:/www.server.com/file.html') inside a php script of mine to seperate content from function. Content is produced by a friend of mine and I do not want to grant acc

Re: [PHP] Parents constructor

2006-03-23 Thread Pham Huu Le Quoc Phuc
I want to execute polymorphism. - Original Message - From: "Robert Cummings" <[EMAIL PROTECTED]> To: "Pham Huu Le Quoc Phuc" <[EMAIL PROTECTED]> Cc: "Peter Lauri" <[EMAIL PROTECTED]>; "PHP-General" Sent: Friday, March 24, 2006 2:01 PM Subject: Re: [PHP] Parents constructor > On Fri, 200

Re: [PHP] Parents constructor

2006-03-23 Thread Robert Cummings
On Fri, 2006-03-24 at 01:48, Pham Huu Le Quoc Phuc wrote: > In PHP, I can do the flowing code: What you mean to say is that in PHP5 and only in PHP5 can you use interfaces... and that would only be true if the following code were correct. > interface A > { > function Get(); > } > > class B ex

Re: [PHP] Parents constructor

2006-03-23 Thread Pham Huu Le Quoc Phuc
In PHP, I can do the flowing code: interface A { function Get(); } class B extends A { function Get() { echo "class B"; } } class C extends A { echo "class C"; } $a = new B(); $a->Get(); $a = new C(); $a->Get(); result: Class B Class C - Original Message - From: "R

Re: [PHP] Parents constructor

2006-03-23 Thread Robert Cummings
On Fri, 2006-03-24 at 00:40, Peter Lauri wrote: > Hi, > > I have a class B that extends class A. I want to call constructor of A > correctly, how to do that. This is how I tried: > > Class B extends A { > Function B($Bvariable) { > Parent::A($Bvariable); > } > > } > >

RE: [PHP] HTTPS with NuSOAP

2006-03-23 Thread Peter Lauri
[snip] > > 'account'=>'theaccountnumber', > > 'role internalId="theinternalid"'=>'')); Does that work to set the attribute? [/snip] You are correct, that does NOT work. I found out to use soapval instead. Thank you! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

[PHP] Parents constructor

2006-03-23 Thread Peter Lauri
Hi, I have a class B that extends class A. I want to call constructor of A correctly, how to do that. This is how I tried: Class B extends A { Function B($Bvariable) { Parent::A($Bvariable); } } Class A { Function A($Avariable) { Dostuff..

Re: [PHP] PHP and Connection: Close

2006-03-23 Thread Jon Anderson
Richard Lynch wrote: I *think* both client and server have to agree/support keep-alive, and both have to be ready for the other guy to close the connection even though they agreed in advance to keep-alive. So you can use keep-alive, and it can work nifty, but ya gotta be ready for the server/cli

Re: [PHP] PHP / Query trouble

2006-03-23 Thread PHP Mailer
Chris skrev: PHP Mailer wrote: Jay Blanchard skrev: [snip] User i am running is locally granted all in permission. Using reply =) [/snip] Use reply-all, that way if the person that was helping you is not there any more others can help. Echo the query statement out and see what it looks like.

Re: [PHP] PHP / Query trouble

2006-03-23 Thread Chris
PHP Mailer wrote: Jay Blanchard skrev: [snip] User i am running is locally granted all in permission. Using reply =) [/snip] Use reply-all, that way if the person that was helping you is not there any more others can help. Echo the query statement out and see what it looks like. Please post th

Re: [PHP] PHP / Query trouble

2006-03-23 Thread PHP Mailer
PHP Mailer skrev: Jay Blanchard skrev: [snip] User i am running is locally granted all in permission. Using reply =) [/snip] Use reply-all, that way if the person that was helping you is not there any more others can help. Echo the query statement out and see what it looks like. Please post tha

Re: [PHP] PHP / Query trouble

2006-03-23 Thread PHP Mailer
Jay Blanchard skrev: [snip] User i am running is locally granted all in permission. Using reply =) [/snip] Use reply-all, that way if the person that was helping you is not there any more others can help. Echo the query statement out and see what it looks like. Please post that to the list.

RE: [PHP] PHP / Query trouble

2006-03-23 Thread Jay Blanchard
[snip] User i am running is locally granted all in permission. Using reply =) [/snip] Use reply-all, that way if the person that was helping you is not there any more others can help. Echo the query statement out and see what it looks like. Please post that to the list. -- PHP General Mailing L

RE: [PHP] PHP / Query trouble

2006-03-23 Thread Jay Blanchard
[snip] [snip] $optimizeTableQuery = mysql_query("OPTIMIZE TABLE '".$tableName."'"); [/snip] Take the single quotes away from the table name. http://dev.mysql.com/doc/refman/4.1/en/optimize-table.html Make sure they are the right kind of tables. Trie

RE: [PHP] PHP / Query trouble

2006-03-23 Thread Jay Blanchard
[snip] > $optimizeTableQuery = mysql_query("OPTIMIZE TABLE > '".$tableName."'"); [/snip] Take the single quotes away from the table name. http://dev.mysql.com/doc/refman/4.1/en/optimize-table.html Make sure they are the right kind of tables. -- PHP General Mailing List (http://www.php.net/

Re: [PHP] Formatting a Time field

2006-03-23 Thread Richard Lynch
On Thu, March 23, 2006 5:51 pm, Todd Cary wrote: > I have a field, Start_Time, in a MySQL DB. Since it is not a > TimeStamp, I believe I cannot use date(), correct? > > I would like to format 09:00:00 to 9:00 AM. > > If I convert the 09:00:00 with the strtotime(), I get a couple of > extra minutes

RE: [PHP] Why does this work on one server, but not another?

2006-03-23 Thread Richard Lynch
On Thu, March 23, 2006 7:02 pm, Chrome wrote: > Another thought: What type of field are you using for this storage? Another thought he'll have to face eventually, on this insane path of JPEG in database storage: What size buffer does PHP <-> MySQL have? If your JPEG is too big, ka-boom. Actuall

RE: [PHP] PHP / Query trouble

2006-03-23 Thread Jay Blanchard
[snip] #--> If submitted if($_GET['method']=="optimize") { #--> Set to array $allTables = mysql_query("SHOW TABLES"); if(!$query){ print mysql_error(); } while($table = mysql_fetch_assoc($allTables)) #for($i = 0; $tableName = mysql_fetch_array($allTables);) { #--> Walk that array foreach($table as

RE: [PHP] Why does this work on one server, but not another?

2006-03-23 Thread Richard Lynch
On Thu, March 23, 2006 6:42 pm, tedd wrote: > Hi gang: > > Okay, another update: > > I tried all sorts of combinations of assorted functions as well as > reading every source I could find. I won't bore you with the details > -- but, this is as far as I've gotten. > > For storing an image into MySQL

Re: [PHP] Advice updating MS Access data to remote MySQL host that only allowslocal access

2006-03-23 Thread Robert Cummings
On Thu, 2006-03-23 at 21:30, Richard Lynch wrote: > Are you using http://php.net/fgetcsv > > Cuz if you're not, you're gonna go nuts trying to work out the CSV > minutia > > I think CSV musta been invented by Microsoft. It's got that MS feel > to it... Taint anyways... http://support.microsoft

[PHP] PHP / Query trouble

2006-03-23 Thread PHP Mailer
Hello folks, Trying to grab all tables available in a database and optimize them. The following code , or rather query is being trouble-some and i am out of ideas. #--> If submitted if($_GET['method']=="optimize") { #--> Set to array $allTables = mysql_query("SHOW TABLES"); if(!$query){ print

Re: [PHP] Howto Execute PHP as script owner/group without CGI?

2006-03-23 Thread Richard Lynch
On Wed, March 22, 2006 1:21 am, Mathijs wrote: > I Want to know if it is possible to execute PHP(5) as the owner/group > of > the script it self. > > At the moment saved files get owner and group nobody. > When i upload through ftp, it gets the normal owner and group nobody. > > Is there a way that

Re: [PHP] HTTPS with NuSOAP

2006-03-23 Thread Richard Lynch
On Wed, March 22, 2006 1:41 am, Peter Lauri wrote: > I am trying to use a Web Service on the following endpoint > https://webservices.netsuite.com/wsdl/v1_3_1/netsuite.wsdl. As seen in > the > url, it is under HTTPS. I have compiled PHP with CURL and verified > that CURL > is working. In the docume

Re: [PHP] Advice updating MS Access data to remote MySQL host that only allowslocal access

2006-03-23 Thread Richard Lynch
Are you using http://php.net/fgetcsv Cuz if you're not, you're gonna go nuts trying to work out the CSV minutia I think CSV musta been invented by Microsoft. It's got that MS feel to it... On Tue, March 21, 2006 4:19 pm, Brian Anderson wrote: > The only other thing that I can think to do is t

Re: [PHP] Advice updating MS Access data to remote MySQL host that only allowslocal access

2006-03-23 Thread Richard Lynch
You don't. You run PHP on the Windows box with the mdb file, and set up a way for the two boxes to talk to each other. Or you convince somebody somewhere just how bad MS-Access is and abandon it entirely :-) On Tue, March 21, 2006 4:05 pm, Brian Anderson wrote: > Yeah, I thought of that, but h

RE: [PHP] Advice updating MS Access data to remote MySQL host that only allowslocal access

2006-03-23 Thread Richard Lynch
There is, or used to be, an MS-Access MySQL synchronizer package "out there" Haven't seen it mentioned in years now, but maybe I just wasn't paying attention. Try searching for it: info.com/MS-Access MySQL synchronize On Tue, March 21, 2006 4:00 pm, Brady Mitchell wrote: >> -Original Messag

Re: [PHP] Is there a way to get multiple values for a single input in a form submission?

2006-03-23 Thread Richard Lynch
On Tue, March 21, 2006 4:44 pm, mslemko wrote: > this is what I am trying to do: > > On a web form I might have a select input with multiple selections > enabled, however I want to have access to the list within PHP after > submission. > > For PHP, use name='myselect[]' Then PHP turns it into an

Re: [PHP] PHP and Connection: Close

2006-03-23 Thread Richard Lynch
I *think* both client and server have to agree/support keep-alive, and both have to be ready for the other guy to close the connection even though they agreed in advance to keep-alive. So you can use keep-alive, and it can work nifty, but ya gotta be ready for the server/client to claim to support

Re: [PHP] PHP and Connection: Close

2006-03-23 Thread Richard Lynch
httpd.conf search for Keep-alive Some old old old browsers will puke on it, though, I think... We're talking like Netscape 2.0 though, as I recall... I got swiss-cheese memory, so better double-check that. :-) On Tue, March 21, 2006 5:16 pm, Jon Anderson wrote: > I've been looking at a proble

Re: [PHP] PHP 4.3.11, question about classes

2006-03-23 Thread Richard Lynch
On Wed, March 22, 2006 5:27 am, Michael Hulse wrote: > I am just learning about classes. > > My server is running PHP 4.3.11 > > Example code: > > class testing { > var $what; > } > > $linkGenClass = new testing(); > $linkGenClass->what = 'hi'; > echo $linkGenClass->what; > > Why does the con

Re: [PHP] Reading data from SELECT in PHP

2006-03-23 Thread Richard Lynch
On Wed, March 22, 2006 6:00 am, Lorca wrote: > Hello friends, > I've create a form containing a SELECT under JavaScript, where the > user > decide all list's elements. > > My problem is how can I get all list's elements on PHP. Using $-POST[] > I > only get the selected option. > > With my most sin

Re: [PHP] Creating a Window without JavaScript that is on top

2006-03-23 Thread Richard Lynch
On Wed, March 22, 2006 1:23 pm, Todd Cary wrote: > Is there a way to create a Window that is like the Help or Popup > type windows one can create with JavaScript? > > I have an event calendar and I want the link for the event to go > to a PHP page, but I want the page to be on top and have focus >

Re: [PHP] pulling in template file in var and populating vars?

2006-03-23 Thread Richard Lynch
On Wed, March 22, 2006 3:02 pm, blackwater dev wrote: > I have a chunk of html data that I want to output for each iteration > through > a db result > > while($result){ > >$list.=file_get_contents("my_template_file.php"); > > } > return $list; > > The template file looks like this: > > >

Re: [PHP] Formatting a Time field

2006-03-23 Thread Tom Rogers
Hi, Friday, March 24, 2006, 9:51:48 AM, you wrote: TC> I have a field, Start_Time, in a MySQL DB. Since it is not a TC> TimeStamp, I believe I cannot use date(), correct? TC> I would like to format 09:00:00 to 9:00 AM. TC> If I convert the 09:00:00 with the strtotime(), I get a couple of TC>

Re: [PHP] GD Library or PHP Function

2006-03-23 Thread Richard Lynch
On Wed, March 22, 2006 9:18 pm, brian dichiara wrote: > Is there a way to check to see if a JPEG or PDF is color or > black/white? > Like a function or something? There does not appear to be a built-in function that does that... However, this hack should work: function image_is_color($image){

RE: [PHP] Why does this work on one server, but not another?

2006-03-23 Thread Chrome
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ NOD32 1.1456 (20060323) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mail link problem with php echo statement

2006-03-23 Thread Richard Lynch
On Wed, March 22, 2006 10:29 pm, Mark wrote: > > How can i make this email from a database a hyperlink so it doesnt > show the > email address--i have tried many things but i keep getting errors. At > the > moment it just shows the email (no link) > thanks > > > > //get comp_id > $query = mysq

Re: [PHP] Atrributes and NuSOAP

2006-03-23 Thread Richard Lynch
Save yourself a ton of grief and upgrade to PHP5 + SOAP... :-^ On Thu, March 23, 2006 1:23 am, Peter Lauri wrote: > Hi, > > I have been trying to find a simple example of how to add attributes > to the > requests, but after two days search I can not find an example. The > $param is > easy to creat

RE: [PHP] Why does this work on one server, but not another?

2006-03-23 Thread tedd
Hi gang: Okay, another update: I tried all sorts of combinations of assorted functions as well as reading every source I could find. I won't bore you with the details -- but, this is as far as I've gotten. For storing an image into MySQL I simply used: $image_large = mysql_real_escape_strin

Re: [PHP] undefined function error with lost password script

2006-03-23 Thread Richard Lynch
In incredibly ancient versions of PHP, you needed to have the: function foo () { ... }; appear BEFORE you called it. GOOD: function foo () { return 'foo'}; foo(); BAD: foo(); function foo() { return 'foo'}; It's remotely possible that you need to upgrade in a big way. You can do a quick hack

Re: [PHP] Switching to UTF-8. Need help.

2006-03-23 Thread Richard Lynch
Check the HEADERS your web-server is sending. If they don't have Charset UTF-8 in there, it won't work on REAL browsers (Mozilla based) Then, for reasons known only to Microsoft, you have to use a META tag to define the Charset for IE. MS will *ignore* the headers in favor of a heuristic whereby

Re: [PHP] help with smarty+cms

2006-03-23 Thread Richard Lynch
On Thu, March 23, 2006 11:28 am, ganu wrote: > Hello all, > > I worked with one site and now is working fine with smarty. > Now I want to implement the CMS in that, > I went thru the link http://smarty.php.net/resources.php?category=2 > > now I want a CMS so my existing site looks as it is and with

Re: [PHP] Why does this work on one server, but not another?

2006-03-23 Thread Richard Lynch
You're putting RAW data into MySQL, and not escaping it. That's a really Bad Idea. You should probably be using http://php.net/mysql_real_escape_string on the JPEG before you try to cram it into MySQL. If that still fails, you could http://php.net/base64 encode it or something similar to get it

Re: [PHP] switching between admin areas on two domeins with one login?

2006-03-23 Thread Richard Lynch
On Thu, March 23, 2006 2:58 pm, Warren Vail wrote: > I think the key to your problem is finding a way that the two domains > can > share information, do these domains have access to the same physical > disk > space, or a common database? You can use the your own save handler > routines to give the

Re: [PHP] switching between admin areas on two domeins with one login?

2006-03-23 Thread Richard Lynch
On Thu, March 23, 2006 2:34 pm, [EMAIL PROTECTED] wrote: > have two domains and each domain has it's own admin registered areas. > Have > to allow people who registered to change domains and areas without > login > again? > On reg. areas, after login, create sess_id to check if visitor is > logged

[PHP] Formatting a Time field

2006-03-23 Thread Todd Cary
I have a field, Start_Time, in a MySQL DB. Since it is not a TimeStamp, I believe I cannot use date(), correct? I would like to format 09:00:00 to 9:00 AM. If I convert the 09:00:00 with the strtotime(), I get a couple of extra minutes added. Suggestions are welcomed Todd -- PHP Gener

Re: [PHP] switching between admin areas on two domeins with one login?

2006-03-23 Thread Chris
[EMAIL PROTECTED] wrote: Hi to all, have two domains and each domain has it's own admin registered areas. Have to allow people who registered to change domains and areas without login again? On reg. areas, after login, create sess_id to check if visitor is logged in, but sess_ids on domains are d

Re: [PHP] Switching to UTF-8. Need help.

2006-03-23 Thread Rasmus Lerdorf
Andy wrote: Hi to all, We are developing a multilanguage application, and slowly it seems that the Latin1(ISO 5589 1) encoding is not enough. I tried simply to convert the database and the encoding of the php to UTF-8, but I'm getting some problems. If I make an echo 'möbel, Belgien' the brow

Re: [PHP] switching between admin areas on two domeins with one login?

2006-03-23 Thread Warren Vail
I think the key to your problem is finding a way that the two domains can share information, do these domains have access to the same physical disk space, or a common database? You can use the your own save handler routines to give them both access to the same area (database may work the best)

RE: [PHP] Help?

2006-03-23 Thread Richard Lynch
On Thu, March 23, 2006 2:19 pm, Clinton, Rochelle A wrote: > Hi Richard, > > WOW! Thanks for such a quick response - this is just driving me > crazy! Not to mention consuming my time. > > I actually had been using the $line = in front of my replace attempts. > > Here is the exact offending

[PHP] switching between admin areas on two domeins with one login?

2006-03-23 Thread afan
Hi to all, have two domains and each domain has it's own admin registered areas. Have to allow people who registered to change domains and areas without login again? On reg. areas, after login, create sess_id to check if visitor is logged in, but sess_ids on domains are different and can't compare

Re: [PHP] Help?

2006-03-23 Thread Richard Lynch
On Thu, March 23, 2006 1:50 pm, Clinton, Rochelle A wrote: > I am fairly new to PHP and am having an (SILLY) issue that I cannot > seem > to resolve: > > I am pulling data from an html file and some of the lines of text that > I > need start with "". Show us an actual line, copy/paste, to be sure

Re: [PHP] Help?

2006-03-23 Thread John Nichel
Clinton, Rochelle A wrote: Hello, I am fairly new to PHP and am having an (SILLY) issue that I cannot seem to resolve: I am pulling data from an html file and some of the lines of text that I need start with "". I cannot seem to get rid of that tag!!! I have tried: * str_re

[PHP] Help?

2006-03-23 Thread Clinton, Rochelle A
Hello, I am fairly new to PHP and am having an (SILLY) issue that I cannot seem to resolve: I am pulling data from an html file and some of the lines of text that I need start with "". I cannot seem to get rid of that tag!!! I have tried: * str_replace("<\a>", "", $line) *

Re: [PHP] Is there a way to get multiple values for a singleinput in a form submission?

2006-03-23 Thread sgsweb
Hi Mark, Actually you can access this variable within Javascript in the following manner: function chgablacted() { box = regs['myselect[]']; value = box.options[box.selectedIndex].value; if (value == 'some value') { ... } else { ... } } The name of the variable will include the br

RE: [PHP] Why does this work on one server, but not another?

2006-03-23 Thread tedd
Hi gang: Another update. The detect magic_quotes_gpc ON and then either do, or don't do, addslashes() thing (see below) provided kindly by Dave doesn't work. function myslashes($data) { return (get_magic_quotes_gpc() == 1) ? $data : addslashes($data); } On both of the servers, the magic_gp

RE: [PHP] Why does this work on one server, but not another?

2006-03-23 Thread Weber Sites LTD
As you can see in this article : http://www.weberdev.com/ViewArticle-3.html $mysqlPicture = addslashes(fread(fopen($Picture, "r"), $PSize)); Then you insert $mysqlPicture. If your settings prevent automatic slashes by PHP then this will Give the problem you see.. berber -Original Message-

Re: [PHP] Is there a way to get multiple values for a singleinput in a form submission?

2006-03-23 Thread mslemko
Thanks Warren, This works! The side effect that is -somewhat- undesirable is that it becomes incompatible accessing the field with Javascript. Perhaps there is a way to get around that problem though. -Mark Warren Vail wrote: Set the name of your field in html to be; name="myselect[]" th

RE: [PHP] Why does this work on one server, but not another?

2006-03-23 Thread tedd
Hi gang: Update: Both servers state: enable-magic_quotes One sever states (this is the one that fails): magic_quotes_gpc ON magic_quotes_runtime ON The other sever states (this is the one that works): magic_quotes_gpc ON magic_quotes_runtime OFF However, I am using addslashes() -- should I

Re: [PHP] Why does this work on one server, but not another?

2006-03-23 Thread Michael Crute
On 3/23/06, tedd <[EMAIL PROTECTED]> wrote: > >Are you escaping the image string before you insert it? > > Aaahh, no ?? Why is it going to attack me? > > But seriously, it works on one server, why not the other? > > On the other hand, it appears to object to > something within the string -- so that

RE: [PHP] Why does this work on one server, but not another?

2006-03-23 Thread tedd
Are you escaping the image string before you insert it? berber berber: Aaahh, no ?? Why is it going to attack me? But seriously, it works on one server, why not the other? On the other hand, it appears to object to something within the string -- so that might be the problem. Please forgive

RE: [PHP] Why does this work on one server, but not another?

2006-03-23 Thread Bobby Matthis
I'm far from an expert: But maybe one Server has magic quotes on and the other does not. One automatically escapes all the characters for you in the data string and the other does not? Bobby -Original Message- From: Weber Sites LTD [mailto:[EMAIL PROTECTED] Sent: Thursday, March 23, 20

RE: [PHP] Why does this work on one server, but not another?

2006-03-23 Thread Weber Sites LTD
Are you escaping the image string before you insert it? berber -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Thursday, March 23, 2006 7:48 PM To: php-general@lists.php.net Subject: [PHP] Why does this work on one server, but not another? Hi gang: I posted this question

[PHP] Why does this work on one server, but not another?

2006-03-23 Thread tedd
Hi gang: I posted this question to a MySQL list, but apparently it stumped them. So, I'll ask here: On one server, the following code works without any problems whatsoever: --- quote --- $sqlString = "INSERT INTO $dbtable (id, image_type, image_large, image_small, image_width, image_height

[PHP] help with smarty+cms

2006-03-23 Thread ganu
Hello all, I worked with one site and now is working fine with smarty. Now I want to implement the CMS in that, I went thru the link http://smarty.php.net/resources.php?category=2 now I want a CMS so my existing site looks as it is and with some or lot of changes I can implement CMS in that. som

Re: [PHP] Switching to UTF-8. Need help.

2006-03-23 Thread Jochem Maas
Andy wrote: Hi to all, We are developing a multilanguage application, and slowly it seems that the Latin1(ISO 5589 1) encoding is not enough. I tried simply to convert the database and the encoding of the php to UTF-8, but I'm getting some problems. If I make an echo 'möbel, Belgien' the brow

[PHP] Can't get rid of escaped quote (solved, but...)

2006-03-23 Thread Arno Kuhl
Solved (see bottom of message) but surely there's a better solution? Sorry for this looong explanation, but I've been tearing my hair out with this problem... I use php 4.3.4 and ADOdb 4.64, developing on Win2000. I've got magic_quotes_gpc switched off explicitly in htaccess, and I checked phpi

[PHP] Switching to UTF-8. Need help.

2006-03-23 Thread Andy
Hi to all, We are developing a multilanguage application, and slowly it seems that the Latin1(ISO 5589 1) encoding is not enough. I tried simply to convert the database and the encoding of the php to UTF-8, but I'm getting some problems. If I make an echo 'möbel, Belgien' the browser does no

Re: [PHP] Letters in Loops

2006-03-23 Thread John Nichel
phpninja wrote: Hello, for($i=A;$i<=Z;$i++) { if ($i == "ZZ") { break; } echo "$i"; } regards, phpninja While this may work (I didn't test it), it's a hack and might produce unexpected results (assuming you meant to quote the strings). PHP will, "Translate strings and resources to numbe

Re: [PHP] Letters in Loops

2006-03-23 Thread Jochem Maas
Ben Miller wrote: In trying to make an alpha list, using the following: for($i=A;$i<=Z;$i++) { ^ not a string technically! see what happens when you turn up error reporting to full (E_ALL). echo "$i"; } rather than using a loop to generate (as others have shown

RE: [PHP] Letters in Loops

2006-03-23 Thread Ford, Mike
> -Original Message- > From: Ben Miller [mailto:[EMAIL PROTECTED] > Sent: 23 March 2006 15:08 > To: php-general@lists.php.net > Subject: [PHP] Letters in Loops > > > In trying to make an alpha list, using the following: > > for($i=A;$i<=Z;$i++) { > echo "$i"; > } > > Produces: >

Re: [PHP] Letters in Loops

2006-03-23 Thread Evan Priestley
On Mar 23, 2006, at 10:08 AM, Ben Miller wrote: In trying to make an alpha list, using the following: for($i=A;$i<=Z;$i++) { echo "$i"; } Produces: A B C... X Y Z AA AB AC... AX AY AZ... all the way to YZ. What am I doing wrong that it's not stopping at just plain old "Z", witho

RE: [PHP] Letters in Loops

2006-03-23 Thread phpninja
Hello, for($i=A;$i<=Z;$i++) { if ($i == "ZZ") { break; } echo "$i"; } regards, phpninja -Original Message- From: Ben Miller [*mailto:[EMAIL PROTECTED] <[EMAIL PROTECTED]>] Sent: Thursday, March 23, 2006 7:08 AM To: php-general@lists.php.net Subject: [PHP] Letters in Loops In try

[PHP] Letters in Loops

2006-03-23 Thread Ben Miller
In trying to make an alpha list, using the following: for($i=A;$i<=Z;$i++) { echo "$i"; } Produces: A B C... X Y Z AA AB AC... AX AY AZ... all the way to YZ. What am I doing wrong that it's not stopping at just plain old "Z", without moving on to "AA" and continuing? -- PHP General Ma

[PHP] Better way to count bits set in an integer?

2006-03-23 Thread Jim McIntyre
Hi, Is there a better/more efficient way to determine how many bits are set in an integer than this? substr_count(base_convert($myValue, 10, 2), '1'); I'm using PHP 4. Thanks, Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] why is PEAR::DB constantly initting connection?

2006-03-23 Thread chris smith
On 3/23/06, joseph <[EMAIL PROTECTED]> wrote: > bonjour, > > why does my DB object always send INIT DB to mysql server? > > the problem caused by calls like the following -- very simple code, > really may be caused by my PEAR/DB.php wrapper functions (see > below) . evidence is my mysql quer

Re: [PHP] undefined function error with lost password script

2006-03-23 Thread Robin Vickery
On 23/03/06, Mark <[EMAIL PROTECTED]> wrote: > Can anyone see a problem with this at a glance. I think i have pushed my > luck with this forum ( inc. Chris)of late but i paid a lot of money for this > script and it has a few bugs. > > THis is what i get returned--- > Fatal error: Call to undefined

Re: [PHP] Re: session vars

2006-03-23 Thread John Wells
U, is your top.php code being printed AT ALL? Because in the code you gave us, you're attempting to include "topo.php". HTH, John On 3/21/06, João Cândido de Souza Neto <[EMAIL PROTECTED]> wrote: > tedd wrote: > > > Hi: > > > > I hate this. > > > >>Ok guy, don't fight with me. hehehe > >> > >

[PHP] why is PEAR::DB constantly initting connection?

2006-03-23 Thread joseph
bonjour, why does my DB object always send INIT DB to mysql server? i am using PHP 5.0.5 and * @versionRelease: 1.7.5 * @link http://pear.php.net/package/DB */ the problem caused by calls like the following -- very simple code, really may be caused by my PEAR/DB.php wrapper f

Re: [PHP] Atrributes and NuSOAP

2006-03-23 Thread chris smith
On 3/23/06, Peter Lauri <[EMAIL PROTECTED]> wrote: > Hi, > > I have been trying to find a simple example of how to add attributes to the > requests, but after two days search I can not find an example. The $param is > easy to create if it does not contain any attributes. This is what I want to > cr

[PHP] GD Library or PHP Function

2006-03-23 Thread brian dichiara
Is there a way to check to see if a JPEG or PDF is color or black/white? Like a function or something? Thanks for any help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Creating a Window without JavaScript that is on top

2006-03-23 Thread brian dichiara
you could create a div that floats on top of everything, but you'll still need javascript to set its position and to hide/unhide it. as far as I know, you need javascript to do it. _Brian. Todd Cary wrote: Is there a way to create a Window that is like the Help or Popup type windows one can c

Re: [PHP] pulling in template file in var and populating vars?

2006-03-23 Thread Kevin Waterson
This one time, at band camp, clive <[EMAIL PROTECTED]> wrote: > You could also look at using a templating engine like Smarty for instance. BHAHAHAHAHAHAHAAA 1000 lines of code for "hello world" -- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed l

[PHP] Re: undefined function error with lost password script

2006-03-23 Thread Barry
Mark wrote: Can anyone see a problem with this at a glance. I think i have pushed my luck with this forum ( inc. Chris)of late but i paid a lot of money for this script and it has a few bugs. THis is what i get returned--- Fatal error: Call to undefined function: recover_pw() in /home/realt90