[PHP] strcmp($var1, $var2) versus if ($var1 $var2)

2008-05-28 Thread C.R.Vegelin
Hi All, I must be overlooking something here ... $var1 = 01011090; $var2 = 010190; // 2 strings if ($var1 $var2) ECHO var1 var2; else ECHO var1 = var2; echo br /; $r = strcmp ( $var1 , $var2 ); if ($r 0) ECHO var1 var2, br /; 2nd line says: $var1 = $var2 4th line says: $var1 $var2 TIA,

Re: [PHP] strcmp($var1, $var2) versus if ($var1 $var2)

2008-05-28 Thread C.R.Vegelin
- Original Message - From: David Otton [EMAIL PROTECTED] To: C.R.Vegelin [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] php-general@lists.php.net Sent: Wednesday, May 28, 2008 12:11 PM Subject: Re: [PHP] strcmp($var1, $var2) versus if ($var1 $var2) 2008/5/28 C.R.Vegelin [EMAIL PROTECTED

Re: [PHP] More than one values returned?

2008-02-18 Thread C.R.Vegelin
?php $in = 4; calcpows($in, $pow2, $pow4); echo in = $in pow2=$pow2 pow4=$pow4; // define return fields as $... function calcpows($in, $pow2, $pow4) { $pow2 = $in * $in; $pow4 = $pow2 * $pow2; } ? HTH - Original Message - From: Teck [EMAIL PROTECTED] To: php-general@lists.php.net

Re: [PHP] PHP Source code protection

2008-02-06 Thread C.R.Vegelin
See also: http://www.ioncube.com/ - Original Message - From: Bastien Koert [EMAIL PROTECTED] To: Zoran Bogdanov [EMAIL PROTECTED]; php-general@lists.php.net Sent: Wednesday, February 06, 2008 2:27 PM Subject: RE: [PHP] PHP Source code protection zend encoder?

Re: [PHP] Array numeric key - alpha key replacement

2007-12-05 Thread C.R.Vegelin
- Original Message - From: [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Wednesday, December 05, 2007 1:00 PM Subject: [PHP] Array numeric key - alpha key replacement Hello All, Is the a built-in PHP call that I am overlooking which lets me replace key values in an

Re: [PHP] Transfer query result to another script

2007-11-02 Thread C.R.Vegelin
- Original Message - From: Jochem Maas [EMAIL PROTECTED] To: C.R.Vegelin [EMAIL PROTECTED] Cc: David Giragosian [EMAIL PROTECTED]; php-general php-general@lists.php.net Sent: Friday, November 02, 2007 10:41 AM Subject: Re: [PHP] Transfer query result to another script C.R.Vegelin

Re: [PHP] Transfer query result to another script

2007-11-02 Thread C.R.Vegelin
for your advice. Regards, Cor - Original Message - From: David Giragosian To: C.R.Vegelin ; php-general Sent: Thursday, November 01, 2007 5:23 PM Subject: Re: [PHP] Transfer query result to another script On 11/1/07, C.R.Vegelin [EMAIL PROTECTED] wrote: Hi All, Q

Re: [PHP] Transfer query result to another script

2007-11-02 Thread C.R.Vegelin
- Original Message - From: Jochem Maas [EMAIL PROTECTED] To: C.R.Vegelin [EMAIL PROTECTED] Cc: David Giragosian [EMAIL PROTECTED]; php-general php-general@lists.php.net Sent: Friday, November 02, 2007 9:06 AM Subject: Re: [PHP] Transfer query result to another script C.R.Vegelin

[PHP] Transfer query result to another script

2007-11-01 Thread C.R.Vegelin
Hi All, Q: Is it possible to transfer a query result to another script ? For example with (fragments of) the following 2 scripts: Engine.php $result = mysqli_query($connect, $myquery); if (!$result) error ... if (mysqli_num_rows($result) == 0) error ... $_SESSION['result'] =

Re: [PHP] how to restart php

2007-10-25 Thread C.R.Vegelin
Hi Diana, To restart the IIS webserver with Windows XP: press Start, select Run, type IISreset HTH, Cor - Original Message - From: Richard Heyes [EMAIL PROTECTED] To: Diana [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Thursday, October 25, 2007 1:02 PM Subject: Re: [PHP] how

[PHP] highlighting searchterms as bold text

2007-09-20 Thread C.R.Vegelin
Hi everyone, I want to highlight (bold) searchterms in text. For example, for all words starting with ethyl: a) replace ethyl by bethyl/b b) replace Ethyl by bEthyl/b c) replace ethylene by bethylene/b d) but not methyl by bmethyl/b Now I use: $patterns[0] = /ethyl/; $replacements[0] = bethyl/b;

