[PHP] exploding values into new variables

2002-10-28 Thread Petre Agenbag
Hi
The manual states:

$pizza = "piece1 piece2 piece3 piece4 piece5 piece6";
$pieces = explode(" ", $pizza);

So, if I want to be able to echo piece1 to the screen at a later stage,
I would go:

echo $pieces[0];

or 
$first_piece = $pieces[0];
echo $first_piece;

Right?

Just want to make sure I understand it before I try to use it...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] error connecting to oracle.

2002-10-28 Thread Subodh Gupta

Hi all,

I get the following error while trying to connect to oracle.  Please help
me.

Fatal error:  Call to undefined function:  ora_logon() in c:\program
files\apache group\apache\htdocs\one.php on line 5

Subodh Gupta
Tata Consultancy Services.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: exploding values into new variables

2002-10-28 Thread Erwin
Petre Agenbag wrote:
> Hi
> The manual states:
> 
> $pizza = "piece1 piece2 piece3 piece4 piece5 piece6";
> $pieces = explode(" ", $pizza);
> 
> So, if I want to be able to echo piece1 to the screen at a later
> stage, I would go:
> 
> echo $pieces[0];
> 
> or
> $first_piece = $pieces[0];
> echo $first_piece;
> 
> Right?

Right!

Grtz Erwin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] general

2002-10-28 Thread Jon Haworth
Hi Shaun,

> How do you refresh a php page , from within your code.

click here to refresh :-)

You can't directly refresh a page with PHP (you can use Javascript though,
or a meta refresh tag). 

> How do i test if a browser supports cookies or not?

You asked this a couple of days ago, so I'll copy and paste the answer:

> > how can i test if a browser supports cookies 
> Try and set one on page A, and then read it on page B. 
> If it's not there, the browser doesn't support cookies.

Shout if that's not clear. 

> When i post a form and i push back , there is an page has 
> expired message - why does it happen + what does it mean?

It happens because the page that you're going back to was the result of you
POSTing a form. The only way for your browser to get this page is to
resubmit all the POST data, and it won't do that unless you ask (by clicking
"Refresh").

If you don't want this to happen, use GET instead of POST for your form.

Cheers
Jon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] A newbie on Board!

2002-10-28 Thread Faisal Abdullah

You should probably check whether you environment variables are all set.
try phpinfo(), and see under Environment Variables.

Check for:
ORACLE_SID
ORACLE_HOME
LD_LIBRARY_PATH
ORACLE_TERM
ORA_NLS33

If they aren't there, you should set them up.

Regards,
Faisal

-Original Message-
From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
Sent: Monday, October 28, 2002 3:11 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] A newbie on Board!



Hi all,

thanks for the prompt reply.

The problem is not that I don't know how to use functions and all.  I tried
using various function.  But I get fatal error everytime I use some
function.  I think, some extensions (dll files are missing in my
installation of php.)  how can I figure this out?

Subodh Gupta





"Peter
Houchin" To: "Subodh Gupta"
<[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]<[EMAIL PROTECTED]>
.au> cc:
 Subject: RE: [PHP] A newbie on
Board!
28/10/2002
12:02 PM






jump along to php.net/manual/en and have a look in there and it will show
ya
how to connect to oracle ( I can't remember :D ) also check out
phpbuilder.com and phpbeginner.com they'll both have tutorials for
connecting to oracle from memory :)

Cheers

> -Original Message-
> From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
> Sent: Monday, 28 October 2002 5:18 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] A newbie on Board!
>
>
> Hi,
>
> I have just started off myself to learn PHP.  I have installed PHP 4.2.3
> and Apache 1.3.27.  I have built some sample pages which are running
> fine.   But now I want to integrate PHP with Oracle.  Can somebody help
me
> how to do it ?
>
> Subodh Gupta
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

__


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE: newbie: php/mysql

2002-10-28 Thread Tim Ward
the best way to do password validation is using one way encryption (e.g.
MySQL PASSWORD() function). That way you check the encrypted user entered
password against the database ...

" ... WHERE pass = PASSWORD('{$_POST["password"]}')"

Tim Ward
www.chessish.com


> -Original Message-
> From: Mr. BuNgL3 [mailto:mrbungle@;netcabo.pt]
> Sent: 27 October 2002 10:51
> To: [EMAIL PROTECTED]
> Subject: newbie: php/mysql
> 
> 
> Hey...
> I have a little problem... i want to read an encrypted field 
> from mysql
> database to a php variable... what is the code line that i 
> must enter? (ex:
> password validation in a login form)
> Thanks...
> 
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] error connecting to oracle.

2002-10-28 Thread Faisal Abdullah
"undefined function" means PHP doesn't know where to get the function from.
You probably didn't configure oci_8 libraries correctly.
Try phpinfo(), and see under the configuration.
Check whether oci8 is available.

Regards
Faisal

-Original Message-
From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] error connecting to oracle.



Hi all,

I get the following error while trying to connect to oracle.  Please help
me.

Fatal error:  Call to undefined function:  ora_logon() in c:\program
files\apache group\apache\htdocs\one.php on line 5

Subodh Gupta
Tata Consultancy Services.


__


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] error connecting to oracle.

2002-10-28 Thread Subodh Gupta

I checked up phpinfo().  It does not have oracle listed.  What do I need to
do now?

Subodh Gupta
Tata Consultancy Services.



   
 
"Faisal
 
Abdullah" To: "Subodh Gupta" 
<[EMAIL PROTECTED]>,
  
 
ix.com.my>cc:  
 
  Subject: RE: [PHP] error connecting to 
oracle.
28/10/2002 
 
03:21 PM   
 
   
 
   
 




"undefined function" means PHP doesn't know where to get the function from.
You probably didn't configure oci_8 libraries correctly.
Try phpinfo(), and see under the configuration.
Check whether oci8 is available.

Regards
Faisal

-Original Message-
From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] error connecting to oracle.



Hi all,

I get the following error while trying to connect to oracle.  Please help
me.

Fatal error:  Call to undefined function:  ora_logon() in c:\program
files\apache group\apache\htdocs\one.php on line 5

Subodh Gupta
Tata Consultancy Services.


__





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] ldap_add problem

2002-10-28 Thread Gerald Roehrbein/Pctdmn

Hello,

it's possible that attribute that have to use during an add do not exist.


For example from core.schema a programmer can retrieve information of the 
attribute that must exist for a objectclass
and the attributes that can given for a class like person. As an example of 
an entry of the slapd core.schema have a look
at the next three lines:

--from SLAPD core.schema---
objectclass ( 2.5.6.6 NAME 'person' SUP top STRUCTURAL
MUST ( sn $ cn )
MAY ( userPassword $ telephoneNumber $ seeAlso $ description ) )
---

A programmer of SLAPD have to know all of the attributes and dependencies 
of the schema directory and in special cases a programmer
 can modify the schema to fit for special purpose. When using Netscape 
Directory Server slapd configuration is a little bit easier because
Netscape developed a good HTML based admin interface that allows to have a 
simple look at the object structure and to add, modify or delete 
everything in the LDAP schema.


Hope ist helps.

Best regards
Gerald




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] ldap_add problem

2002-10-28 Thread Krzysztof Dziekiewicz
> I get the following error:

> Warning: LDAP: add operation could not be completed. in
> /var/www/html/user/adduser_p.php on line 65

> Where in my log files can I go to look for more detailed info on that error,
> I don't know if I have logging enabled for slapd.

1. after ldap_add print ldap_error
2. Problems:
2a: access rights
2b: Wrong objectclass: sure you add it with right values: all attrubites include
in class in objectclass.


-- 
Krzysztof Dziekiewicz


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] error connecting to oracle.

2002-10-28 Thread Faisal Abdullah
Where was it listed?
In the 'configure command' section? Or the 'configuration' section?
If its available in the 'configure command' ONLY, doesn't mean that its
working properly.

Also, check the following:


1.Copy d:\php\php4ts.dll to c:\winnt\system32 // depends on where your dll
file is

2. Modify php.ini file for enable oci8 extension.
Uncomment the php_oci8.dll line in c:\winnt\php.ini
;extension=php_mssql.dll
extension=php_oci8.dll
;extension=php_openssl.dll

3. Edit extension_dir Location
; Directory in which the loadable extensions (modules) reside.
extension_dir = "D:\PHP\extensions" // change this to whatever your
extention directory is.

Regards,
Faisal

-Original Message-
From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:35 PM
To: Faisal Abdullah; [EMAIL PROTECTED]
Subject: RE: [PHP] error connecting to oracle.



I checked up phpinfo().  It does not have oracle listed.  What do I need to
do now?

Subodh Gupta
Tata Consultancy Services.




"Faisal
Abdullah" To: "Subodh Gupta"
<[EMAIL PROTECTED]>,

ix.com.my>cc:
  Subject: RE: [PHP] error
connecting to oracle.
28/10/2002
03:21 PM






"undefined function" means PHP doesn't know where to get the function from.
You probably didn't configure oci_8 libraries correctly.
Try phpinfo(), and see under the configuration.
Check whether oci8 is available.

Regards
Faisal

-Original Message-
From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] error connecting to oracle.



Hi all,

I get the following error while trying to connect to oracle.  Please help
me.

Fatal error:  Call to undefined function:  ora_logon() in c:\program
files\apache group\apache\htdocs\one.php on line 5

Subodh Gupta
Tata Consultancy Services.


__





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

__


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] error connecting to oracle.

2002-10-28 Thread Gerald Roehrbein/Pctdmn

Hello,


at Solaris and Windows NT it's first necessary to install the Oracle Client 
software and then to configure PHP properly the way it is documented!
I've done until know only three PHP installations with Oracle support but 
all three installations where very simple!

Remember you have to set the Oracle Environmentvariables ($ORACLE_BASE, 
$ORACLE_HOME, $TNS) before starting the WEB Server or PHP! For 
apchache you can do this in apachectl or a subroutine you call from 
apachectl. In a windows environment you have to set the variables with the 
appropriate tools (System/Environment/Add Variables)!

In my cases this was  everything to do. Try your Oracle Client Installation 
with tnsping and sqlplus at your machine! This should work before you try 
to configure PHP.

best regards
Gerald


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] error connecting to oracle.

2002-10-28 Thread Faisal Abdullah
Heh..i just noticed something on your error:

>Call to undefined function:  ora_logon() in c:\program
>files\apache group\apache\htdocs\one.php on line 5

If you've configured OCI8, use:
ocilogon("scott","tiger",$db);

instead of ora_logon();

Regards,
Faisal

-Original Message-
From: Faisal Abdullah [mailto:faisal@;magnifix.com.my]
Sent: Monday, October 28, 2002 6:13 PM
To: Subodh Gupta; [EMAIL PROTECTED]
Subject: RE: [PHP] error connecting to oracle.


Where was it listed?
In the 'configure command' section? Or the 'configuration' section?
If its available in the 'configure command' ONLY, doesn't mean that its
working properly.

Also, check the following:


1.Copy d:\php\php4ts.dll to c:\winnt\system32 // depends on where your dll
file is

2. Modify php.ini file for enable oci8 extension.
Uncomment the php_oci8.dll line in c:\winnt\php.ini
;extension=php_mssql.dll
extension=php_oci8.dll
;extension=php_openssl.dll

3. Edit extension_dir Location
; Directory in which the loadable extensions (modules) reside.
extension_dir = "D:\PHP\extensions" // change this to whatever your
extention directory is.

Regards,
Faisal

-Original Message-
From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:35 PM
To: Faisal Abdullah; [EMAIL PROTECTED]
Subject: RE: [PHP] error connecting to oracle.



I checked up phpinfo().  It does not have oracle listed.  What do I need to
do now?

Subodh Gupta
Tata Consultancy Services.




"Faisal
Abdullah" To: "Subodh Gupta"
<[EMAIL PROTECTED]>,

ix.com.my>cc:
  Subject: RE: [PHP] error
connecting to oracle.
28/10/2002
03:21 PM






"undefined function" means PHP doesn't know where to get the function from.
You probably didn't configure oci_8 libraries correctly.
Try phpinfo(), and see under the configuration.
Check whether oci8 is available.

Regards
Faisal

-Original Message-
From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] error connecting to oracle.



Hi all,

I get the following error while trying to connect to oracle.  Please help
me.

Fatal error:  Call to undefined function:  ora_logon() in c:\program
files\apache group\apache\htdocs\one.php on line 5

Subodh Gupta
Tata Consultancy Services.


__





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

__


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

__


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] error connecting to oracle.

2002-10-28 Thread Subodh Gupta

There is no entry of oracle in any section.
The rest of things which you have pointed out are already in place.

How do I go aheadnow?

Subodh Gupta




   
 
"Faisal
 
Abdullah" To: "Subodh Gupta" 
<[EMAIL PROTECTED]>,
  
 
ix.com.my>cc:  
 
  Subject: RE: [PHP] error connecting to 
oracle.
28/10/2002 
 
03:42 PM   
 
   
 
   
 




Where was it listed?
In the 'configure command' section? Or the 'configuration' section?
If its available in the 'configure command' ONLY, doesn't mean that its
working properly.

Also, check the following:


1.Copy d:\php\php4ts.dll to c:\winnt\system32 // depends on where your dll
file is

2. Modify php.ini file for enable oci8 extension.
Uncomment the php_oci8.dll line in c:\winnt\php.ini
;extension=php_mssql.dll
extension=php_oci8.dll
;extension=php_openssl.dll

3. Edit extension_dir Location
; Directory in which the loadable extensions (modules) reside.
extension_dir = "D:\PHP\extensions" // change this to whatever your
extention directory is.

Regards,
Faisal

-Original Message-
From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:35 PM
To: Faisal Abdullah; [EMAIL PROTECTED]
Subject: RE: [PHP] error connecting to oracle.



I checked up phpinfo().  It does not have oracle listed.  What do I need to
do now?

Subodh Gupta
Tata Consultancy Services.




"Faisal
Abdullah" To: "Subodh Gupta"
<[EMAIL PROTECTED]>,

ix.com.my>cc:
  Subject: RE: [PHP] error
connecting to oracle.
28/10/2002
03:21 PM






"undefined function" means PHP doesn't know where to get the function from.
You probably didn't configure oci_8 libraries correctly.
Try phpinfo(), and see under the configuration.
Check whether oci8 is available.

Regards
Faisal

-Original Message-
From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] error connecting to oracle.



Hi all,

I get the following error while trying to connect to oracle.  Please help
me.

Fatal error:  Call to undefined function:  ora_logon() in c:\program
files\apache group\apache\htdocs\one.php on line 5

Subodh Gupta
Tata Consultancy Services.


__





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

__


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] error connecting to oracle.

2002-10-28 Thread Faisal Abdullah

If its not there, than I only see these possibilities:

1. You have not placed the correct dll's in the correct location.
2. You have not edited php.ini to in the extension section for oci8
3. You have not restarted apache after performing item [2] above

Regards,
Faisal

> -Original Message-
> From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
> Sent: Monday, October 28, 2002 5:56 PM
> To: Faisal Abdullah; [EMAIL PROTECTED]
> Subject: RE: [PHP] error connecting to oracle.
>
>
>
> There is no entry of oracle in any section.
> The rest of things which you have pointed out are already in place.
>
> How do I go aheadnow?
>
> Subodh Gupta
>
>
>
>
>
>
> "Faisal
>
> Abdullah" To: "Subodh Gupta"
> <[EMAIL PROTECTED]>,
>  <[EMAIL PROTECTED]>
> ix.com.my>cc:
>
>   Subject: RE: [PHP]
> error connecting to oracle.
> 28/10/2002
>
> 03:42 PM
>
>
>
>
>
>
>
>
>
> Where was it listed?
> In the 'configure command' section? Or the 'configuration' section?
> If its available in the 'configure command' ONLY, doesn't mean that its
> working properly.
>
> Also, check the following:
>
>
> 1.Copy d:\php\php4ts.dll to c:\winnt\system32 // depends on where your dll
> file is
>
> 2. Modify php.ini file for enable oci8 extension.
> Uncomment the php_oci8.dll line in c:\winnt\php.ini
> ;extension=php_mssql.dll
> extension=php_oci8.dll
> ;extension=php_openssl.dll
>
> 3. Edit extension_dir Location
> ; Directory in which the loadable extensions (modules) reside.
> extension_dir = "D:\PHP\extensions" // change this to whatever your
> extention directory is.
>
> Regards,
> Faisal
>
> -Original Message-
> From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
> Sent: Monday, October 28, 2002 5:35 PM
> To: Faisal Abdullah; [EMAIL PROTECTED]
> Subject: RE: [PHP] error connecting to oracle.
>
>
>
> I checked up phpinfo().  It does not have oracle listed.  What do
> I need to
> do now?
>
> Subodh Gupta
> Tata Consultancy Services.
>
>
>
>
> "Faisal
> Abdullah" To: "Subodh Gupta"
> <[EMAIL PROTECTED]>,
> 
> ix.com.my>cc:
>   Subject: RE: [PHP] error
> connecting to oracle.
> 28/10/2002
> 03:21 PM
>
>
>
>
>
>
> "undefined function" means PHP doesn't know where to get the
> function from.
> You probably didn't configure oci_8 libraries correctly.
> Try phpinfo(), and see under the configuration.
> Check whether oci8 is available.
>
> Regards
> Faisal
>
> -Original Message-
> From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
> Sent: Monday, October 28, 2002 5:18 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] error connecting to oracle.
>
>
>
> Hi all,
>
> I get the following error while trying to connect to oracle.  Please help
> me.
>
> Fatal error:  Call to undefined function:  ora_logon() in c:\program
> files\apache group\apache\htdocs\one.php on line 5
>
> Subodh Gupta
> Tata Consultancy Services.
>
>
> __
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> __
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

__


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




FW: [PHP] error connecting to oracle.

2002-10-28 Thread Faisal Abdullah


>
>
> > -Original Message-
> > From: Gerald Roehrbein/Pctdmn [mailto:groehrbein@;bigfoot.com]
> > Sent: Monday, October 28, 2002 10:50 AM
> > To: Subodh Gupta
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: [PHP] error connecting to oracle.
> >
> >
> >
> > Hello,
> >
> >
> > at Solaris and Windows NT it's first necessary to install the
> > Oracle Client
> > software

I think this goes for all operating systems. The libraries required
are in oracle itself. No oracle, no libraries.

> >and then to configure PHP properly the way it is documented!
> > I've done until know only three PHP installations with Oracle
> support but
> > all three installations where very simple!
> >
> > Remember you have to set the Oracle Environmentvariables ($ORACLE_BASE,
> > $ORACLE_HOME, $TNS) before starting the WEB Server or PHP! For
> > apchache you can do this in apachectl or a subroutine you call from
> > apachectl.

Be sure to set the appropriate user and group (who has the environment
variables set) in httpd.conf

> >In a windows environment you have to set the variables
> > with the
> > appropriate tools (System/Environment/Add Variables)!
> >
> > In my cases this was  everything to do. Try your Oracle Client
> > Installation
> > with tnsping and sqlplus at your machine! This should work
> before you try
> > to configure PHP.
> >
> > best regards
> > Gerald
> >
>
Regards,
Faisal

__


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] error connecting to oracle.

2002-10-28 Thread Subodh Gupta

I have checked that all my dll's are in c:\winnt\system32 directory.
Further I have un-commented the requisite lines from php.ini and as you
said, restarted my apache server after doing all this.  Still the problem
persists.


Subodh Gupta




   
 
"Faisal
 
Abdullah" To: "Subodh Gupta" 
<[EMAIL PROTECTED]>,
  
 
ix.com.my>cc:  
 
  Subject: RE: [PHP] error connecting to 
oracle.
28/10/2002 
 
04:00 PM   
 
   
 
   
 





If its not there, than I only see these possibilities:

1. You have not placed the correct dll's in the correct location.
2. You have not edited php.ini to in the extension section for oci8
3. You have not restarted apache after performing item [2] above

Regards,
Faisal

> -Original Message-
> From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
> Sent: Monday, October 28, 2002 5:56 PM
> To: Faisal Abdullah; [EMAIL PROTECTED]
> Subject: RE: [PHP] error connecting to oracle.
>
>
>
> There is no entry of oracle in any section.
> The rest of things which you have pointed out are already in place.
>
> How do I go aheadnow?
>
> Subodh Gupta
>
>
>
>
>
>
> "Faisal
>
> Abdullah" To: "Subodh Gupta"
> <[EMAIL PROTECTED]>,
>  <[EMAIL PROTECTED]>
> ix.com.my>cc:
>
>   Subject: RE: [PHP]
> error connecting to oracle.
> 28/10/2002
>
> 03:42 PM
>
>
>
>
>
>
>
>
>
> Where was it listed?
> In the 'configure command' section? Or the 'configuration' section?
> If its available in the 'configure command' ONLY, doesn't mean that its
> working properly.
>
> Also, check the following:
>
>
> 1.Copy d:\php\php4ts.dll to c:\winnt\system32 // depends on where your
dll
> file is
>
> 2. Modify php.ini file for enable oci8 extension.
> Uncomment the php_oci8.dll line in c:\winnt\php.ini
> ;extension=php_mssql.dll
> extension=php_oci8.dll
> ;extension=php_openssl.dll
>
> 3. Edit extension_dir Location
> ; Directory in which the loadable extensions (modules) reside.
> extension_dir = "D:\PHP\extensions" // change this to whatever your
> extention directory is.
>
> Regards,
> Faisal
>
> -Original Message-
> From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
> Sent: Monday, October 28, 2002 5:35 PM
> To: Faisal Abdullah; [EMAIL PROTECTED]
> Subject: RE: [PHP] error connecting to oracle.
>
>
>
> I checked up phpinfo().  It does not have oracle listed.  What do
> I need to
> do now?
>
> Subodh Gupta
> Tata Consultancy Services.
>
>
>
>
> "Faisal
> Abdullah" To: "Subodh Gupta"
> <[EMAIL PROTECTED]>,
> 
> ix.com.my>cc:
>   Subject: RE: [PHP] error
> connecting to oracle.
> 28/10/2002
> 03:21 PM
>
>
>
>
>
>
> "undefined function" means PHP doesn't know where to get the
> function from.
> You probably didn't configure oci_8 libraries correctly.
> Try phpinfo(), and see under the configuration.
> Check whether oci8 is available.
>
> Regards
> Faisal
>
> -Original Message-
> From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
> Sent: Monday, October 28, 2002 5:18 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] error connecting to oracle.
>
>
>
> Hi all,
>
> I get the following error while trying to connect to oracle.  Please help
> me.
>
> Fatal error:  Call to undefined function:  ora_logon() in c:\program
> files\apache group\apache\htdocs\one.php on line 5
>
> Subodh Gupta
> Tata Consultancy Services.
>
>
> __
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> __
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubs

[PHP] Parsing HTML

2002-10-28 Thread Henry
Hi All,

I would like to be able to do a serach and replace in a HTML document. For a
list of words;

for example:
hello become buongiorno
yes becomes si
size become grossezza

The problem is that if I change the word "size" without considering html
tags and html comments in the case of inline javascripts I'll end up with
"broken" html.

Is there a way to only do the search and replace outside the tags and
comments.

It is further complicated by the fact that I would still like to do the
replacements within strings for example within meta tags!

Any ideas.

Henry



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] oracle: updating clob causes error 600

2002-10-28 Thread Juhan Kundla
Hei!

Ühel ilusal päeval [27-10-2002 21:27] kirjutas Nick Eby:
> I'm running oracle 8.1.7 w/ php 4.2.  I use the oci8 functions to update
> clob columns, and maybe 1 out of every 15 or 20 times, updating a clob
> column causes the mysterious "ora-600, internal error code".  Anybody out
> there experienced this (and hopefully resolved it) who can shed some light?
> thanks

I'm afraid, the ora-600 errors mean "Call Oracle". You should examine
your Oracle server trace file and search the Oracle's Metalink support
page, perhaps an obvious solution can be found. The ora-600 internal
error is some kind of trap for errors, that shouldn't be occuring. This
error can have very different reasons from slightly bad things to very
disastrous anomalies. Call support.

Juhan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] preg_replace and eval

2002-10-28 Thread Daniel Pupius
Hey there,