Re: [PHP] highlighting searchterms as bold text

2007-09-20 Thread C.R.Vegelin
- Original Message - From: Deniz Dizman (BST UGB) [EMAIL PROTECTED] To: C.R.Vegelin [EMAIL PROTECTED]; [EMAIL PROTECTED] php-general@lists.php.net Sent: Thursday, September 20, 2007 10:38 AM Subject: RE: [PHP] highlighting searchterms as bold text try /^ethyl/i what you want

Re: [PHP] highlighting searchterms as bold text

2007-09-20 Thread C.R.Vegelin
- Original Message - From: Deniz Dizman (BST UGB) [EMAIL PROTECTED] To: C.R.Vegelin [EMAIL PROTECTED]; [EMAIL PROTECTED] php-general@lists.php.net Sent: Thursday, September 20, 2007 11:29 AM Subject: RE: [PHP] highlighting searchterms as bold text thats odd because the regex passes

Re: [PHP] highlighting searchterms as bold text

2007-09-20 Thread C.R.Vegelin
- Original Message - From: Deniz Dizman (BST UGB) [EMAIL PROTECTED] To: C.R.Vegelin [EMAIL PROTECTED]; [EMAIL PROTECTED] php-general@lists.php.net Sent: Thursday, September 20, 2007 12:25 PM Subject: RE: [PHP] highlighting searchterms as bold text you probably have some characters

Re: [PHP] highlighting searchterms as bold text