We have a class that sets up a tree structure that represents an e-learning
object made up of nested "components".  We have a function
getPropertyValue($name) which returns the property $name for the current
component.

Now, we want to allow the user to use something like {parent.property} in a
property value, so that it can inherit parts of properties from the parent
component.  For example: caption = "the name of this component's parent is
{parent.name}!"

The following line sort of works:
$retVal =
preg_replace("/(.*){parent.(.*)}(.*)/e","'\\1'.\$this->parentNode->getProper
tyValue('\\2').'\\3'",$retVal);

However, if there are more than one string to replace it only works on the
last one.  So:
caption = "the parent's coordinates are ({parent.left}, {parent.top})" would
only return something like:  "the parent's coordinates are ({parent.left},
100)"

Hope someone can help.

Thanks

Dan




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] A newbie on Board!

2002-10-28 Thread Ford, Mike [LSS]
> -Original Message-
> From: Justin French [mailto:justin@;indent.com.au]
> Sent: 28 October 2002 07:27
> 
> Please start by looking in the manual... I simply typed
> http://php.net/oracle into my browser, which resulted in this page:
> 
> http://www.php.net/manual/en/ref.oracle.php
> 
> Seems to document all the functions, and there are 
> user-contributed notes
> down the bottom which seem to provide even more help, and 
> sample scripts.

Unfortunately, that's a bit of a newbie trap in itself.  If you're using
Oracle 7 or higher, you should probably be going for the Oracle8 Call
Interface provided by the OCI8 library -- see
http://www.php.net/manual/en/ref.oci8.php.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] error connecting to oracle.

2002-10-28 Thread Maxim Maletsky

Enable oci8 extension


--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



"Subodh Gupta" <[EMAIL PROTECTED]> wrote... :

> 
> I checked up phpinfo().  It does not have oracle listed.  What do I need to
> do now?
> 
> Subodh Gupta
> Tata Consultancy Services.
> 
> 
> 
>  
>   
> "Faisal  
>   
> Abdullah" To: "Subodh Gupta" 
><[EMAIL PROTECTED]>,
> 
>   
> ix.com.my>cc:
>   
>   Subject: RE: [PHP] error connecting to 
>oracle.
> 28/10/2002   
>   
> 03:21 PM 
>   
>  
>   
>  
>   
> 
> 
> 
> 
> "undefined function" means PHP doesn't know where to get the function from.
> You probably didn't configure oci_8 libraries correctly.
> Try phpinfo(), and see under the configuration.
> Check whether oci8 is available.
> 
> Regards
> Faisal
> 
> -Original Message-
> From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
> Sent: Monday, October 28, 2002 5:18 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] error connecting to oracle.
> 
> 
> 
> Hi all,
> 
> I get the following error while trying to connect to oracle.  Please help
> me.
> 
> Fatal error:  Call to undefined function:  ora_logon() in c:\program
> files\apache group\apache\htdocs\one.php on line 5
> 
> Subodh Gupta
> Tata Consultancy Services.
> 
> 
> __
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] error connecting to oracle.

2002-10-28 Thread Ford, Mike [LSS]
> -Original Message-
> From: Faisal Abdullah [mailto:faisal@;magnifix.com.my]
> Sent: 28 October 2002 09:51
> To: Subodh Gupta; [EMAIL PROTECTED]
> Subject: RE: [PHP] error connecting to oracle.
> 
>> -Original Message-
>> From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
>> Sent: Monday, October 28, 2002 5:18 PM
>> 
>> I get the following error while trying to connect to oracle.  
>> Please help
>> me.
>> 
>> Fatal error:  Call to undefined function:  ora_logon() in c:\program
>> files\apache group\apache\htdocs\one.php on line 5> 
>> "undefined function" means PHP doesn't know where to get the 
>> function from.
>
> You probably didn't configure oci_8 libraries correctly.
> Try phpinfo(), and see under the configuration.
> Check whether oci8 is available.

Look out! You've got your Oracle libraries in a twist.  The oci8 library supports the 
OCI* functions; the oracle library supports the ora_* functions.  OCI is generally 
considered to be a better interface, and should probably be used by preference with 
Oracle version 7 and upwards.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] error connecting to oracle.

2002-10-28 Thread Maxim Maletsky
When one uncomments oci8 extension in PHP.INI, then restarts apache, you
get an error on Apache's start-up which will mean your dll is not forund,
or there are no oci.h lib (wrong $ORACLE_HOME dir, or there is no client
at all... whichever) but, if no errors on Apache start were given to you,
just type:

OCILogOn($schema, $pass, $listener);

And you should NOT have "undefined function" error enymore. If you do -
you got no client, if you don't you got things working well from the
PHP-Oracle side.


--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



Gerald Roehrbein/Pctdmn<[EMAIL PROTECTED]> wrote... :

> 
> Hello,
> 
> 
> at Solaris and Windows NT it's first necessary to install the Oracle Client 
> software and then to configure PHP properly the way it is documented!
> I've done until know only three PHP installations with Oracle support but 
> all three installations where very simple!
> 
> Remember you have to set the Oracle Environmentvariables ($ORACLE_BASE, 
> $ORACLE_HOME, $TNS) before starting the WEB Server or PHP! For 
> apchache you can do this in apachectl or a subroutine you call from 
> apachectl. In a windows environment you have to set the variables with the 
> appropriate tools (System/Environment/Add Variables)!
> 
> In my cases this was  everything to do. Try your Oracle Client Installation 
> with tnsping and sqlplus at your machine! This should work before you try 
> to configure PHP.
> 
> best regards
> Gerald
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] oracle: updating clob causes error 600

2002-10-28 Thread Maxim Maletsky
What's the Oracle version?

OCIServerVersion($stmt);


--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



Juhan Kundla <[EMAIL PROTECTED]> wrote... :

> Hei!
> 
> Ühel ilusal päeval [27-10-2002 21:27] kirjutas Nick Eby:
> > I'm running oracle 8.1.7 w/ php 4.2.  I use the oci8 functions to update
> > clob columns, and maybe 1 out of every 15 or 20 times, updating a clob
> > column causes the mysterious "ora-600, internal error code".  Anybody out
> > there experienced this (and hopefully resolved it) who can shed some light?
> > thanks
> 
> I'm afraid, the ora-600 errors mean "Call Oracle". You should examine
> your Oracle server trace file and search the Oracle's Metalink support
> page, perhaps an obvious solution can be found. The ora-600 internal
> error is some kind of trap for errors, that shouldn't be occuring. This
> error can have very different reasons from slightly bad things to very
> disastrous anomalies. Call support.
> 
> Juhan
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A newbie on Board!

2002-10-28 Thread Maxim Maletsky
Actually, one should try always go for OCI8 functions even with lowere
versions. Sometiumes, though, these might not work well for < v7.


--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



"Ford, Mike   [LSS]" <[EMAIL PROTECTED]> wrote... :

> > -Original Message-
> > From: Justin French [mailto:justin@;indent.com.au]
> > Sent: 28 October 2002 07:27
> > 
> > Please start by looking in the manual... I simply typed
> > http://php.net/oracle into my browser, which resulted in this page:
> > 
> > http://www.php.net/manual/en/ref.oracle.php
> > 
> > Seems to document all the functions, and there are 
> > user-contributed notes
> > down the bottom which seem to provide even more help, and 
> > sample scripts.
> 
> Unfortunately, that's a bit of a newbie trap in itself.  If you're using
> Oracle 7 or higher, you should probably be going for the Oracle8 Call
> Interface provided by the OCI8 library -- see
> http://www.php.net/manual/en/ref.oci8.php.
> 
> Cheers!
> 
> Mike
> 
> -
> Mike Ford,  Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
> Email: [EMAIL PROTECTED]
> Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] preg_replace and eval

2002-10-28 Thread Maxim Maletsky

try splitting it first to get several strings into one array, then loop
the array and replace its each element concatenating the strings. This
is how my mind can process it so far :)


--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



"Daniel Pupius" <[EMAIL PROTECTED]> wrote... :

> Hey there,
> 
> We have a class that sets up a tree structure that represents an e-learning
> object made up of nested "components".  We have a function
> getPropertyValue($name) which returns the property $name for the current
> component.
> 
> Now, we want to allow the user to use something like {parent.property} in a
> property value, so that it can inherit parts of properties from the parent
> component.  For example: caption = "the name of this component's parent is
> {parent.name}!"
> 
> The following line sort of works:
> $retVal =
> preg_replace("/(.*){parent.(.*)}(.*)/e","'\\1'.\$this->parentNode->getProper
> tyValue('\\2').'\\3'",$retVal);
> 
> However, if there are more than one string to replace it only works on the
> last one.  So:
> caption = "the parent's coordinates are ({parent.left}, {parent.top})" would
> only return something like:  "the parent's coordinates are ({parent.left},
> 100)"
> 
> Hope someone can help.
> 
> Thanks
> 
> Dan
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] error connecting to oracle.

2002-10-28 Thread Maxim Maletsky

"Ford, Mike   [LSS]" <[EMAIL PROTECTED]> wrote... :

> Look out! You've got your Oracle libraries in a twist.  The oci8
> library supports the OCI* functions; the oracle library supports the
> ora_* functions.  OCI is generally considered to be a better interface,
> and should probably be used by preference with Oracle version 7 and
> upwards.


That is correct. 


--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Html Change

2002-10-28 Thread Rodrigo de Oliveira
Hi guys I´d like to know if there is a way for me to browse thru one of mine webpages 
and dinamicaly change the contents. I mean on the following way:

I´d like to have a php file to read a html document and change some of the words and 
then show on the net.
Thanx,
Rodrigo



[PHP] Re: preg_replace and eval

2002-10-28 Thread Erwin
> The following line sort of works:
> $retVal =
> preg_replace("/(.*){parent.(.*)}(.*)/e","'\\1'.\$this->parentNode-
> >getProper tyValue('\\2').'\\3'",$retVal);
>
> However, if there are more than one string to replace it only works
> on the last one.  So:
> caption = "the parent's coordinates are ({parent.left},
> {parent.top})" would only return something like:  "the parent's
> coordinates are ({parent.left}, 100)"

That is because the first (.*) skips the first parent.x pattern. It seems
the string is parsed backwards.
To avoid this problem, be more specific in your regexp. Don't use (.*), but
([^{]*) instead. The regexp which works in your example is the following:

/([^{]*){parent.([^{]*)}([^{]*)/e

HTH
Erwin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Html Change

2002-10-28 Thread Maxim Maletsky

Read about regular expressions.

php.net/pcre


--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



"Rodrigo de Oliveira" <[EMAIL PROTECTED]> wrote... :

> Hi guys I´d like to know if there is a way for me to browse thru one of mine 
>webpages and dinamicaly change the contents. I mean on the following way:
> 
> I´d like to have a php file to read a html document and change some of the words and 
>then show on the net.
> Thanx,
> Rodrigo


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A couple of questions..

2002-10-28 Thread Marek Kilimajer
I'm sure there are some web based file manegers, check out 
www.hotscripts.com

For your second problem, check first if you appache is sending the right 
response.
Connect, using telnet, to localhost:80, and write:
GET /mp3 HTTP/1.0

(two times enter). Apache should send you "301  Moved Permanently" 
response and
also header "Location: http://localhost/mp3/";. If it does, the problem 
is in your explorer.

eriol wrote:

I have two very newbie questions..

I want to be able to create a directory index view on my local Apache
server other than the default Apache view (similar to Expow, but not as
complex).. Can anyone recommend a simple script that you know of which
can display Name, Type, Size and Modified Date columns as well as allow
users to browse folders/directories and download the files within them?
I was told browsing subdirectories on Win32 machines isn't possible with
PHP, but I've seen it elsewhere (such as using Expow)..

I assume I could make a simple directory view script myself, but I'm not
familiar enough with PHP to feel comfortable about possible security
issues.. Register globals is off if that has any impact on possible
help..

The second question relates to the first, although it's more of an
Apache question.. I hope someone could help me as I assume it'd be an
easy fix, but I don't know what to search for.. I'm running Apache
1.3.27 on WinXP Pro with PHP 4.2.3 locally.. Whether I type in the
SERVER_ADDR IP address, the computer name, localhost or 127.0.0.1,  I
still get this following problem.. If I view this:

http://localhost/mp3/

I get the default Apache directory index view.. However, if I view this:

http://localhost/mp3 (minus the trailing forward slash)

I can't get a directory listing.. I get the default MSIE error page
similar to no DNS found.. I have most every ErrorDocument number set
correctly and working, but I don't even get an error # or page..

Is there something in Apache's httpd.conf that corrects this? I wasn't
sure if the following has anything to do with this.. With my last setup
(Win98/Apache 1.3.26/PHP 4.1.1), I don't remember having the php.exe
Action & ScriptAlias directive there.. As you probably have guessed, I'm
no expert with Apache either.. When I started Apache in the past on my
old setup, it'd start in console and tell me PHP was running as well..


   DirectoryIndex index.html index.o0o index.php
   AddType application/x-httpd-php .php .o0o
   AddType application/x-httpd-php-source .phps
   Action application/x-httpd-php /php/php.exe
   ScriptAlias /php/ "D:/Server/PHP/"


FYI: It's not a fulltime, always on server by any means, just something
to let friends grab files from me and allows me to locally test php
scripts when I run it..  Any help is appreciated.. TIA..

Take care.. peace..
eriol



 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] dbase verify

2002-10-28 Thread Plamen Slavov
Does anyone know if there is a way to tell if a given file is a valid dbase file, 
using PHP functions ?


Re: [PHP] newbie: php/mysql

2002-10-28 Thread Marek Kilimajer
The usual way of doing logins with encrypted/hashed passwords is

adding new user into the table:
INSERT users SET username='$_POST[username]', password=MD5('$_POST[pwd]');

checking if username/password match:
SELECT * FROM users WHERE username='$_POST[username]' AND 
password=MD5('$_POST[pwd]');

hashed passwords cannot be decrypted

Mr. BuNgL3 wrote:

Hey...
I have a little problem... i want to read an encrypted field from mysql
database to a php variable... what is the code line that i must enter? (ex:
password validation in a login form)
Thanks...



 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] dbase verify

2002-10-28 Thread Marek Kilimajer
Filetypes are usualy recognized by first 4 bytes (or so), so you need to 
find out what these bytes should be
for dbase files

Plamen Slavov wrote:

Does anyone know if there is a way to tell if a given file is a valid dbase file, using PHP functions ?
 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] extract($_POST)

2002-10-28 Thread Jay Blanchard
[snip]
Lets say you have a statement like:
$query = "SELECT * FROM mytable WHERE firstname=$firstname";

And if $firstname is set to:
  "xyz"; DELETE FROM mytable

Then this is executed as:  SELECT* FROM mytable WHERE firstname="xyz";DELETE
FROM mytable

This can wipe out your table...a bad thing...
[/snip]

Ah! But only if the database user has permissions for DELETE. That is why
security must be carefully thought out, because there are so many levels for
it to be implemented on.

This has been a great thread, lots of useful information.

Jay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Displaying one of three functions.

2002-10-28 Thread Steve Jackson
I have three functions written which work and I want to only display one
of them depending on user input.
What is the correct way to code this?
I can display all three functions but not one.
 
this is my code:
 
 ";
   echo "";
  display_button("show_cart.php", "continue-shopping", "Continue
Shopping");  
echo "";
}
else
{
  // error info and footer goes here.
 
 
I want to display shipping if the user is from finland and paying an
express cost 
display_shipping(calculate_express_cost($express));
 
from finland but paying by weight of shipping
display_shipping(calculate_shipping_cost($weight));

or from outside of finland
display_shipping(calculate_nonfinland_cost($country));
 
How do I write the If statement to say if country=finland&express=yes
display function 1
then if country = finland but express="" display function 2 or if
country isn't finland do 3?
 
Tried all morning and repeatedly failed!
 

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com  
[EMAIL PROTECTED]
Mobile +358 50 343 5159



 



[PHP] Group by YEAR in date

2002-10-28 Thread Faisal Abdullah
Hi people,

I have a table (postgres), with a date field (-mm-dd). How do I group by
year?

'select sum(profit) from loan group by apply_date' would group by the DAY,
not year.
Thanks.

Regards,
Faisal

__


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Displaying one of three functions.

2002-10-28 Thread Martin Hudec
Hello Steve,

I hope I understand your questions...so first we will check value of
country (if it is other than finland)...then if the first if
requirement is not met we will continue to second part (checking
express)...and so on

if {$country!="finland"){
   display_shipping(calculate_nonfinland_cost($country));
   break;
}
elsif ($country=="finland" && $express=="no") {
   display_shipping(calculate_shipping_cost($weight));
   break;
}
else ($country=="finland" && $express=="yes") {
   display_shipping(calculate_express_cost($express));
   break;
}

hope it helps...


-- 
Best regards,
 Martinmailto:corwin@;corwin.sk

Monday, October 28, 2002, 2:20:39 PM, you wrote:

SJ>//de-bug
SJ>//echo "test & $country & $express";

well shouldn't here be && or and?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Group by YEAR in date

2002-10-28 Thread Marek Kilimajer
In mysql, I would need to select an extra column
SELECT SUM(profit), YEAR(apply_date) AS year FROM loan GROUP BY year

Faisal Abdullah wrote:


Hi people,

I have a table (postgres), with a date field (-mm-dd). How do I group by
year?

'select sum(profit) from loan group by apply_date' would group by the DAY,
not year.
Thanks.

Regards,
Faisal

__


 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Group by YEAR in date

2002-10-28 Thread 1LT John W. Holmes
> I have a table (postgres), with a date field (-mm-dd). How do I group
by
> year?
>
> 'select sum(profit) from loan group by apply_date' would group by the DAY,
> not year.

SELECT SUM(profit) FROM load GROUP BY YEAR(apply_date)

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] New Error?

2002-10-28 Thread Steve Jackson
I get this error from my code.
Fatal error: Cannot break/continue 1 levels in
/www/u1255/shop/purchase.php on line 22

I think I need to end the functions if a condition is met so is there a
way to do it without breaking?
Where do I go from here?
 
 ";
   echo "";
  display_button("show_cart.php", "continue-shopping", "Continue
Shopping");  
echo "";
}
else
{
   echo mysql_error();
echo " Could
not store data, please try again.";
   echo " ";
   display_button("checkout.php", "back", "Back");
echo "";
}
  }
  else
  {
echo " You
did not fill in all the fields, please try again.";
echo " ";
 display_button("checkout.php", "back", "Back");
 echo "";
  } 
 
  do_html_footer();
?>

 

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com  
[EMAIL PROTECTED]
Mobile +358 50 343 5159



 



Re[2]: [PHP] Displaying one of three functions.

2002-10-28 Thread Martin Hudec
Hello Steve,

oh my fault...i apologize...this should worki shouldn't use break
;)

if {$country!="finland"){
   display_shipping(calculate_nonfinland_cost($country));
}
elsif ($country=="finland" && $express=="no") {
   display_shipping(calculate_shipping_cost($weight));
}
elseif ($country=="finland" && $express=="yes") {
   display_shipping(calculate_express_cost($express));
}

or (from my point of view is this better)

if {$country!="finland") :
   display_shipping(calculate_nonfinland_cost($country));
elsif ($country=="finland" && $express=="no") :
   display_shipping(calculate_shipping_cost($weight));
elseif ($country=="finland" && $express=="yes") :
   display_shipping(calculate_express_cost($express));
endif;

again i apologize...

-- 
Best regards,
 Martinmailto:corwin@;corwin.sk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] New Error?

2002-10-28 Thread Marek Kilimajer
Break an continue are for loops (while,for ...), if you want to get out 
of a function, use return

Steve Jackson wrote:

I get this error from my code.
Fatal error: Cannot break/continue 1 levels in
/www/u1255/shop/purchase.php on line 22

I think I need to end the functions if a condition is met so is there a
way to do it without breaking?
Where do I go from here?



 include ('products_sc_fns.php');
 // The shopping cart needs sessions, so start one
 session_start();

 do_html_header("Checkout");
 // if filled out
 //echo "testing";
 if($cart&&$name&&$address&&$city&&$zip&&$country)
 
 {
   // able to insert into database
   if( insert_order($HTTP_POST_VARS)!=false )
   {
 //display cart, not allowing changes and without pictures 
 display_cart($cart, false, 0);
  calculate_weight($cart);
  //determine what shipping we are using
  if ($country!="Finland"){
  display_shipping(calculate_nonfinland_cost($country));
  break;
   }
   elseif ($country=="Finland" && $express=="no"){
  display_shipping(calculate_shipping_cost($weight));
  break;
   }
  elseif ($country=="Finland" && $express=="yes"){
  display_shipping(calculate_express_cost($express));
  break;
  }
  
  //de-bug
  echo "test & $country & $express";
  //if($country!="Finland")
  //display_shipping(calculate_shipping_cost($weight));
  //{
  //display_shipping(calculate_nonfinland_cost($country));
  //}
  //display_shipping(calculate_express_cost($express));
  //display_shipping(calculate_temp_shipping_cost($weight)); 
 //get credit card details
  calculate_final_cost($total_price, $shipping);
  get_order_id();
  display_card_form($name, $final_cost);
   echo "
background='images/shopbg.gif'> ";
  echo "";
 display_button("show_cart.php", "continue-shopping", "Continue
Shopping");  
   echo "";
   }
   else
   {
  echo mysql_error();
   echo "
background='images/shopbg.gif'> Could
not store data, please try again.";
  echo " ";
  display_button("checkout.php", "back", "Back");
   echo "";
   }
 }
 else
 {
   echo "
background='images/shopbg.gif'> You
did not fill in all the fields, please try again.";
   echo " ";
display_button("checkout.php", "back", "Back");
echo "";
 } 

 do_html_footer();
?>



Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com  
[EMAIL PROTECTED]
Mobile +358 50 343 5159





 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Recommend a merchant/store product

2002-10-28 Thread Support @ Fourthrealm.com
Hey everyone,
For years I have used a fantastic merchant ( http://www.ihtmlmerchant.com 
), which is feature packed and easy to setup and use.  It's written in a 
competing language called iHTML ( http://www.ihtml.com ).

As I am getting considerably proficient at coding PHP, I find that I 
require a similar type merchant/store package that I can base future PHP 
e-commerce sites on.  I have mySQL and MS SQL Server available to me.

So... my questions to the list are:

1) What store product/package do you use?  Why?  URL?
2) What is purchase cost?  Is it one-time or per store?
3) What databases does it support?


Many thanks in advance.

Peter

- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ANN: Security Data S.A. releases PHPGrid under GPL license

2002-10-28 Thread José León Serna
Security Data S.A is proud to announce the inmediate availability of
PHPGrid under GPL license. PHPGrid is a PHP object that allows to
browse/add/edit/search/delete records in a database table. Is based on
ADOdb and incorporates features not found on similar products, for
exaple, manage unlimited relationships or allow create calculated
fields. We have designed it for internal use in our intranet, but we
have decided to release it as OpenSource to share it with the PHP
Community and let others contribute to its development.

PHPGrid
http://phpgrid.berlios.de

PHPGrid - Userguide
https://developer.berlios.de/docman/display_doc.php?docid=158&group_id=556

Screenshot1
http://phpgrid.berlios.de/shot1.jpg

Screenshot2
http://phpgrid.berlios.de/shot2.jpg

In the next weeks, we will publish an online demonstration and we will
setup the BerliOS website to start collaborative development,
bugtracking and mailing lists, if you want to collaborate, feel free to
contact with us.

About Security Data S.A.
Security Data S.A is a computer security company which produces it's own
integrated security solution, SD3, integrating a hardware Firewall,
Remote Backup and Antivirus, to know more, visit http://www.security.es
and http://portal.securitydata.es.




signature.asc
Description: This is a digitally signed message part


[PHP] IP addresses

2002-10-28 Thread Bret L Conard
Hi all,
I've been away for a while but I'm back and have a question about IP addresses.
How do I retrieve / capture a users IP? I need to have it to process electronic 
payments.

Thanks.
Bret





[PHP] List archive

2002-10-28 Thread Chris Boget
Besides Google, is there any other site that archives
this list?  I checked PHP Builder but I can't seem to
find a thread (or message) dated after April...