2007-09-20 Thread C.R.Vegelin
bMeThYl/b dolor bEthylene/b sit Hope it helps, PuYa C.R.Vegelin wrote: - Original Message - From: Deniz Dizman (BST UGB) [EMAIL PROTECTED] To: C.R.Vegelin [EMAIL PROTECTED]; [EMAIL PROTECTED] php-general@lists.php.net Sent: Thursday, September 20, 2007 11:29 AM Subject: RE: [PHP

[PHP] javascript in head or in body ?

2007-08-07 Thread C.R.Vegelin
Are there any rules when to include javascript in head or in body ? For example, script type=text/javascript function reload(form) { var val=form.Chapter.options[form.Chapter.options.selectedIndex].value; self.location='QueryForm.php?Chapter=' + val ; } /script TIA, Cor

[PHP] Comment modes behavior in HTML and PHP

2007-07-28 Thread C.R.Vegelin
I have a PHP script, as follows: !-- ?php echo should this be echoed ?; ? -- As expected, the browser shows nothing, but when I view Source in the browser, I see: !-- start HTML comment should this be echoed ?-- Shouldn't it be just: !-- --, without the echo result ? I don't

Re: [PHP] Comment modes behavior in HTML and PHP

2007-07-28 Thread C.R.Vegelin
behavior in HTML and PHP On 7/28/07, Paul Novitski [EMAIL PROTECTED] wrote: At 7/28/2007 07:40 AM, C.R.Vegelin wrote: I have a PHP script, as follows: !-- ?php echo should this be echoed ?; ? -- As expected, the browser shows nothing, but when I view Source in the browser, I see

Re: [PHP] repetition of tedious references

2007-07-18 Thread C.R.Vegelin
Hi OLav, what about this ? $language = isused($_SERVER[HTTP_ACCEPT_LANGUAGE]); echo language is . $language; function isused($variable) { return isset($variable) $variable != ? $variable : *; } HTH, Cor - Original Message - From: Olav Mørkrid [EMAIL PROTECTED] To: PHP General

[PHP] Dynamic refresh dropdown list

2007-07-17 Thread C.R.Vegelin
I have a selection form with multiple dropdown lists, let's say A, B and C. If the dropdown list B is changed, then dropdown list C should be updated. To get this done, I use a small javascript function reload(form) { var val=form.B.options[form.B.options.selectedIndex].value;

[PHP] How to pass connection as global variable ?

2007-07-11 Thread C.R.Vegelin
I have various PHP scripts that use the same database. The startup script default.php sets the connection once for all the scripts. This connection is set in $_SESSION to make it a global variable for all scripts. When switching from page default to page faq, I get errors I can't explain. Any

Re: [PHP] How to pass connection as global variable ?

2007-07-11 Thread C.R.Vegelin
- Original Message - From: Chris [EMAIL PROTECTED] To: C.R.Vegelin [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] php-general@lists.php.net Sent: Wednesday, July 11, 2007 8:56 AM Subject: Re: [PHP] How to pass connection as global variable ? C.R.Vegelin wrote: I have various PHP scripts

Re: [PHP] How to pass connection as global variable ?

2007-07-11 Thread C.R.Vegelin
C.R.Vegelin wrote: I have various PHP scripts that use the same database. The startup script default.php sets the connection once for all the scripts. This connection is set in $_SESSION to make it a global variable for all scripts. When switching from page default to page faq, I get errors I

Re: [PHP] How to pass connection as global variable ?

2007-07-11 Thread C.R.Vegelin
Thanks M. Sokolewicz for explaining the under water basics ... Cor - Original Message - From: M. Sokolewicz [EMAIL PROTECTED] To: C.R.Vegelin [EMAIL PROTECTED] Cc: Chris [EMAIL PROTECTED]; [EMAIL PROTECTED] php-general@lists.php.net Sent: Wednesday, July 11, 2007 9:56 AM Subject: Re

Re: [PHP] undefined GD function [SOLVED]

2007-06-06 Thread C.R.Vegelin
Thanks for your advice, As mentioned, I am using IIS 5.1 and .. the problem was solved after restarting my machine. BTW, IIS can also restarted with iisreset. Regards, Cor - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: C.R.Vegelin [EMAIL PROTECTED] Cc: [EMAIL

[PHP] undefined GD function

2007-06-04 Thread C.R.Vegelin
Hi All, I am testing some GD functions, but I'm getting undefined function errors. I checked php.ini and changed ;extension=php_gd2.dll to extension=php_gd2.dll The php.ini file contains: extension_dir = c:/php/ext and this directory does contain php_gd2.dll (version 5.2.0.0) I am using Windows

Re: [PHP] getting $_ENV variables

2007-05-10 Thread C.R.Vegelin
Brown To: C.R.Vegelin Cc: [EMAIL PROTECTED] Sent: Wednesday, May 09, 2007 5:26 PM Subject: Re: [PHP] getting $_ENV variables When I print_r($_ENV); from the CLI on 5.0.4 I get a bunch of results, no problem but no $_ENV['OS'] variable. Further, when I check my phpinfo

Re: [PHP] getting $_ENV variables

2007-05-10 Thread C.R.Vegelin
Daniel, I did get the result via the web / IE with the address: http://127.0.0.1/test/ENVtest.php with ENVtest.php having: ?php print_r($_ENV); ? using Windows XP, PHP 5.2.0 - Original Message - From: Daniel Brown To: C.R.Vegelin Cc: [EMAIL PROTECTED] Sent: Thursday, May 10

Re: [PHP] getting $_ENV variables

2007-05-10 Thread C.R.Vegelin
Yes, my PHPinfo shows under configuration: variables_order = GPCS I will test EGPCS setting in php.ini But that also means that code using $_ENV cannot be run with hosts hiding the environment settings ?! And I assume that EGPCS will also affect: ?php print_r($_FILES); ? Now with GPCS this

Re: [PHP] getting $_ENV variables

2007-05-10 Thread C.R.Vegelin
variables C.R.Vegelin wrote: Yes, my PHPinfo shows under configuration: variables_order = GPCS I will test EGPCS setting in php.ini But that also means that code using $_ENV cannot be run with hosts hiding the environment settings ?! Correct. Sucks I know, but some hosts just do this. And I

[PHP] scrolling HTML tables

2007-05-10 Thread C.R.Vegelin
I hope it's not the wrong place to ask, but has anyone experience with scrolling HTML tables ? According http://www.w3schools.com/tags/tag_thead.asp The thead, tfoot and tbody elements enable you to group rows in a table. When you create a table, you might want to have a header row, some rows

[PHP] getting $_ENV variables

2007-05-09 Thread C.R.Vegelin
Hi All, I get nothing when using: echo $_ENV['OS']; Also nothing when using: print_r($_ENV); However, phpinfo(); show a full list of ENV settings. How to get $_ENV variables ? I am using PHP version 5.2.0. TIA, Cor