thnx,
Chris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] List archive

2002-10-28 Thread @ Edwin
Hello,

Looking for this?

  http://marc.theaimsgroup.com/?l=php-general

- E

"Chris Boget" <[EMAIL PROTECTED]> wrote:
> Besides Google, is there any other site that archives
> this list?  I checked PHP Builder but I can't seem to
> find a thread (or message) dated after April...
> 
...[snip]...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: IP addresses

2002-10-28 Thread Jome
>I've been away for a while but I'm back and have a question about IP
addresses.
>How do I retrieve / capture a users IP? I need to have it to process
electronic payments.

$_SERVER['REMOTE_ADDR']

  Jome



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] IP addresses

2002-10-28 Thread Martin Hudec
Hello Bret,

use $REMOTE_ADDR like this:


-- 
Best regards,
 Martinmailto:corwin@;corwin.sk

Monday, October 28, 2002, 3:46:04 PM, you wrote:

BLC> Hi all,
BLC> I've been away for a while but I'm back and have a question about IP addresses.
BLC> How do I retrieve / capture a users IP? I need to have it to process electronic 
payments.

BLC> Thanks.
BLC> Bret


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] IP addresses

2002-10-28 Thread PHP
$_SERVER['REMOTE_ADDR']

- Original Message -
From: "Bret L Conard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 4:46 PM
Subject: [PHP] IP addresses


Hi all,
I've been away for a while but I'm back and have a question about IP
addresses.
How do I retrieve / capture a users IP? I need to have it to process
electronic payments.

Thanks.
Bret





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Findng a pattern

2002-10-28 Thread Henry
Hi Again, sorry it's taken so long.

Thankyou for your help. I have since reappraised my thoughts on this subject
and would like to thank all of you (and inparticular Rasmus Lerdorf) for
your time in replying to my question. I will not be using anthing that was
provided in reply to circumvent googles API's.

Henry


"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
news:Pine.LNX.4.44.0210042315100.28746-10@;www.lerdorf.com...
> You are building something that will automatically scrape Google by
> explicitly circumventing the tools they have provided for you to do so.
> Whether the information is for your own internal statistics or not is
> irrelevant. The terms of service state:
>
>   No Automated Querying
>
>   You may not send automated queries of any sort to Google's system
>   without express permission in advance from Google. Note that "sending
automated
>   queries" includes, among other things:
>
> *  using any software which sends queries to Google to determine how
>a website or webpage "ranks" on Google for various queries;
>
> *  "meta-searching" Google; and
>
> *  performing "offline" searches on Google.
>
> -Rasmus
>
> On Sat, 5 Oct 2002, Henry wrote:
>
> > Dear Rasmus et.al.
> >
> > I am not wishing to reformat or display or mirror anything from google.
> >
> > This is for my own internal statistics.
> >
> > I hope that puts your mind at rest.
> >
> > Henry
> >
> > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
> > news:Pine.LNX.4.44.0210042151130.28746-10@;www.lerdorf.com...
> > > You realize that you are asking us to help you violate the terms of
> > > service of Google?
> > >
> > > A direct quote from their terms of service:
> > >
> > >   "You may not take the results from a Google search and reformat and
> > >display them, or mirror the Google home page or results pages on
your
> > >Web site."
> > >
> > > -Rasmus
> > >
> > > On Sat, 5 Oct 2002, Henry wrote:
> > >
> > > > Thanks, but I don't want to uses google's SOAP interface, is there a
> > preg
> > > > type solution.
> > > >
> > > >
> > > > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
> > > > news:Pine.LNX.4.44.0210042145330.28746-10@;www.lerdorf.com...
> > > > > Google has a SOAP interface for this.
> > > > >
> > > > > On Sat, 5 Oct 2002, Henry wrote:
> > > > >
> > > > > > Dear All,
> > > > > >
> > > > > > Excuse my ignorance but I'm STILL a newbie to this aspect of
PHP.
> > > > > >
> > > > > > $str="Results 1 - 10 of about 14.   Search
took
> > > > > > 0.04 seconds."
> > > > > >
> > > > > > I would like to look for the string above in a buffer of text.
> > However I
> > > > > > would like to find it even if the numeric are different.
Furthermore
> > I
> > > > would
> > > > > > like to know what the values are. Is there a simple way to do
this?
> > > > > >
> > > > > > TIA
> > > > > >
> > > > > > Henry
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > PHP General Mailing List (http://www.php.net/)
> > > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Parsing HTML

2002-10-28 Thread Henry
What; nobody has anything to say about parsing HTML and doing search and
replaces!! Is there another news group that might be better suited? I do
want to do it PHP if I hadn't made that clear.

Somebody, anybody, please help.

"Henry" <[EMAIL PROTECTED]> wrote in message
news:20021028103849.2175.qmail@;pb1.pair.com...
> Hi All,
>
> I would like to be able to do a serach and replace in a HTML document. For
a
> list of words;
>
> for example:
> hello become buongiorno
> yes becomes si
> size become grossezza
>
> The problem is that if I change the word "size" without considering html
> tags and html comments in the case of inline javascripts I'll end up with
> "broken" html.
>
> Is there a way to only do the search and replace outside the tags and
> comments.
>
> It is further complicated by the fact that I would still like to do the
> replacements within strings for example within meta tags!
>
> Any ideas.
>
> Henry
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] IP addresses

2002-10-28 Thread @ Edwin
$_SERVER['REMOTE_ADDR']

Check more info here:

http://www.php.net/manual/en/reserved.variables.php#reserved.variables.serve
r

You cannot (implicitly) trust it though...

  IP address is NOT always = THE user

- E

"Bret L Conard" <[EMAIL PROTECTED]> wrote:
> Hi all,
> I've been away for a while but I'm back and have a question about IP
addresses.
> How do I retrieve / capture a users IP? I need to have it to process
electronic payments.
>
> Thanks.
> Bret




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Parsing HTML

2002-10-28 Thread Jay Blanchard
[snip]
What; nobody has anything to say about parsing HTML and doing search and
replaces!! Is there another news group that might be better suited? I do
want to do it PHP if I hadn't made that clear.

Somebody, anybody, please help.
[/snip]

What? No one wants to help someone who didn't search the manual for regular
expressions? Things like eregi_replace()?

RTFM, this is very basic.

Having a bad day in Texas... :^[ *grrr*

Jay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] passing varibles into PHP script

2002-10-28 Thread wh1sp3r
I'm trying to create a script that handles/logs banner click-throughs 
from an HTML page passing variable information through the URL.

example URL:
http://somehost.com/bannerhandler.php?value=1

The test script I wrote, however, is not recieving the variable 
information.  Any ideas of what I should look for or some helpful 
documentation to read?

Thanks





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Parsing HTML

2002-10-28 Thread Henry
Thanks Jay, I am still a newbie and I will read the manual, thankyou for the
help.

Having an OK day in the UK .   

Henry

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:003f01c27e93$87bc1da0$8102a8c0@;000347D72515...
> [snip]
> What; nobody has anything to say about parsing HTML and doing search and
> replaces!! Is there another news group that might be better suited? I do
> want to do it PHP if I hadn't made that clear.
>
> Somebody, anybody, please help.
> [/snip]
>
> What? No one wants to help someone who didn't search the manual for
regular
> expressions? Things like eregi_replace()?
>
> RTFM, this is very basic.
>
> Having a bad day in Texas... :^[ *grrr*
>
> Jay
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Parsing HTML

2002-10-28 Thread John Nichel
The tools for you to execute the regular expression are there for you in 
the manual.  The actual regular expression that you're looking for is 
not a php issue.  And I can't say that I'm totally convinced that you're 
still not trying to circumvent google's TOS.

Henry wrote:
What; nobody has anything to say about parsing HTML and doing search and
replaces!! Is there another news group that might be better suited? I do
want to do it PHP if I hadn't made that clear.

Somebody, anybody, please help.

"Henry" <[EMAIL PROTECTED]> wrote in message
news:20021028103849.2175.qmail@;pb1.pair.com...


Hi All,

I would like to be able to do a serach and replace in a HTML document. For


a


list of words;

for example:
hello become buongiorno
yes becomes si
size become grossezza

The problem is that if I change the word "size" without considering html
tags and html comments in the case of inline javascripts I'll end up with
"broken" html.

Is there a way to only do the search and replace outside the tags and
comments.

It is further complicated by the fact that I would still like to do the
replacements within strings for example within meta tags!

Any ideas.

Henry











--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] passing varibles into PHP script

2002-10-28 Thread John Nichel
wh1sp3r wrote:

I'm trying to create a script that handles/logs banner click-throughs 
from an HTML page passing variable information through the URL.

example URL:
http://somehost.com/bannerhandler.php?value=1

The test script I wrote, however, is not recieving the variable 
information.  Any ideas of what I should look for or some helpful
documentation to read?

The php manual?

Try this

echo ( $_GET['value'] );



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Parsing HTML

2002-10-28 Thread Jay Blanchard
[snip]
Thanks Jay, I am still a newbie and I will read the manual, thankyou for the
help.

Having an OK day in the UK .   
[/snip]

Henry your questions will get answered more quickly and accurately when you
provide

a. A clear explanation of the problem at hand
2. Proof that you have done some research on your own (show your work) [RTFM
or STFW]

Coming back with a "What..!!" will get you squat, it is insulting to those
who are here to help. Also your original post was about 4:30AM and your
follow-up "What..!!" was at 9AM ... on a Monday morning. Think
aboout that for a second.

HTH!

Jay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Parsing HTML

2002-10-28 Thread Henry
Dear Jay,

I have now had a look in the FM and whilst it does help if you know how to
use regular expressions I think that you are being a little disingenuous.
Having to parse the HTML is more complicated than is suggest in your reply.
If it is so simple perhaps you might spend 5 minutes generating the regular
expression to use that will ignore the contents of tags save for the
contents of quotes within meta tags and do the replace for an associative
array of mappings.

Hope your day is getting better in Texas.

Henry

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:003f01c27e93$87bc1da0$8102a8c0@;000347D72515...
> [snip]
> What; nobody has anything to say about parsing HTML and doing search and
> replaces!! Is there another news group that might be better suited? I do
> want to do it PHP if I hadn't made that clear.
>
> Somebody, anybody, please help.
> [/snip]
>
> What? No one wants to help someone who didn't search the manual for
regular
> expressions? Things like eregi_replace()?
>
> RTFM, this is very basic.
>
> Having a bad day in Texas... :^[ *grrr*
>
> Jay
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: Re[2]: [PHP] Displaying one of three functions.

2002-10-28 Thread @ Edwin
Hello,

"Martin Hudec" <[EMAIL PROTECTED]> wrote:
> or (from my point of view is this better)
> 
> if {$country!="finland") :
>display_shipping(calculate_nonfinland_cost($country));
> elsif ($country=="finland" && $express=="no") :
>display_shipping(calculate_shipping_cost($weight));
> elseif ($country=="finland" && $express=="yes") :
>display_shipping(calculate_express_cost($express));
> endif;
> 

How about something like this?

if ($country!="finland"){
   display_shipping(calculate_nonfinland_cost($country));
}else{  // if it's not "finland" it should be something else, no?
  if ($express=="no"){
display_shipping(calculate_shipping_cost($weight));
  }else{ // if it's not "no" it should be "yes", no?
display_shipping(calculate_express_cost($express));
  }
}

Just an idea...

- E


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Parsing HTML

2002-10-28 Thread Henry
I did a search and I remebered that I have previously seen some of your
work. In particlar your guide to CMS in evolt.org. Which I think is
absolutely wonderful. Thankyou for your help and I hope that I haven't gone
to far with my disingenuous comment posting.

I hadn't appreciated the time difference and do appreciate your help.

Thankyou.

Henry

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:004001c27e95$1c4d2580$8102a8c0@;000347D72515...
> [snip]
> Thanks Jay, I am still a newbie and I will read the manual, thankyou for
the
> help.
>
> Having an OK day in the UK .   
> [/snip]
>
> Henry your questions will get answered more quickly and accurately when
you
> provide
>
> a. A clear explanation of the problem at hand
> 2. Proof that you have done some research on your own (show your work)
[RTFM
> or STFW]
>
> Coming back with a "What..!!" will get you squat, it is insulting to those
> who are here to help. Also your original post was about 4:30AM and your
> follow-up "What..!!" was at 9AM ... on a Monday morning. Think
> aboout that for a second.
>
> HTH!
>
> Jay
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Parsing HTML

2002-10-28 Thread Jon Haworth
Hi Henry,

> If it is so simple perhaps you might spend 5 
> minutes generating the regular expression to 
> use that will ignore the contents of tags save 
> for the contents of quotes within meta tags and 
> do the replace for an associative array of mappings.

http://google.com/search?q=regex+search+replace+outside+html+tags might be a
good way for you to pass the time while you're waiting for Jay to write your
program ;-)

Cheers
Jon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Parsing HTML

2002-10-28 Thread Henry
I assure you that I am not trying to circumvent google's anything. I'm
trying to provide a HTML translation page tool for some of my visitors where
they will provide there own URL and a translation of some keywords will be
done for them. Thats all.

I never actually was going to flaunt googles terms and conditions and after
the replys from Rasmus I went away and looked into the mater. I agree whole
heartedly with what Rasmus and others said and will not be circumventing
APIs under any circumstance.

Henry

"John Nichel" <[EMAIL PROTECTED]> wrote in message
news:3DBD546D.3000500@;by-tor.com...
> The tools for you to execute the regular expression are there for you in
> the manual.  The actual regular expression that you're looking for is
> not a php issue.  And I can't say that I'm totally convinced that you're
> still not trying to circumvent google's TOS.
>
> Henry wrote:
> > What; nobody has anything to say about parsing HTML and doing search and
> > replaces!! Is there another news group that might be better suited? I do
> > want to do it PHP if I hadn't made that clear.
> >
> > Somebody, anybody, please help.
> >
> > "Henry" <[EMAIL PROTECTED]> wrote in message
> > news:20021028103849.2175.qmail@;pb1.pair.com...
> >
> >>Hi All,
> >>
> >>I would like to be able to do a serach and replace in a HTML document.
For
> >
> > a
> >
> >>list of words;
> >>
> >>for example:
> >>hello become buongiorno
> >>yes becomes si
> >>size become grossezza
> >>
> >>The problem is that if I change the word "size" without considering html
> >>tags and html comments in the case of inline javascripts I'll end up
with
> >>"broken" html.
> >>
> >>Is there a way to only do the search and replace outside the tags and
> >>comments.
> >>
> >>It is further complicated by the fact that I would still like to do the
> >>replacements within strings for example within meta tags!
> >>
> >>Any ideas.
> >>
> >>Henry
> >>
> >>
> >
> >
> >
> >
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Parsing HTML

2002-10-28 Thread John Nichel
What?!?  You're not awake at 4:30 in the morning writing code?!?  I 
think the commitee will have to reconsider your geek club membership.  :)

Jay Blanchard wrote:
[snip]
Thanks Jay, I am still a newbie and I will read the manual, thankyou for the
help.

Having an OK day in the UK .   
[/snip]

Henry your questions will get answered more quickly and accurately when you
provide

a. A clear explanation of the problem at hand
2. Proof that you have done some research on your own (show your work) [RTFM
or STFW]

Coming back with a "What..!!" will get you squat, it is insulting to those
who are here to help. Also your original post was about 4:30AM and your
follow-up "What..!!" was at 9AM ... on a Monday morning. Think
aboout that for a second.

HTH!

Jay







--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] passing varibles into PHP script

2002-10-28 Thread @ Edwin
Hello,

"wh1sp3r" <[EMAIL PROTECTED]> wrote:

> I'm trying to create a script that handles/logs banner click-throughs 
> from an HTML page passing variable information through the URL.
> 
> example URL:
> http://somehost.com/bannerhandler.php?value=1
> 
> The test script I wrote, however, is not recieving the variable 
> information.  Any ideas of what I should look for or some helpful 
> documentation to read?
> 

Perhaps it has something to do with this?

  http://www.php.net/manual/en/security.registerglobals.php

You can search the archives:

  http://marc.theaimsgroup.com/?l=php-general

Try "passing variables" as your keyword :)

HTH,

- E


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Parsing HTML

2002-10-28 Thread Jay Blanchard
[snip]
I did a search ...
[/snip]

My apologies Henry, I had just received a piece of disturbing news along
with starting my Monday at 4:30 CST with some database server problems. You
just happened to get in the line of fire.

Start with the regular expression functions in PHP. Once you have an
understanding of how they work you will start to figure it out. You will be
a better programmer for it. Once you have started to assemble your code,
post it with questions about the how's and why's. Most folks on this list
who are here to help will not take the "5 minutes" to write an untested
piece of code for you. They will attempt to point you in a particular
direction and teach you how to do it.

Jay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Parsing HTML

2002-10-28 Thread Jay Blanchard
[snip]
What?!?  You're not awake at 4:30 in the morning writing code?!?  I
think the commitee will have to reconsider your geek club membership.  :)
[/snip]

How do you think that I knew the original post came in at that time?
ROFLMAO. Go ahead revoke my Geek Club card, the discounts no longer
work! :^]

Jay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re[4]: [PHP] Displaying one of three functions.

2002-10-28 Thread Martin Hudec
Hello @ Edwin,

of course you can but let me say something

if .. else is used when u
need to execute one thing in case that requirement in if is met and
second thing if it is not met...

in case of if...elsif : command behind elsif is executed when
requirement in if is not metyou can add as many elsif as you
want...also u can end whole thing with else which is executed in case
when no previous requirements are met...

hope I wrote it goodsorry im too tired to think about english
grammar and such things ;)))

-- 
Best regards,
 Martinmailto:corwin@;corwin.sk

Monday, October 28, 2002, 4:18:45 PM, you wrote:

E> Hello,

E> "Martin Hudec" <[EMAIL PROTECTED]> wrote:
>> or (from my point of view is this better)
>> 
>> if {$country!="finland") :
>>display_shipping(calculate_nonfinland_cost($country));
>> elsif ($country=="finland" && $express=="no") :
>>display_shipping(calculate_shipping_cost($weight));
>> elseif ($country=="finland" && $express=="yes") :
>>display_shipping(calculate_express_cost($express));
>> endif;
>> 

E> How about something like this?

E> if ($country!="finland"){
E>display_shipping(calculate_nonfinland_cost($country));
E> }else{  // if it's not "finland" it should be something else, no?
E>   if ($express=="no"){
E> display_shipping(calculate_shipping_cost($weight));
E>   }else{ // if it's not "no" it should be "yes", no?
E> display_shipping(calculate_express_cost($express));
E>   }
E> }

E> Just an idea...

E> - E


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Mac OS X EI TEXTAREA Problem

2002-10-28 Thread Brent Baisley
I assume you meant IE and not EI (?).
I don't have any problem with text areas that you are showing. Do have a 
"WRAP" setting in your text area (hard, soft, off)? I don't specify any 
wrap. I doubt that has anything to do with it, but I'm reaching.

Have you tried it on other machines? Perhaps there is an issue with IE 
on the machine you are working on.

On Sunday, October 27, 2002, at 01:28 AM, Dan Tappin wrote:

All the form element work except for TEXTAREA.


--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: Re[4]: [PHP] Displaying one of three functions.

2002-10-28 Thread @ Edwin
Hello Martin,

"Martin Hudec" <[EMAIL PROTECTED]> wrote:

> Hello @ Edwin,
>
> of course you can but let me say something
>
> if .. else is used when u
> need to execute one thing in case that requirement in if is met and
> second thing if it is not met...
>
> in case of if...elsif : command behind elsif is executed when
> requirement in if is not metyou can add as many elsif as you
> want...also u can end whole thing with else which is executed in case
> when no previous requirements are met...
>
> hope I wrote it goodsorry im too tired to think about english
> grammar and such things ;)))
>

Very clear! I understand.

Well, I understand your point. There is nothing wrong with your style.

I just wanted to give some options/suggestions. Besides, for the most part,
it's just a matter of taste :)

Best regards,

- E

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Week numbers

2002-10-28 Thread Davíð Örn Jóhannsson
Lets say I have a date: 29.10.2002 and I want to be able to find out
what week number it is, I know
how to find out what the current week number is: date(“W”) to day it
would result 44, but i need to be 
able to  do this dynamically ofcourse, any Ideas?
 
thanks, David
 



[PHP] Free compiler for Win

2002-10-28 Thread Marcello Lupo
Hi to all,
anyone know a good free complier for win 2000/NT to compile PHP and so on?
thanks,
Bye
MArselo

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] oracle: updating clob causes error 600

2002-10-28 Thread Nick Eby

"Maxim Maletsky" <[EMAIL PROTECTED]> wrote in message
news:20021028122405.4F05.MAXIM@;php.net...
> What's the Oracle version?

8.1.7



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Week numbers

2002-10-28 Thread Chris Boget
> Lets say I have a date: 29.10.2002 and I want to be able to find out
> what week number it is, I know how to find out what the current week 
> number is: date("W") to day it would result 44, but i need to be able 
> to  do this dynamically ofcourse, any Ideas?
 
date( "W", $yourUnixTimeStampDateVar );

Chris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Week numbers

2002-10-28 Thread 1LT John W. Holmes
date('W',strtotime('29.10.2002')); ??

Untested... I don't know if strtotime will recognize that format.

---John Holmes...

- Original Message -
From: "Davíð Örn Jóhannsson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 10:57 AM
Subject: [PHP] Week numbers


Lets say I have a date: 29.10.2002 and I want to be able to find out
what week number it is, I know
how to find out what the current week number is: date("W") to day it
would result 44, but i need to be
able to  do this dynamically ofcourse, any Ideas?

thanks, David



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Failing to Make MySQL Query on Submit

2002-10-28 Thread user
I'm having a problem getting my PHP script to talk to my database.  I'm 
attempting to use UPDATE with a PHP form to change records already in 
the database.  I'm able to pull the record with no problem and the 
script is sending the confirmation e-mail without a problem on submit 
but for some reason the MySQL query isn't being made.  I've even tried 
"dummy" queries just to see if the connection was being made, but it's 
not.  I'd appreciate any help.  Following is the code:


 // CONNECT TO DATABASE
$db = mysql_connect("localhost", "webmstr");
mysql_select_db("test",$db);
if ($submit) {
 // SEND INFO IN EMAIL
 mail("$email", "Picks", "Your entry has been changed.\nFirst Set 
Opener: $o1 \nFirst Set Wildcard: $w1 \nFirst Set Closer: $c1 \nSecond 
Set Opener: $o2 \nSecond Set Wildcard: $w2 \nSecond Set Closer: $c2 
\nEncore: $en \nAcoustic Song: $ac \nWildcard: $wc \nOne Time Played: 
$ot \nFirst Time Played: $nw \n\nGood Luck!\nhttp://www.otherones.net";, 
"From: [EMAIL PROTECTED]");
 // UPDATE THE DATABASE
 $sql = "UPDATE fantasytoo SET o1 = \"$o1\",w1 = \"$w1\",c1 = 
\"$c1\",o2 = \"$o2\",w2 = \"$w2\",c2 = \"$c2\",en = \"$en\",wc = 
\"$wc\",ot = \"$ot\" WHERE realname = \"$realname\" ";
}
if ($realname) {
// query the database
$sql = "select * from fantasytoo where realname = \"$realname\" and 
email = \"$email\"";
$result = mysql_query($sql);
while ($myrow = mysql_fetch_array($result)) {
printf($result);
?>
&email=">

 
  
Fantasy TOO - Fall 2002 Signups 
.



  
 ">
">

   Name: 
  


  E-mail
Address: 
  


  1st
Set Opener (8): 
  

  
?>

[What's 
This?]


   1st
Set Wildcard (4): 
  

  
?>

[What's 
This?]


   1st
Set Closer (6): 
  

  
?>

[What's 
This?]


   2nd
Set Opener (8): 
  

  
?>

[What's 
This?]


   2nd
Set Wildcard (4): 
  

  
?>

[What's 
This?]


   2nd
Set Closer (6): 
  

  
?>

[What's 
This?]


   Encore
(5): 
  

  
?>

[What's 
This?]


   Wildcard
(2): 
  

  
?>

[What's 
This?]


   One
Time Played (15): 
  

  
?>

[What's 
This?]


  

   

  
  

  

  


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Sessions are acting strangely

2002-10-28 Thread Joel Boonstra
> Hi there,
> Im looking for ANY help regarding his problem - I find this interesting to
> say the least.
>
> I recently switched to a new hosting company - they are running php 4.1.2 -
> register globals is ON.
> the sessions automatically expire without closing the window. if you load
> index.php and wait past 30 seconds - the session variables are empty -
> Sometimes - although not reliably - if you wait another 30 seconds - the
> variables are back? - this is very strange? - here are the files I have
> setup to illustrate this problem.
> Im using the default php-ini file  - so no weird session expires or garbage
> collections stuff.

Do you know if your hosting company has a multi-webserver setup?  If so,
do they have a shared /tmp directory (where PHP stores session
information), or is it unique to each server?  If your hosting company
has many different webservers, each reload might hit a different one,
and each may or may not have your session information in its /tmp
directory.

A solution is to write your own session handlers, using a database, the
shared portion of the filesystem, or some other method of preserving the
data.

Otherwise, have you checked with your hosting company to see if this is
a common issue that their customers have?

-- 
[ joel boonstra | [EMAIL PROTECTED] ]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Failing to Make MySQL Query on Submit

2002-10-28 Thread Martin Hudec
Hello user,

ill take a look only into this

udi>   // UPDATE THE DATABASE
udi>   $sql = "UPDATE fantasytoo SET o1 = \"$o1\",w1 = \"$w1\",c1 = 
udi> \"$c1\",o2 = \"$o2\",w2 = \"$w2\",c2 = \"$c2\",en = \"$en\",wc = 
udi> \"$wc\",ot = \"$ot\" WHERE realname = \"$realname\" ";
udi> }

well here u use first $sql..i cant see no mysql_querylike this
one..:
$result = mysql_query($sql) or die "Cannot update database...";

udi> if ($realname) {
udi> // query the database
udi> $sql = "select * from fantasytoo where realname = \"$realname\" and 
udi> email = \"$email\"";
udi> $result = mysql_query($sql);
udi> while ($myrow = mysql_fetch_array($result)) {
udi> printf($result);

here is another $sqlafter execution of first UPDATE thing you set
$sql to UPDATE bla bla.then here u set it to SELECT * from bla
bla...i recommend using for each sql string in one script various
variables like $sql1 = "UPDATE bla bla"; and $sql2 = "SELECT bla bla";
for better reading

-- 
Best regards,
 Martinmailto:corwin@;corwin.sk

Monday, October 28, 2002, 5:09:22 PM, you wrote:

udi> I'm having a problem getting my PHP script to talk to my database.  I'm 
udi> attempting to use UPDATE with a PHP form to change records already in 
udi> the database.  I'm able to pull the record with no problem and the 
udi> script is sending the confirmation e-mail without a problem on submit 
udi> but for some reason the MySQL query isn't being made.  I've even tried 
udi> "dummy" queries just to see if the connection was being made, but it's 
udi> not.  I'd appreciate any help.  Following is the code:

udi>// CONNECT TO DATABASE
udi> $db = mysql_connect("localhost", "webmstr");
udi> mysql_select_db("test",$db);
udi> if ($submit) {
udi>   // SEND INFO IN EMAIL
udi>   mail("$email", "Picks", "Your entry has been changed.\nFirst Set 
udi> Opener: $o1 \nFirst Set Wildcard: $w1 \nFirst Set Closer: $c1 \nSecond 
udi> Set Opener: $o2 \nSecond Set Wildcard: $w2 \nSecond Set Closer: $c2 
udi> \nEncore: $en \nAcoustic Song: $ac \nWildcard: $wc \nOne Time Played: 
udi> $ot \nFirst Time Played: $nw \n\nGood Luck!\nhttp://www.otherones.net";, 
udi> "From: [EMAIL PROTECTED]");
udi>   // UPDATE THE DATABASE
udi>   $sql = "UPDATE fantasytoo SET o1 = \"$o1\",w1 = \"$w1\",c1 = 
udi> \"$c1\",o2 = \"$o2\",w2 = \"$w2\",c2 = \"$c2\",en = \"$en\",wc = 
udi> \"$wc\",ot = \"$ot\" WHERE realname = \"$realname\" ";
udi> }
udi> if ($realname) {
udi> // query the database
udi> $sql = "select * from fantasytoo where realname = \"$realname\" and 
udi> email = \"$email\"";
udi> $result = mysql_query($sql);
udi> while ($myrow = mysql_fetch_array($result)) {
udi> printf($result);
?>>
udi> >&email=">
udi> >
udi>  
udi>>
udi>  Fantasy TOO - Fall 2002 Signups 
udi>  .
udi> 
udi> 
udi> 
udi>>
udi>   >">
udi> ">

udi>> Name: 
udi>>
udi>  
udi>  
udi>>E-mail
udi>  Address: 
udi>>
udi>  
udi>  
udi>>1st
udi>  Set Opener (8): 
udi>
udi>  >
udi>>
udi>  
udi>  [What's 
udi> This?]
udi>  
udi>  
udi>> 1st
udi>  Set Wildcard (4): 
udi>
udi>  >
udi>>
udi>  
udi>  [What's 
udi> This?]
udi>  
udi>  
udi>> 1st
udi>  Set Closer (6): 
udi>
udi>  >
udi>>
udi>  
udi>  [What's 
udi> This?]
udi>  
udi>  
udi>> 2nd
udi>  Set Opener (8): 
udi>
udi>  >
udi>>
udi>  
udi>  [What's 
udi> This?]
udi>  
udi>  
udi>> 2nd
udi>  Set Wildcard (4): 
udi>
udi>  >
udi>>
udi>  
udi>  [What's 
udi> This?]
udi>  
udi>  
udi>> 2nd
udi>  Set Closer (6): 
udi>
udi>  >
udi>>
udi>  
udi>  [What's 
udi> This?]
udi>  
udi>  
udi>> Encore
udi>  (5): 
udi>
udi>  >
udi>>
udi>  
udi>  [What's 
udi> This?]
udi>  
udi>  
udi>> Wildcard
udi>  (2): 
udi>
udi>  >
udi>>
udi>  
udi>  [What's 
udi> This?]
udi>  
udi>  
udi>> One
udi>  Time Played (15): 
udi>
udi>  >
udi>>
udi>  
udi>  [What's 
udi> This?]
udi>  
udi>  
udi>
udi>  
udi> 
udi>  
udi>
udi>
udi>  
udi>
udi>  
udi>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] "Please Wait"

2002-10-28 Thread Chris Shiflett
Here is an example that might help get you started:

http://shiflett.org/tutorials/php_flush.txt

James Taylor wrote:


Just curious if anyone out there knows how to do a "Please wait" type screen
while the script is running in the background..  Like say PHP is doing a
large select from a database, while the user waits for the script I'd like a
graphic or something saying to wait...

Any ideas?


 




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: confirm subscribe to php-general@lists.php.net

2002-10-28 Thread Steve Purkiss
On 28 Oct 2002 16:13:29 -
[EMAIL PROTECTED] wrote:

> Hi! This is the ezmlm program. I'm managing the
> [EMAIL PROTECTED] mailing list.
> 
> I'm working for my owner, who can be reached
> at [EMAIL PROTECTED]
> 
> To confirm that you would like
> 
>[EMAIL PROTECTED]
> 
> added to the php-general mailing list, please send
> an empty reply to this address:
> 
>
>[EMAIL PROTECTED]
> 
> Usually, this happens when you just hit the "reply" button.
> If this does not work, simply copy the address and paste it into
> the "To:" field of a new message.
> 
> or click here:
>   
>mailto:php-general-sc.1035821609.gbjkedmpoiiddgejfcmf-stephenpurkiss=btopenworld.com@;lists.php.net
> 
> This confirmation serves two purposes. First, it verifies that I am able
> to get mail through to you. Second, it protects you in case someone
> forges a subscription request in your name.
> 
> Some mail programs are broken and cannot handle long addresses. If you
> cannot reply to this request, instead send a message to
> <[EMAIL PROTECTED]> and put the
> entire address listed above into the "Subject:" line.
> 
> 
> --- Administrative commands for the php-general list ---
> 
> I can handle administrative requests automatically. Please
> do not send them to the list address! Instead, send
> your message to the correct command address:
> 
> For help and a description of available commands, send a message to:
><[EMAIL PROTECTED]>
> 
> To subscribe to the list, send a message to:
><[EMAIL PROTECTED]>
> 
> To remove your address from the list, just send a message to
> the address in the ``List-Unsubscribe'' header of any list
> message. If you haven't changed addresses since subscribing,
> you can also send a message to:
><[EMAIL PROTECTED]>
> 
> or for the digest to:
><[EMAIL PROTECTED]>
> 
> For addition or removal of addresses, I'll send a confirmation
> message to that address. When you receive it, simply reply to it
> to complete the transaction.
> 
> If you need to get in touch with the human owner of this list,
> please send a message to:
> 
> <[EMAIL PROTECTED]>
> 
> Please include a FORWARDED list message with ALL HEADERS intact
> to make it easier to help you.
> 
> --- Enclosed is a copy of the request I received.
> 
> Return-Path: <[EMAIL PROTECTED]>
> Received: (qmail 48913 invoked from network); 28 Oct 2002 16:13:29 -
> Received: from unknown (HELO php.net) (64.246.30.37)
>   by pb1.pair.com with SMTP; 28 Oct 2002 16:13:29 -
> Received: (qmail 9903 invoked by uid 99); 28 Oct 2002 16:10:05 -
> Date: 28 Oct 2002 16:10:05 -
> Message-ID: <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Website Subscription
> From: [EMAIL PROTECTED]
> 
> 
> This was a request generated from the form at http://php.net/mailing-lists.php by 
>213.122.67.155.


-- 
Steve Purkiss
Freelance Net Strategist and Developer
http://www.purkiss.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: confirm subscribe to php-general@lists.php.net

2002-10-28 Thread Steve Purkiss
Whoops! Sorry about that. Hello everyone

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] How to pass data without headers

2002-10-28 Thread Drew Kime
I've used the example function in the 08 Jul 200 user note at 
http://www.php.net/manual/en/ref.sockets.php and have a problem with the 
headers.  The '$buf' value includes the headers sent by 'search.php'. 
When I echo it, the server first sends the headers, then it echos the 
contents of '$buf' which includes another set of headers, which get 
displayed to the page.

Is this a configuration issue, or am I missing a step?

Thanks for any help
Drew


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Free compiler for Win

2002-10-28 Thread Maxim Maletsky

PHP is ANSI compliant, thus, theoretically, any compiler should be able
to build it.  Though, MS Visual Studio 6 is the one used for PHP windows
version.  That's not free.


--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



Marcello Lupo <[EMAIL PROTECTED]> wrote... :

> Hi to all,
> anyone know a good free complier for win 2000/NT to compile PHP and so on?
> thanks,
> Bye
> MArselo
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How to pass data without headers

2002-10-28 Thread Chris Shiflett
You can use the explode() function to separate the content part of the 
response, which is what you're interested in.

Here's a similar example that only returns the content:

http://shiflett.org/tutorials/php_post.txt

Drew Kime wrote:

I've used the example function in the 08 Jul 200 user note at 
http://www.php.net/manual/en/ref.sockets.php and have a problem with 
the headers.  The '$buf' value includes the headers sent by 
'search.php'. When I echo it, the server first sends the headers, then 
it echos the contents of '$buf' which includes another set of headers, 
which get displayed to the page.

Is this a configuration issue, or am I missing a step?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Get HTML data from an URL

2002-10-28 Thread Francisco Vaucher
Hi people,
 
I need to know if there is a way to get HTML data from an URL.
 
i.e.

I need to get to stock values from the page of wall street. So I think that
I can use some code to connect to that URL and get the data. It's this
possibly ?
 
Regards, and thanks in advance!
 
f.



[PHP] for??????

2002-10-28 Thread Bsantos PHP
Hi people:

Can anybody help me with this? :

I've got a query in a table:

$result = mysql_query("SELECT username, email FROM users");

which should bring about 300 lines (each for an user).

Now, I've created a funtion which controls how many fields (cols) may be
seen by user. Some like this:


function select_query ($fields, $table) {
$result = ("SELECT $fileds FROM $table");
}

Well, I hould like to control how many fields my query will use.

For example: if I call select_query('id,username,email', 'users');

I want to know that there was selected 3 cols. so I can later do some like
this:

for ($j=0;$j<$number_of_selected_cols_minus_one;$j++) {
echo"$list[$j]";

... and that's it. By the way!! Is this late statement correct?!?!


Thanks a lot to anyone that can help me, cheers,



bsantos




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Get HTML data from an URL

2002-10-28 Thread Foldenyi Tamas
> I need to know if there is a way to get HTML data from an URL.

http://www.php.net/manual/en/function.fopen.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] for??????

2002-10-28 Thread Martin Hudec
Hello Bsantos,

BP> Now, I've created a funtion which controls how many fields (cols) may be
BP> seen by user. Some like this:

BP> function select_query ($fields, $table) {
BP> $result = ("SELECT $fileds FROM $table");
BP> }

maybe mistype in SELECT fileds should be fieldsalso try using
select_query() without that space between...i suppose you will
have something like select_query("email,name","userlist")

BP> Well, I hould like to control how many fields my query will use.

for example you will want first ten fields...then add
to query LIMIT 0,10 (it will start from first field, and it will
select ten fields)

BP> For example: if I call select_query('id,username,email', 'users');

BP> I want to know that there was selected 3 cols. so I can later do some like
BP> this:

well three cols are not difficult...just from what position u want to
have them (see LIMIT above)...

BP> for ($j=0;$j<$number_of_selected_cols_minus_one;$j++) {
BP> echo"$list[$j]";

BP> ... and that's it. By the way!! Is this late statement correct?!?!

to this for statement...why are you doing minus one?...for example if
you have 10 selected cols...it will do that echo ten times for each
$jnot nine as in your original statement...you will have one $j
extra...

okay hope it helps for now

-- 
Best regards,
 Martinmailto:corwin@;corwin.sk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Get HTML data from an URL

2002-10-28 Thread Francisco Vaucher
Hi again,

fopen() works but I'm still having problems. I need to get the text posted
by a Dynamic Page. (ie. http://www.test.com/test.php?newsID=2 )

This page give some sort of data like Exchange Values and others.

So I need a function that can retrieve this info.

Any help ??

Regards,

f.


-Mensaje original-
De: Foldenyi Tamas [mailto:ftomi@;1982.hu]
Enviado el: lunes, 28 de octubre de 2002 14:26
Para: Francisco Vaucher
CC: [EMAIL PROTECTED]
Asunto: Re: [PHP] Get HTML data from an URL


> I need to know if there is a way to get HTML data from an URL.

http://www.php.net/manual/en/function.fopen.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] for??????

2002-10-28 Thread John W. Holmes
> Now, I've created a funtion which controls how many fields (cols) may
be
> seen by user. Some like this:
> 
> 
> function select_query ($fields, $table) {
> $result = ("SELECT $fileds FROM $table");
> }
> 
> Well, I hould like to control how many fields my query will use.
> 
> For example: if I call select_query('id,username,email', 'users');

$num_fields = count(explode(',',$passed_fields_string));

or

$num_fields = mysql_num_fields($result_set);

---John Holmes...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re[2]: [PHP] for??????

2002-10-28 Thread Martin Hudec
Hello John,

  ohim really tired then...should go home ;)))than that
  $fields should do the work$fields="id,name,email"; for
  example.:))) and to count how many fields are u using...i
  think array should do the trickyou can count it then how
  many fields it hasbut...maybe i am writing stupid things..i
  really need to go home ;))) okay...


-- 
Best regards,
 Martinmailto:corwin@;corwin.sk

Monday, October 28, 2002, 6:45:15 PM, you wrote:

JWH> He's talking columns, not rows. LIMIT is for rows.

JWH> John

>> -Original Message-
>> From: Martin Hudec [mailto:corwin@;corwin.sk]
>> Sent: Monday, October 28, 2002 12:38 PM
>> To: Bsantos PHP
>> Cc: [EMAIL PROTECTED]
>> Subject: Re: [PHP] for??
>> 
>> Hello Bsantos,
>> 
>> BP> Now, I've created a funtion which controls how many fields (cols)
JWH> may
>> be
>> BP> seen by user. Some like this:
>> 
>> BP> function select_query ($fields, $table) {
>> BP> $result = ("SELECT $fileds FROM $table");
>> BP> }
>> 
>> maybe mistype in SELECT fileds should be fieldsalso try using
>> select_query() without that space between...i suppose you will
>> have something like select_query("email,name","userlist")
>> 
>> BP> Well, I hould like to control how many fields my query will use.
>> 
>> for example you will want first ten fields...then add
>> to query LIMIT 0,10 (it will start from first field, and it will
>> select ten fields)
>> 
>> BP> For example: if I call select_query('id,username,email', 'users');
>> 
>> BP> I want to know that there was selected 3 cols. so I can later do
JWH> some
>> like
>> BP> this:
>> 
>> well three cols are not difficult...just from what position u want to
>> have them (see LIMIT above)...
>> 
>> BP> for ($j=0;$j<$number_of_selected_cols_minus_one;$j++) {
>> BP> echo"$list[$j]";
>> 
>> BP> ... and that's it. By the way!! Is this late statement correct?!?!
>> 
>> to this for statement...why are you doing minus one?...for example if
>> you have 10 selected cols...it will do that echo ten times for each
>> $jnot nine as in your original statement...you will have one $j
>> extra...
>> 
>> okay hope it helps for now
>> 
>> --
>> Best regards,
>>  Martinmailto:corwin@;corwin.sk
>> 
>> 
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] 4.3.0pre2 Mcrypt Compile failure

2002-10-28 Thread Mitch Vincent
OS 10.2.1 - Latest libmcrypt.

Seems to have something to do with compatibility with older mcrypt 
libs, but even after some hacking I couldn't get it to work right...

gcc  -Iext/mcrypt/ -I/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/ 
-DPHP_ATOM_INC -I/Users/mitch/desktop/php-4.3.0pre2/include 
-I/Users/mitch/desktop/php-4.3.0pre2/main 
-I/Users/mitch/desktop/php-4.3.0pre2 
-I/Users/mitch/desktop/php-4.3.0pre2/Zend -I/usr/local/include 
-I/usr/local/pgsql/include 
-I/Users/mitch/desktop/php-4.3.0pre2/ext/xml/expat  -no-cpp-precomp 
-no-cpp-precomp -I/Users/mitch/desktop/php-4.3.0pre2/TSRM  -g -O2  -c 
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c -o 
ext/mcrypt/mcrypt.o  && echo > ext/mcrypt/mcrypt.lo
cc1: warning: changing search order for system directory 
"/usr/local/include"
cc1: warning:   as it has already been specified as a non-system 
directory
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:222:1: warning: 
"MCRYPT_FAILED" redefined
In file included from 
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:34:
/usr/local/include/mcrypt.h:30:1: warning: this is the location of the 
previous definition
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c: In function 
`zm_startup_mcrypt':
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:272: warning: 
passing arg 3 of `zend_register_long_constant' makes integer from 
pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:273: warning: 
passing arg 3 of `zend_register_long_constant' makes integer from 
pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:274: 
`MCRYPT_BLOWFISH_128' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:274: (Each 
undeclared identifier is reported only once
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:274: for each 
function it appears in.)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:275: 
`MCRYPT_BLOWFISH_192' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:276: 
`MCRYPT_BLOWFISH_256' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:277: 
`MCRYPT_BLOWFISH_448' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:278: warning: 
passing arg 3 of `zend_register_long_constant' makes integer from 
pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:279: warning: 
passing arg 3 of `zend_register_long_constant' makes integer from 
pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:280: warning: 
passing arg 3 of `zend_register_long_constant' makes integer from 
pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:281: warning: 
passing arg 3 of `zend_register_long_constant' makes integer from 
pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:282: 
`MCRYPT_IDEA' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:283: warning: 
passing arg 3 of `zend_register_long_constant' makes integer from 
pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:284: warning: 
passing arg 3 of `zend_register_long_constant' makes integer from 
pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:285: warning: 
passing arg 3 of `zend_register_long_constant' makes integer from 
pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:286: warning: 
passing arg 3 of `zend_register_long_constant' makes integer from 
pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:287: 
`MCRYPT_RC2_128' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:288: 
`MCRYPT_RC2_256' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:289: 
`MCRYPT_RC2_1024' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:290: 
`MCRYPT_RC4' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:291: 
`MCRYPT_RC6_128' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:292: 
`MCRYPT_RC6_192' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:293: 
`MCRYPT_RC6_256' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:294: 
`MCRYPT_SAFER_64' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:295: 
`MCRYPT_SAFER_128' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:296: warning: 
passing arg 3 of `zend_register_long_constant' makes integer from 
pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:297: 
`MCRYPT_SERPENT_128' undeclared (first use in this function)
/U

[PHP] ereg_replace???

2002-10-28 Thread Shawn McKenzie
I need to replace all NON alpha-numeric characters in a string.

Example:
   input:  "-What's Up Doc?"
   output: "WhatsUpDoc"

I received this in a previous post, but it doesn't work:
   $str = ereg_replace("/[^[:alnum:]]/i", '', $str);

Thanks!
Shawn



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Free compiler for Win

2002-10-28 Thread Shawn McKenzie
There is a GNU gcc compiler for windows.

-Shawn

"Marcello Lupo" <[EMAIL PROTECTED]> wrote in message
news:0210281543120J.00435@;hunters...
> Hi to all,
> anyone know a good free complier for win 2000/NT to compile PHP and so on?
> thanks,
> Bye
> MArselo



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] ereg_replace???

2002-10-28 Thread John W. Holmes
> I need to replace all NON alpha-numeric characters in a string.
> 
> Example:
>input:  "-What's Up Doc?"
>output: "WhatsUpDoc"
> 
> I received this in a previous post, but it doesn't work:
>$str = ereg_replace("/[^[:alnum:]]/i", '', $str);

Use preg_replace() with that string, not ereg_replace().

---John Holmes...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Get HTML data from an URL

2002-10-28 Thread John W. Holmes
> fopen() works but I'm still having problems. I need to get the text
posted
> by a Dynamic Page. (ie. http://www.test.com/test.php?newsID=2 )

I'm no genius, but how about
fopen('http://www.test.com/test.php?newsID=2','r') 

How about trying a few things before you post.

---John Holmes...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] for??????

2002-10-28 Thread SHEETS,JASON (HP-Boise,ex1)
I believe there is some confusion between columns (fields) and rows.  LIMIT
is generally used to limit the returned rows, not fields.  If you want only
specific columns then select only the ones you want "SELECT
id,firstname,lastname,login FROM users ORDER BY lastname,firstname".

Jason

-Original Message-
From: Martin Hudec [mailto:corwin@;corwin.sk] 
Sent: Monday, October 28, 2002 10:38 AM
To: Bsantos PHP
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] for??

Hello Bsantos,

BP> Now, I've created a funtion which controls how many fields (cols) may be
BP> seen by user. Some like this:

BP> function select_query ($fields, $table) {
BP> $result = ("SELECT $fileds FROM $table");
BP> }

maybe mistype in SELECT fileds should be fieldsalso try using
select_query() without that space between...i suppose you will
have something like select_query("email,name","userlist")

BP> Well, I hould like to control how many fields my query will use.

for example you will want first ten fields...then add
to query LIMIT 0,10 (it will start from first field, and it will
select ten fields)

BP> For example: if I call select_query('id,username,email', 'users');

BP> I want to know that there was selected 3 cols. so I can later do some
like
BP> this:

well three cols are not difficult...just from what position u want to
have them (see LIMIT above)...

BP> for ($j=0;$j<$number_of_selected_cols_minus_one;$j++) {
BP> echo"$list[$j]";

BP> ... and that's it. By the way!! Is this late statement correct?!?!

to this for statement...why are you doing minus one?...for example if
you have 10 selected cols...it will do that echo ten times for each
$jnot nine as in your original statement...you will have one $j
extra...

okay hope it helps for now

-- 
Best regards,
 Martinmailto:corwin@;corwin.sk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




  1   2   >