Re: [PHP] Delete files older than X seconds.

2001-08-31 Thread


From: Julio Nobrega Trabalhando <[EMAIL PROTECTED]>
Date: Thu, Aug 30, 2001 at 12:56:38PM -0300
Message-ID: <[EMAIL PROTECTED]>
Subject: [PHP] Delete files older than X seconds.

>   Hi All,
> 
>   Another doubt. How can I delete files older than X seconds from a given
> folder?
> 
>   At the on-line manual I could only find a contributed note about 'discover
> time of last modification' from a file under a folder.
> 
>   Any help is appreciated.
> 
> --
> 
> Julio Nobrega
> 
> A hora está chegando:
> http://toca.sourceforge.net





I don't exactly see any problem here. If you want files older than X
seconds, and you have a modification time... Then you can unlink()
them can't you?!
I think you pretty much found the solution yourself. But just in
case... Take a look at the following manual pages and create a
construction with them. I think these are all you need.

http://www.php.net/manual/en/function.opendir.php
http://www.php.net/manual/en/function.readdir.php
http://www.php.net/manual/en/function.closedir.php
(in order to scan your directory)

http://www.php.net/manual/en/function.stat.php
(in order to get the modification time)

Hope this helps... And if this wasn't the problem... Tell me/us!



-- 

* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] help with strings...

2001-08-31 Thread Stig-Ørjan Smelror

Hei all.

I've got this string, $string = "test"; and I want to make a $t; out of 
$string.
Is this possible?

I tried ${substr($string, 0, 1)}, but that didn't work ;)


Any help appreciated.


TIA.
-- 
Stig-Ørjan Smelror
Systemutvikler

Linux Communications AS
Sandakerveien 48b
Box 1801 - Vika
N-0123 Oslo, Norway

tel. +47 22 09 28 80
fax. +47 22 09 28 81
http://www.lincom.no/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem with microtime()

2001-08-31 Thread Rosen

Hi,
I'm using the following code:
for ($i = 0; $i < 100; $i++) {
$k = (int) microtime();
echo "$k";

for ($j = 0; $j < 1; $j++)
$m = $j *3;
}


but it prints  me only "0.."



Where can be problem ?



Thanks,

Rosen








-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Is there anything in here that could be considered a parse error?

2001-08-31 Thread


From: John Meyer <[EMAIL PROTECTED]>
Date: Thu, Aug 30, 2001 at 03:49:57PM -0700
Message-ID: <[EMAIL PROTECTED]>
Subject: [PHP] Is there anything in here that could be considered a parse error?

> 1 if (empty($DidSurvey[$p_surveyid])) {
> 2   if (is_array($p_answers)){
> 3 foreach($p_answers as $value) {
> 4   $sql = "INSERT INTO RESULTS(SURVEY_ID, ANSWER_ID) VALUES(" . $p_surveyid . 
>"," . $value . ");";
> 5   mysql_query($sql);
> 6 }
> 7  else {





Take a look yourself... Pretty obvious isn't it?!
There's some code missing! At least... well... It's not right.
You either don't close your foreach() loop which starts at line 3,
or you don't close the if() loop which starts at line 2, and you
definitely don't close the if() loop which starts at line 1.
You probably mean something like:

1 if (empty($DidSurvey[$p_surveyid])) {
2   if (is_array($p_answers)){
3 foreach($p_answers as $value) {
4   $sql = "INSERT INTO RESULTS(SURVEY_ID, ANSWER_ID) VALUES(" . $p_surveyid . "," 
. $value . ");";
5   mysql_query($sql);
6 }
7   }
8 } else {
etc.



-- 

* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Problem with microtime()

2001-08-31 Thread Lawrence . Sheed


You are casting microtimes results as an integer value.  It isn't an integer
value, hence the 0. 


>From the manual It returns the string  the string "msec sec" where sec is
the current time measured in the number of seconds since the Unix Epoch
(0:00:00 January 1, 1970 GMT), and msec is the microseconds part. This
function is only available on operating systems that support the
gettimeofday() system call. 


Try:

for ($i = 0; $i < 100; $i++) {
$k = microtime();
echo "$k";

for ($j = 0; $j < 1; $j++)
$m = $j *3;
}

Or look in the http://www.php.net/manual/en/function.microtime.php for
examples.

-Original Message-
From: Rosen [mailto:[EMAIL PROTECTED]]
Sent: August 31, 2001 3:29 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Problem with microtime()


Hi,
I'm using the following code:
for ($i = 0; $i < 100; $i++) {
$k = (int) microtime();
echo "$k";

for ($j = 0; $j < 1; $j++)
$m = $j *3;
}


but it prints  me only "0.."



Where can be problem ?



Thanks,

Rosen








-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Refreshing php.ini without restart...

2001-08-31 Thread Gerard Samuel

I can only speak for apache...

==>  apachectl graceful



Raphael Pirker wrote:
> Hi,
> 
> i just moved my PHP project from my local PC to the online webserver and I
> will need to do a few adjustments to the server. since the server is used by
> all the employees in the company, there is no chance I can reboot it without
> prior notice... my question: is there any way I can refresh the changes I
> make in php.ini without doing a reboot?
> 
> TIA,
> 
> Raphael
> 
> 
> 
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problem with microtime()

2001-08-31 Thread Andrey Hristov

";
echo $b;
?>

Produces :
123
123

So I don't think that the problem is how PHP makes the casting but the algorithm is 
useless. Do that :
$ar=explode(' ',microtime());
$a=$ar[1]+$ar[0];


Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS



- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 10:42 AM
Subject: RE: [PHP] Problem with microtime()


> 
> You are casting microtimes results as an integer value.  It isn't an integer
> value, hence the 0. 
> 
> 
> From the manual It returns the string  the string "msec sec" where sec is
> the current time measured in the number of seconds since the Unix Epoch
> (0:00:00 January 1, 1970 GMT), and msec is the microseconds part. This
> function is only available on operating systems that support the
> gettimeofday() system call. 
> 
> 
> Try:
> 
> for ($i = 0; $i < 100; $i++) {
> $k = microtime();
> echo "$k";
> 
> for ($j = 0; $j < 1; $j++)
> $m = $j *3;
> }
> 
> Or look in the http://www.php.net/manual/en/function.microtime.php for
> examples.
> 
> -Original Message-
> From: Rosen [mailto:[EMAIL PROTECTED]]
> Sent: August 31, 2001 3:29 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Problem with microtime()
> 
> 
> Hi,
> I'm using the following code:
> for ($i = 0; $i < 100; $i++) {
> $k = (int) microtime();
> echo "$k";
> 
> for ($j = 0; $j < 1; $j++)
> $m = $j *3;
> }
> 
> 
> but it prints  me only "0.."
> 
> 
> 
> Where can be problem ?
> 
> 
> 
> Thanks,
> 
> Rosen
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Problem with microtime()

2001-08-31 Thread _lallous

string microtime(void);

you see? you're casting from a string to int by your code:
(int) microtime();

you can do: $k = microtime() w/o the (int)

"Rosen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
> I'm using the following code:
> for ($i = 0; $i < 100; $i++) {
> $k = (int) microtime();
> echo "$k";
>
> for ($j = 0; $j < 1; $j++)
> $m = $j *3;
> }
>
>
> but it prints  me only "0.."
>
>
>
> Where can be problem ?
>
>
>
> Thanks,
>
> Rosen
>
>
>
>
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] determining the pixel width of a string

2001-08-31 Thread _lallous

It also depends on the font!
it might be a fixed font or not a fixed font!

"Don Read" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> On 30-Aug-2001 John Meyer wrote:
> > Is there anyway to determine the pixel width of a string?
> >
>
> $font=2;
> $strpx=imagefontwidth($font) * strlen($str);
>
> Regards,
> --
> Don Read   [EMAIL PROTECTED]
> -- It's always darkest before the dawn. So if you are going to
>steal the neighbor's newspaper, that's the time to do it.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] help !

2001-08-31 Thread Nikola Veber

I'm sorry I have to ask these stuff, but I havent found anything like 
this in the manual.
I am running win98 with properly insalled xitami web server with php 
support (I ran installshield). Any way, I cant figure out hov to make 
a smple program with echo command, because I don't know where to 
place the code. I am using opera 5.12 as my default browser, and 
Macromedia Dreamweaver as the html editor. Maybe there is an 
option in Dreamweaver , but I couldn't find it in it's documentation

Please help !

Nikola Veber





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] begginer needs help

2001-08-31 Thread Ralph Guzman

If you choose to install Apache/PHP and perhaps even mySQL and you want to
avoid downloading each individually, then configuring them to work together.
You can download at straight-forward easy installation distribution that
includes all three. Check out Nu-Sphere, and download one of their free
distributions.

http://www.nusphere.com/

Hope this helps.

-Original Message-
From: Nikola Veber [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 30, 2001 11:19 AM
To: php forum
Subject: [PHP] begginer needs help
Importance: High

I have been doing some amateur web-design by now, but I decided to learn
something like php. I was wondering if there is a way to test php code
without a
server(on local computer).

Thanx in advance

Nikola Veber



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problem with microtime()

2001-08-31 Thread Rosen

Hi,
The problem is, thath I want to generate random number between 1 and 1

How can I do it ?

Thanks,
Rosen


"Lawrence Sheed" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
...
>
> You are casting microtimes results as an integer value.  It isn't an
integer
> value, hence the 0.
>
>
> From the manual It returns the string  the string "msec sec" where sec is
> the current time measured in the number of seconds since the Unix Epoch
> (0:00:00 January 1, 1970 GMT), and msec is the microseconds part. This
> function is only available on operating systems that support the
> gettimeofday() system call.
>
>
> Try:
>
> for ($i = 0; $i < 100; $i++) {
> $k = microtime();
> echo "$k";
>
> for ($j = 0; $j < 1; $j++)
> $m = $j *3;
> }
>
> Or look in the http://www.php.net/manual/en/function.microtime.php for
> examples.
>
> -Original Message-
> From: Rosen [mailto:[EMAIL PROTECTED]]
> Sent: August 31, 2001 3:29 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Problem with microtime()
>
>
> Hi,
> I'm using the following code:
> for ($i = 0; $i < 100; $i++) {
> $k = (int) microtime();
> echo "$k";
>
> for ($j = 0; $j < 1; $j++)
> $m = $j *3;
> }
>
>
> but it prints  me only "0.."
>
>
>
> Where can be problem ?
>
>
>
> Thanks,
>
> Rosen
>
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] determining the pixel width of a string

2001-08-31 Thread Don Read


On 31-Aug-2001 _lallous wrote:
> It also depends on the font!
> it might be a fixed font or not a fixed font!
> 

True, but the five installed GD fonts are fixed cell fonts.

> "Don Read" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>>
>> On 30-Aug-2001 John Meyer wrote:
>> > Is there anyway to determine the pixel width of a string?
>> >
>>
>> $font=2;
>> $strpx=imagefontwidth($font) * strlen($str);
>>
>> Regards,
>> --
>> Don Read   [EMAIL PROTECTED]
>> -- It's always darkest before the dawn. So if you are going to
>>steal the neighbor's newspaper, that's the time to do it.
> 
> 

-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] help !

2001-08-31 Thread Jon Haworth

Hi Nikola,

You need to add your PHP code to your HTML. I'm sure Dreamweaver allows you
to edit the HTML directly, but I don't know how I'm afraid. To check
everything's up and running, open Notepad (should be under
Start>Programs>Accessories) and paste this in:

---start---



  Test PHP page


  Hello world!";
  ?>



end

If this works, then congratulations - you've just used echo()

If not, give us a shout and someone will help you out :-)

Cheers
Jon


-Original Message-
From: Nikola Veber [mailto:[EMAIL PROTECTED]]
Sent: 31 August 2001 08:59
To: [EMAIL PROTECTED]
Subject: [PHP] help !
Importance: High


I'm sorry I have to ask these stuff, but I havent found anything like 
this in the manual.
I am running win98 with properly insalled xitami web server with php 
support (I ran installshield). Any way, I cant figure out hov to make 
a smple program with echo command, because I don't know where to 
place the code. I am using opera 5.12 as my default browser, and 
Macromedia Dreamweaver as the html editor. Maybe there is an 
option in Dreamweaver , but I couldn't find it in it's documentation

Please help !

Nikola Veber





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] base64_decode problem.

2001-08-31 Thread Johan Vikerskog (ECS)

Hi all.

I have this variable cn$
which sometimes is in base64 format and sometimes it isnt.
This is how the script looks like. It will get bigger but this is one of the problem i 
have to get threw first.

If you wonder why i dont use the built in ldap function in PHP i just can tell you 
that i want to. The compilation doesnt work and i have talked to several OpanLdap 
persons. So ignore that for now.
The problem below is that ldaps $cn is sometimes in base64 format and if it is i need 
to decode it.
I have no problem decoding it my problem is that i need to make it somehow "know" if 
it is in that format or not.
Thankfull for any help.

//Johan




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] help !

2001-08-31 Thread CC Zona

In article <67DF9B67CEFAD4119E4200D0B720FA3F70FCBC@BOOTROS>,
 [EMAIL PROTECTED] (Jon Haworth) wrote:

> You need to add your PHP code to your HTML. I'm sure Dreamweaver allows you
> to edit the HTML directly, but I don't know how I'm afraid. 

Yep, just use DW's "HTML Source" view (or open in Homesite) to edit files 
directly.

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] just 10 characters from a string

2001-08-31 Thread Marcos Lloret

hi to all,
i have a long string (about 255 characters) and i would like to show only 10. how 
can i do it?

thanks in advance,

marcos



[PHP] 2 General MySQL Questions

2001-08-31 Thread Tom Churm

hi,  

i'm awared that this is not exactly the correct forum for these
questions.  please humor me this one time: 

1) can anyone refer me please to a public, postable MySQL newsgroup? 
i've found a few MySQL newsgroups, but none of them allows posting.  it
would be great if you could also tell me the name of the (public)
newsgroup server hosting the group. 

if you don't know of a newsgroup, how about a good (digest-capable)
mailing list? i've tried the MySQL general mailing list, but they don't
offer a 'digest' option and i can't handle getting hundreds of posts a
day in my inbox.

2) who can refer me to a good intermediate tutorial to better learn
MySQL syntax?  again, i've been to mysql.com, but i find the structure &
format of the site somehow daunting (not as user-friendly as the
annotated manual at php.net).

thanks muchly,

tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: just 10 characters from a string

2001-08-31 Thread James Holloway

Hi Marcos,

use substr();

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

$string = substr($string, 0, 10);

James


"Marcos Lloret" <[EMAIL PROTECTED]> wrote in message
019701c131f1$f57bdfa0$371c94c1@mlloret">news:019701c131f1$f57bdfa0$371c94c1@mlloret...
hi to all,
i have a long string (about 255 characters) and i would like to show
only 10. how can i do it?

thanks in advance,

marcos




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] just 10 characters from a string

2001-08-31 Thread Johan Vikerskog (ECS)

$string=abcdefghijklmnopqrstuvxyz
$string = substr($string, 0, 10);

Thats all there is to it.

-Original Message-
From: Marcos Lloret [mailto:[EMAIL PROTECTED]]
Sent: den 31 augusti 2001 09:53
To: [EMAIL PROTECTED]
Subject: [PHP] just 10 characters from a string 


hi to all,
i have a long string (about 255 characters) and i would like to show only 10. how 
can i do it?

thanks in advance,

marcos

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Chat / IRC

2001-08-31 Thread ERISEN, Mehmet Kamil

HEllo,
Did anybody have a luck with a good Chat Program.?
Thanks,
Mehmet.

=
Mehmet Erisen
http://www.erisen.com

__
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] assosiative array in php

2001-08-31 Thread Kiat Kin

how to insert the new key/value pair into assiosiative array in php.

TIA,
Kiat Kin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] 2 General MySQL Questions

2001-08-31 Thread Jon Haworth

> 1) can anyone refer me please to a public, postable MySQL newsgroup? 
> i've found a few MySQL newsgroups, but none of them allows posting.  it
> would be great if you could also tell me the name of the (public)
> newsgroup server hosting the group. 
> 

Not sure, but a hunt around on groups.google.com might well reveal
something.

> 2) who can refer me to a good intermediate tutorial to better learn
> MySQL syntax?  again, i've been to mysql.com, but i find the structure &
> format of the site somehow daunting (not as user-friendly as the
> annotated manual at php.net).

Agree about the format of the site :-)

IMHO the best tutorial for MySQL is Paul Dubois' book "MySQL", published by
New Riders, which you can grab from amazon or b&n or wherever you 
usually buy these sorts of things. Takes you from beginner through to funky
advanced stuff painlessly and clearly. Highly recommended.

HTH
Jon


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] just 10 characters from a string

2001-08-31 Thread


From: Marcos Lloret <[EMAIL PROTECTED]>
Date: Fri, Aug 31, 2001 at 09:53:01AM +0200
Message-ID: <019701c131f1$f57bdfa0$371c94c1@mlloret>
Subject: [PHP] just 10 characters from a string

> hi to all,
> i have a long string (about 255 characters) and i would like to show only 10. 
>how can i do it?
> 
> thanks in advance,
> 
> marcos





When it's about _showing_ 10 characters, and not to change the
string itself:

$yourString = "abcdefghijklmnopqrstuvwxyz";
printf ("%.10s", $yourString);



-- 

* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] assosiative array in php

2001-08-31 Thread Andrey Hristov

$ar_name[$new_key]=$value;

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS


- Original Message - 
From: "Kiat Kin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 12:35 PM
Subject: [PHP] assosiative array in php


> how to insert the new key/value pair into assiosiative array in php.
> 
> TIA,
> Kiat Kin
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 2 General MySQL Questions

2001-08-31 Thread B. van Ouwerkerk


>i'm awared that this is not exactly the correct forum for these
>questions.  please humor me this one time:

Hmmm.

>if you don't know of a newsgroup, how about a good (digest-capable)
>mailing list? i've tried the MySQL general mailing list, but they don't
>offer a 'digest' option and i can't handle getting hundreds of posts a
>day in my inbox.

Try the list found at www.mysql.com it's archive:http://lists.mysql.com/
Don't forget to check the archive before you post.. Dunno if it's 
digest-capable.. you need to find that one out on your own.

>2) who can refer me to a good intermediate tutorial to better learn
>MySQL syntax?  again, i've been to mysql.com, but i find the structure &
>format of the site somehow daunting (not as user-friendly as the
>annotated manual at php.net).

www.devshed.com has some good tutorials. Otherwise you could use a 
searchengine and type some words like: mysql tutorial
Should help..

The book MySQL written by Paul DuBois is great..

Bye,


B.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] header,session stuff works on live fails on dev...?

2001-08-31 Thread Nic Skitt

Hi all,

I am still failing to fix this problem with headers. I receive the following
error:

Warning: Cannot add header information - headers already sent by (output
started at c:\apache\apache\htdocs\client-secure.php:11) in
c:\apache\apache\htdocs\client-secure.php on line 18

Which would indicate that the line 11 is sending output to the browser. Line
11 is:

$uid=$HTTP_SESSION_VARS["userid"];

How can this be sending an output? I also get this:

Warning: Undefined index: userid in
c:\apache\apache\htdocs\client-secure.php on line 11

Which would indicate that it cant find the session info. If it cant find it
does it write it?

This is not an isolated case. This problem is happening in a few areas of
the system yet on the live server everything works a dream!!??

Anyone any ideas?

Cheers

Nic



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Whacky WGET issue...

2001-08-31 Thread Peter Clarke


"Sondra Russell" <[EMAIL PROTECTED]> wrote in message
news:p05100303b7b4263f844e@[212.43.200.227]...
> Hello everyone!
>
> Crazy question:
>
> I've created a little script that reads in .txt files and, with the
> help of phplib templates, matches them up with a collection of
> templates and spits out the beautiful html page.
>
> In order to avoid sending variables through the URL I've stolen this
> bizarre workaround where, when you call
> http://www.mysite.com/somepage.html for example, the apache
> configuration realizes it's a 404 and redirects all 404s through my
> cms script.  Then my script looks for
> http://www.mysite.com/somepage.txt and does the rest.
>
> This works beautifully, and my plan was to have a "dev" environment
> that runs against the little CMS system and then wget the whole site
> periodically for the live server (so, the live site actually *is* a
> collection of flat pages).
>
> Beautiful plan, but it turns out that WGET doesn't see the apache
> configuration change that runs all 404s through my CMS script.  It
> sees a 404 and tells me its a 404 and then goes back to its coffee
> break, you know?
>
> Anyone else tried this workaround before with similar results?
> Anyone else have a better workaround?  Bueller?
>
> Anyway, best,
> Sondra


Make sure to change the header. The page returned will have all the content
but the header still says "404" this needs to be changed to "200" so that
wget doesn't go off on a coffee break.
Try using:

header ("status: 200 OK");

Peter



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] number to word converter

2001-08-31 Thread Carry Ian

Hello,

can anybody suggest me where could i get a script to convert a integer value to a 
phrase.
for eg. "135" to "One Hundred And Thirty Five"

thanks in advance.

carry



--
Get real solutions to all your problems.

http://www.salahkarindia.com - India's first advisory Portal

Your friend, advisor, healer,companion!!!

Register now  to  get free advice on all your problems.

--


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] header,session stuff works on live fails on dev...?

2001-08-31 Thread Christopher William Wesley

On Fri, 31 Aug 2001, Nic Skitt wrote:

> Warning: Cannot add header information - headers already sent by (output
> started at c:\apache\apache\htdocs\client-secure.php:11) in
> c:\apache\apache\htdocs\client-secure.php on line 18
>
> Which would indicate that the line 11 is sending output to the browser. Line
> 11 is:
>
> $uid=$HTTP_SESSION_VARS["userid"];
>
> How can this be sending an output? I also get this:

The error you get isn't saying that line 11 is sending output;  the error
is saying that output was sent prior to line 11.  You'll get the error if
you have any code that sends output to STDOUT, or if you have any HTML or
even whitespace before your opening PHP tag, and then try to send header
data.  (Once the browser starts getting the data your PHP script sends to
STDOUT and other HTML and spaces, the browser has all the header data its
going to use, and sending more is erroneous.)

> Warning: Undefined index: userid in
> c:\apache\apache\htdocs\client-secure.php on line 11
> Which would indicate that it cant find the session info. If it cant find it
> does it write it?

Make sure you registered userid as a session variable
i.e. - session_register("userid");

And/Or make sure you make a call to session_start() before trying to check
the session variable(s) if you registered the variable in another script
and/or don't have session.auto_start set to 1.

(http://www.php.net/manual/en/ref.session.php)

~Chris   /"\
 \ / Pine Ribbon Campaign
Microsoft Security Specialist X  Against Outlook
The moron in Oxymoron.   / \ http://www.thebackrow.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] session.save_handler = user

2001-08-31 Thread php-jp

Hello!

I have a question regarding sessions when

 register_globals = off

in php.ini

Using the example from www.php.net:



This works well when

   session.save_handler = files

However, when

   session.save_handler = user

where the "user" functions are the ones found on phpbuilder.com.  It
turns out that  the sess_write rountine is NEVER called, ie.
session_registered variables aren't saved.

I thought there was something wrong with the customer-handler but for
debugging purposes,  I took out everything except things like:

function sess_write ($key, string value) {
   echo ( "sess_write was called.");
}

and yet, it was ever called!  Other functions like read, gc, destory
works great.

However, if I change php.ini to

   register_globals = ON

Then the above sess_write function would be called!

Is this a known problem, or am I missing something?

reg.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] session.save_handler = user

2001-08-31 Thread Andrey Hristov

A colegue of mine said to me a month ago that in the routines on phpbuilder.com there 
are one or few bugs. Look at the code. The
problem is in session handlers.

Hope this will help you.


Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS


- Original Message -
From: "php-jp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 1:56 PM
Subject: [PHP] session.save_handler = user


> Hello!
>
> I have a question regarding sessions when
>
>  register_globals = off
>
> in php.ini
>
> Using the example from www.php.net:
>
>  session_register("count");
> $HTTP_SESSION_VARS["count"]++;
> ?>
>
> This works well when
>
>session.save_handler = files
>
> However, when
>
>session.save_handler = user
>
> where the "user" functions are the ones found on phpbuilder.com.  It
> turns out that  the sess_write rountine is NEVER called, ie.
> session_registered variables aren't saved.
>
> I thought there was something wrong with the customer-handler but for
> debugging purposes,  I took out everything except things like:
>
> function sess_write ($key, string value) {
>echo ( "sess_write was called.");
> }
>
> and yet, it was ever called!  Other functions like read, gc, destory
> works great.
>
> However, if I change php.ini to
>
>register_globals = ON
>
> Then the above sess_write function would be called!
>
> Is this a known problem, or am I missing something?
>
> reg.
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] header,session stuff works on live fails on dev...?

2001-08-31 Thread Nic Skitt

Chris,

Thanks, Andrey pointed me in the right direction. It was the error output
that was causing the headers to be sent ergo more errors :-P

Cheers

Nic



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] number to word converter

2001-08-31 Thread


From: Carry Ian <[EMAIL PROTECTED]>
Date: Fri, Aug 31, 2001 at 12:36:20PM +0200
Message-ID: <[EMAIL PROTECTED]>
Subject: [PHP] number to word converter

> Hello,
> 
> can anybody suggest me where could i get a script to convert a integer value to a 
>phrase.
> for eg. "135" to "One Hundred And Thirty Five"
> 
> thanks in advance.
> 
> carry





In some spare time I just created this function. It's prob. far from
optimal, so maybe you'll have to give a look in order to optimize
it. But at least it works.

--- PHP code ---
 2) {
  if ($togo > 3) {
$returnString .= inttoword (substr($x, 0, $togo-3));
$returnString .= " Thousand";
$pos += ($togo-4);
  } else {
if ((integer)substr($x, $pos, 1) > 0) {
  $returnString .= $digit[((integer)substr($x, $pos, 1))-1];
  $returnString .= " Hundred";
  $hundred = true;
}
  }
} elseif ($togo == 2) {
  if ((integer)substr($x, $pos, 1) == 1) {
if ($hundred) $returnString .= "and ";
$returnString .= $digit[((integer)substr($x, $pos, 2))-1];
break;
  } else {
if ((integer)substr($x, $pos, 1) > 0) {
  if ($hundred) $returnString .= "and ";
  $hundred = false;
  $returnString .= $tens[((integer)substr($x, $pos, 1))-2];
}
$pos++;
$returnString .= " ";
if ((integer)substr($x, $pos, 1)) {
  if ($hundred) $returnString .= "and ";
  $returnString .= $digit[((integer)substr($x, $pos, 1))-1];
}
break;
  }
} else {
  if ($hundred) $returnString .= "and ";
  $returnString .= $digit[((integer)substr($x, $pos, 1))-1];
}
  }

  return (preg_replace ("/\s+/", " ",
  preg_replace ("/^\s+/", "", $returnString)));
}

?>




--- End of PHP code ---


Let me know if this is what you're looking for and/or if you have
optimized it.

Good luck!



-- 

* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] number to word converter

2001-08-31 Thread


From: * R&zE: <[EMAIL PROTECTED]>
Date: Fri, Aug 31, 2001 at 02:03:06PM +0200
Message-ID: <[EMAIL PROTECTED]>
Subject: Re: [PHP] number to word converter

Oh... btw... It works uptil 99. So you can convert everything
between 1 and 99. Zero (0) cannot be converted (stupid but true,
and easy to patch in) and everything >= a million will result in
very weird results.

But like I said... it's just a quickly written function and the most
used numbers you can convert.

-- 

* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] HTTP authentication

2001-08-31 Thread Boris

Is there a way to force re-authentication without closing and re-opening the
browser.

Thanks
Boris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] access to the apache environment from the c-client builtinto PHP 4.0.x

2001-08-31 Thread Liam Hoekenga

On Thu, 30 Aug 2001, Rasmus Lerdorf wrote:

> Just do a putenv() from PHP?

We've tried doing that - that's how c-client normally wants to learn about
the krb4 ticket file (with the KRBTKFILE variable).

But... something is caching the KRBTKFILE value in appropriately, and it's
not getting reset each time php is accessed.  We're pretty sure the
problem lies with c-client (probably the krb4 kerberos patches - that it
expect to be called in a single-user kinda situation, such as from pine,
so it doesn't clean up after itself properly).  Rather than rely on
c-client seeing the KRBTKFILE variable, we're trying hard code the name of
the ticketfile into c-client.. which, on our webservers, will *always* be
/ticket/kerb.username (ie /ticket/kerb.liamr)  My post for 8/29 describe
the actualy problem in more detail.

We had gotten around this by running PHP as a CGI - to make it get a fresh
copy of the environment everytime.. but at this point in the game we
really need to run it as a server module.

So, we're trying to correct for this in the source code of the krb4
patches to c-client.. but we can't get the user name into it.

php_imap.c stores the value we want in imap->user, but we can't find it
again once php_imap.c calls c-client itself.  We'd expected it to be in
mb->user, but that variable is empty.. and that little piece of printenv
code we tried shows the c-client knows about the HTTP_ENV_VARS class of
variables, but not the HTTP_SERVER_VARS variables.

Liam

> On Fri, 31 Aug 2001, Liam Hoekenga wrote:
>
> > we're trying to get a krb4 c-client working with php built as an apache
> > server module (either dso or static).
> >
> > we've hit a wall in that, c-client itself seems to have access to the
> > environment in which apache was started, but not the apache environment.
> >
> > ie... we threw this into c-client:
> >
> > {
> > extern char **environ;
> >
> > inti;
> >
> > for ( i = 0; environ[ i ] != NULL; i++ ) {
> > fprintf( stderr, "%s\n", environ[ i ] );
> > }
> > }
> >
> > and the environment that c-client itself can see is:
> > [Fri Aug 31 00:22:19 2001] [info] Server built: Aug 30 2001 12:11:45
> > APACHE=/usr/local/httpsd/bin/httpsd
> > AWK=/usr/bin/awk
> > GREP=/usr/bin/grep
> > HOME=/
> > KRBTKFILE=/ticket/p1090525904
> > PIDFILE=/usr/local/httpsd/log/httpd.pid
> > PS=/usr/bin/ps
> > PWD=/
> > USER=nobody
> >
> > ie - the same stuff phpinfo() lists under HTTP_ENV_VARS.  We really need
> > access to the HTTP_SERVER_VARS (we're revising the krb4 imap patches for
> > c-client, *really* need access to REMOTE_USER from within c-client
> > itself).
> >
> > does anyone have suggestions?
> >
> > Liam
> >
> >
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Refreshing php.ini without restart...

2001-08-31 Thread Miles Thompson

Just restart the web server -- IIS or Apache

Miles


At 02:06 PM 8/31/01 +0800, Raphael Pirker wrote:
>Hi,
>
>i just moved my PHP project from my local PC to the online webserver and I
>will need to do a few adjustments to the server. since the server is used by
>all the employees in the company, there is no chance I can reboot it without
>prior notice... my question: is there any way I can refresh the changes I
>make in php.ini without doing a reboot?
>
>TIA,
>
>Raphael
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] form data used on the same page?

2001-08-31 Thread webmaster

Greetungs.

Is it possible to use data collected in a form ON THE SAME PAGE without
using the form's "submit" button? In other words, if a text field is filled
in, can I capture (via PHP or other means) the info typed there and display
it elsewhere on the same page?

I realize the answer may very well be "NO," but if it is possible, it would
certainly make my life easier this morning.

Thanks in advance.

Kenn



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] form data used on the same page?

2001-08-31 Thread


From: webmaster <[EMAIL PROTECTED]>
Date: Fri, Aug 31, 2001 at 07:46:41AM -0500
Message-ID: <003001c1321a$fb84afc0$[EMAIL PROTECTED]>
Subject: [PHP] form data used on the same page?

> Greetungs.
> 
> Is it possible to use data collected in a form ON THE SAME PAGE without
> using the form's "submit" button? In other words, if a text field is filled
> in, can I capture (via PHP or other means) the info typed there and display
> it elsewhere on the same page?
> 
> I realize the answer may very well be "NO," but if it is possible, it would
> certainly make my life easier this morning.
> 
> Thanks in advance.
> 
> Kenn





JavaScript is your solution!



-- 

* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Directing A Parked Domain To A Sub Directory

2001-08-31 Thread Dave

>I've got a website, we'll call it MainDomain.com.
>
>I created a specialty site in a sub-directory.  We'll call the
>sub-directory Widgets.
>
>I want a different domain to point to that sub directory.  We'll call the
>new domain WidgetWorld.com
>
>My webhost will allow me to park WidgetWorld.com at MainDomain.com.
>However, if someone goes to WidgetWorld.com, it would pull up the index
>page for MainDomain.com.
>
>How can I use PHP to detect if the visitor wanted MainDomain.com (and
>display MainDomain/index.php) or WidgetWorld.com (and then display
>MainDomain/Widgets/index.php).

$HTTP_HOST - not sure if all browsers use this though(read older non 1.1
compliant)

Another question would be why do NamedVirtualHost and have an entry for that
domain point to their directory in your Apache conf file (if using apache).
Otherwise I get teh impression that you would have to wrap every conceivable
page on the sub-directory site in the main directory with the redirect PHP
script...

ie, yes, if I request just the domain name your index page can redirect to a
sub-directory...  however if I request WidgetWorld.com/thispage.php  the
requests will go to MainDomain.com/thispage.php and will return 404 error if it
doesn't exist

follow my concern?

Dave


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Opt-In Request Re: Php-general@lists.php.net

2001-08-31 Thread abundantliving

This is a one-time mailing only. You are receiving this message because you recently 
submitted to one of our websites -- this is simply an attempt to update our files by 
verifying your email address  [EMAIL PROTECTED]  at  206.43.192.76  
*** 

Dear Patron,

By popular request, we have designed a FREE newsletter titled . . .

"Abundant Living Online"

 . . containing information on a wide variety of topics designed to enhance your
experiences both online and offline, including:

=> useful and innovative websites
=> highest-rated homebased businesses
=> incredible travel deals
=> important health & nutrition tips 
=> freebies
=> and much more!

We would like to invite you to subscribe to this FREE newsletter, and
enjoy a free vacation weekend as our thank-you gift. Simply click on the
following link and fill out the form on the website (there are
absolutely NO strings attached):

http://aolms.vacation-4-free.com/abundantliving/

For business questions or comments, we can be reached at:
[EMAIL PROTECTED]

Sincerely, 

Abundant Living

*** 
NOTE: This email is sent in compliance with our strict 
anti-abuse regulations. We are attempting to verify your 
email address. This message is only a request to verify. 
It is not in any way to be construed as a commercial message. 
If you do not wish to receive any mail from our servers, do 
not reply to this email nor click on any of the above links. 
If you wish to have your email address permanently blocked 
from our servers from further verification requests please 
go to http://inetekk.com/abuse.html

Thank you, Abundant Living


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] The future of PHP

2001-08-31 Thread Manuel Lemos

Hello,

Zeev Suraski wrote:
> 
> At 01:40 31-08-01, Manuel Lemos wrote:
> >Whoever hears you may even believe that Microsoft products and
> >supporting sites are successful because they don't have flaws. Sorry,
> >but honestely this sounds like an excuse for not doing it.
> 
> Microsoft chooses which sites it links from microsoft.com *very* carefully
> - a very small select number of sites gets connected to it, and usually
> only for specific purposes (e.g., a specific article).  If you draw a
> comparison to the PHP world, you actually proved my point.

That hasn't much to do what I was saying, but, anyway your are not
linking to anybody in either php.net or zend.com , apart from the links
section and the directory that do not give a big deal of visibility.

 
> >The problem is not PHP-GUI capabilities being able to compete with other
> >languages. The problem is that you seem to be willing to omit them when
> >you present PHP as if it is something you don't want PHP be known for.
> 
> I actually mention PHP-GTK in my sessions.  I mention it as an anecdote,
> much like I mention some of the other interesting modules and projects in
> PHP (e.g., PEAR).  I'm really not sure why people think I'm trying to bury
> PHP-GTK.  Just because I don't see PHP-GTK as a main course of PHP, doesn't
> mean I don't think it's an important and useful project.

Oh, man, do you really do that? That is worse than not mention it at
all. You may be joking but not everybody may understand it that way.
Doing that you ruining the credibility of those efforts that take PHP
far out what originally it was meant for. If you are going to just make
it a joke, you'd better not mention it at all. I think that is extremely
unfair for people like Andrei and other that worked so much on it! :-(

 
> >In this company, they have choose Microsoft stuff because they think it
> >is the right choice for what they do. For some things, PHP could be a
> >better choice, but it would be hard to convince who is in charge above
> >me because PHP does not benefit of a great credibility in the market
> >that would help me to make a good case to switch to PHP.
> 
> In the US (and perhaps in the rest of America), that's relatively
> true.  That's not the case in Europe or the far east.  It has a lot to do
> with mentality and corporate culture.

So, what? Even if it is like you say, because you have this perception
that it is not that way in Europe and far east, you are not going to do
anything to help people living in the Americas to make a better case for
PHP in the corporate world?

Regards,
Manuel Lemos

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Arcadius A.

Thanks  Jack 

arcad.

"Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> you have to use $GLOBALS["SCRIPT_FILENAME"]
>
> jack
>
> "Arcadius A." wrote:
>
> > Hello !
> > Why this script   prints an empty string(it prints nothing) as the
value of
> > the variable "u" ?
> > This happens even if  $REQUEST_URI or PHP_SELF is used instead of
> > SCRIPT_FILENAME .
> > Thanks...
> >
> >  > function menu( $theurl)
> > {
> > //global $u ;
> > $u = $SCRIPT_FILENAME;
> > echo $u;
> > echo $theurl;
> > }
> > ?>
> >
> > Hello there !!!
> >
> > 
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] move_uploaded_file and related question

2001-08-31 Thread ---

but why i should use move_uploaded_file and similar functions instead of a
simple copy command??

which is the security hole related to the use of copy??

At the php site is strongly encouraged the use of these functions, but i
don't know why, where's the problem??


-
Federico Marani
[EMAIL PROTECTED]
-



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] move_uploaded_file and related question

2001-08-31 Thread Andrey Hristov

You have to move or delete your file so it have not te be in the /tmp after your 
script finishes or /tmp will get crowdy.

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS


- Original Message - 
From: "---" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 4:35 PM
Subject: [PHP] move_uploaded_file and related question


> but why i should use move_uploaded_file and similar functions instead of a
> simple copy command??
> 
> which is the security hole related to the use of copy??
> 
> At the php site is strongly encouraged the use of these functions, but i
> don't know why, where's the problem??
> 
> 
> -
> Federico Marani
> [EMAIL PROTECTED]
> -
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] header() + link..

2001-08-31 Thread Ashwin Kutty

Hi,

I thought as much.. And no, dont want to use frames.. Id rather just have the
URL shown in the Location Field..

I do realise, there is no real way to ever hide the URL, however, I just dint
want to make it too obvious for the users to bookmark or pass around to people
who are not authorized to view the page..

However, thanks for the reply..

* R&zE: wrote:

> 
>
> There's actually no good way to achieve it in a different way. You
> could include/require the new page, but that's actually what you
> don't want (Besides printing the page in the script
> itself).
> But there is a different way to do it. It concerns the frame-layout,
> though. 'Cause if you use frames, the URL of one of the frames will
> not be shown in the location bar. But then you'll have to use
> frames, which I don't know if you want.
> One thing I can tell you though... of a page that's being shown, you
> cannot hide the URL. Never.
>
> 
>
> --
>
> * R&zE:
>
> -- 
> -- Renze Munnik
> -- DataLink BV
> --
> -- E: [EMAIL PROTECTED]
> -- W: +31 23 5326162
> -- F: +31 23 5322144
> -- M: +31 6 21811143
> --
> -- Stationsplein 82
> -- 2011 LM  HAARLEM
> -- Netherlands
> --
> -- http://www.datalink.nl
> -- 
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] header() + link..

2001-08-31 Thread


From: Ashwin Kutty <[EMAIL PROTECTED]>
Date: Fri, Aug 31, 2001 at 10:44:04AM -0300
Message-ID: <[EMAIL PROTECTED]>
Subject: Re: [PHP] header() + link..

> Hi,
> 
> I thought as much.. And no, dont want to use frames.. Id rather just have the
> URL shown in the Location Field..
> 
> I do realise, there is no real way to ever hide the URL, however, I just dint
> want to make it too obvious for the users to bookmark or pass around to people
> who are not authorized to view the page..
> 
> However, thanks for the reply..





Ehmmm... You say that people who aren't authorized aren't allowed to
see the page (which makes sense ;). I don't know ofcourse how you
take care of things, but for me it's no problem if unauthorized
people get URL's where they shouldn't look. I mean... the server
just denies access. Problem solved!



-- 

* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Segmentation Fault on apache with imageCopy fonction

2001-08-31 Thread Matthieu Brunet

This line in my code :
imageCopy($im,$source,10,10,0,0,$this->width,$this->height);
Give me a segmentation fault in apache :
[Fri Aug 31 13:58:43 2001] [notice] child pid 4158 exit signal Segmentation
fault (11)

If  I replace this fonction by
imageCopyMerge($im,$source,10,10,0,0,$this->width,$this->height,100);
(which, according the documentation, sould give the same result as
imageCopy)
I have no segmentation fault, but some images got a very bad aspect, like in
16 colors or so...

My configuration :
PHP 6.0.4
Configuration Commande :
 './configure' '--with-mysql' '--enable-ftp' '--enable-track-vars'
'--with-gd' '--enable-native-tt' '--with-freetype-dir=/usr/local'
'--with-jpeg-dir' '--with-png-dir' '--with-zlib-dir'
'--with-apache=../apache_1.3.19' '--enable-track-vars' '--enable-sockets'
'--enable-trans-sid'

Thanks a lot.
--
Matthieu Brunet - [EMAIL PROTECTED]
Réseau-Photo S.A. - http://www.reseau-photo.com
15, rue du Général Campredon - 34000 Montpellier
Tél. : 04 67 58 07 08 - Fax : 04 67 58 03 04
Icq : 119683958






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] HTTP authentication

2001-08-31 Thread Jon Haworth

Won't sending a 401 header do the trick?



Not sure, but worth a try.

Cheers
Jon


-Original Message-
From: Boris [mailto:[EMAIL PROTECTED]]
Sent: 31 August 2001 13:08
To: [EMAIL PROTECTED]
Subject: [PHP] HTTP authentication 


Is there a way to force re-authentication without closing and re-opening the
browser.

Thanks
Boris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP Syntax question.

2001-08-31 Thread Erols

Sorry for my ignorance.
I just saw some PHP syntax that I am not aware of. Could someone please shed
some light on this.
What is the purpose of the @ in the following call to the PHP mail method?

@mail( /* some parameters */ );

If I remove the @, then php compiler complains.

Thank you in advance.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP Syntax question.

2001-08-31 Thread Jon Haworth

The @ suppresses any warning/error messages that are produced - hence the
complaints when it's taken out :-)

Cheers
Jon

-Original Message-
From: Erols [mailto:[EMAIL PROTECTED]]
Sent: 31 August 2001 01:06
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Syntax question.


Sorry for my ignorance.
I just saw some PHP syntax that I am not aware of. Could someone please shed
some light on this.
What is the purpose of the @ in the following call to the PHP mail method?

@mail( /* some parameters */ );

If I remove the @, then php compiler complains.

Thank you in advance.


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] The future of PHP

2001-08-31 Thread Christopher CM Allen

Php'ers:

These are great points that have been brought up (a kinda synopsis, since we
are repeating here :)


1) some want direct marketing
2) Some believe the status quo is enough
3) all agreee php is useful as a web development tool/language
4) some agree that it can/should be more (GTK/Command Line etc)

This originally started as a call to php'ers to step up and market the
language so that it can compete more vitally in a larger market.
Both Rasmus and Zeev have stated that they believe they are doing just that
via conferences and Zend. Mr Lemos et al believe that more should be done. A
more constructive targeted aim at the .NET and Java based crowd. Several
solutions/ideas have been suggested one of which is a poll/display of
quality/imaginative etc php sites. Another suggested that php go the way of
BIND and APACHE and that the wait will pay off with the volume of  users in
10-12 years.



Good Day!
--ccma


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Variable Syntax Question

2001-08-31 Thread Ninety-Nine Ways To Die

I have a form that reads in a couple variables via:






Now... I want to read in those variables in something like the following:

for($i=1;$i<4;$i++) {
   echo "$bob$i";
}

BUT that obviously doesn't work, it simple prints 1, so how to I make it echo the 
value of the variable bob1?

-Hass


Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Variable Syntax Question

2001-08-31 Thread


From: Ninety-Nine Ways To Die <[EMAIL PROTECTED]>
Date: Fri, Aug 31, 2001 at 10:28:56AM -0400
Message-ID: <[EMAIL PROTECTED]>
Subject: [PHP] Variable Syntax Question

> I have a form that reads in a couple variables via:
> 
> 
> 
> 
> 
> 
> Now... I want to read in those variables in something like the following:
> 
> for($i=1;$i<4;$i++) {
>echo "$bob$i";
> }
> 
> BUT that obviously doesn't work, it simple prints 1, so how to I make it echo 
>the value of the variable bob1?
> 
> -Hass





for ($i = 1; $i < 4; $i++) {
  $myVar = "bob$i";
  print ($$myVar);
}



-- 

* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Variable Syntax Question

2001-08-31 Thread


From: * R&zE: <[EMAIL PROTECTED]>
Date: Fri, Aug 31, 2001 at 04:36:36PM +0200
Message-ID: <[EMAIL PROTECTED]>
Subject: Re: [PHP] Variable Syntax Question

Btw... Why not just use an array?






and then:

foreach ($bob as $myValue) {
  print ($myValue);
}


That's a much nicer solution...

-- 

* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: File read Parser error

2001-08-31 Thread Bopolissimus Platypus

On Thu, 30 Aug 2001 17:06:38 -0500, [EMAIL PROTECTED] (Gary)
wrote:

>Can someone tell me why I am getting an error for the second line below. 
>It works locally but not live.
>
>   $filename = "www/name/test/free.txt"

missing semicolon there.

tiger

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP Security

2001-08-31 Thread Alfredeen, Johan

I am looking for a good, practical tutorial on what I should be doing as a
developer to create a secure web site (PHP related). I have looked in my PHP
text and searched the web, but haven't found anything real useful. I am not
interested in Apache or OS security, as this is -hopefully- taken care of by
my webhost. So if you know of a good guide, online or off, please
contribute.

Thanks,

Johan
PongWorld.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] The future of PHP

2001-08-31 Thread Thomas Deliduka

Actually this originally started (If you're referring to the thread itself)
with my question as to what to tell my JSP-loving buddy that PHP isn't an
antiquated and dying language/processing system.

I NEVER would have thought it was balloon into this conversation!

On 8/31/2001 10:29 AM this was written:

> This originally started as a call to php'ers to step up and market the
> language so that it can compete more vitally in a larger market.
> Both Rasmus and Zeev have stated that they believe they are doing just that
> via conferences and Zend. Mr Lemos et al believe that more should be done. A
> more constructive targeted aim at the .NET and Java based crowd. Several
> solutions/ideas have been suggested one of which is a poll/display of
> quality/imaginative etc php sites. Another suggested that php go the way of
> BIND and APACHE and that the wait will pay off with the volume of  users in
> 10-12 years.

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Alexander Skwar

So sprach »Arcadius  A.« am 2001-08-31 um 05:27:04 -0700 :
> $u = $SCRIPT_FILENAME;

Because you did not define $SCRIPT_FILENAME anywhere.  If you want to
access the global variable, you've got to say so:

global $SCRIPT_FILENAME;

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 1 hour 46 minutes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Boget, Chris

> So sprach »Arcadius  A.« am 2001-08-31 um 05:27:04 -0700 :
> > $u = $SCRIPT_FILENAME;
> Because you did not define $SCRIPT_FILENAME anywhere.  If you want to
> access the global variable, you've got to say so:
> global $SCRIPT_FILENAME;

Or, so you don't have to specify all the variables you are using 
as globals (especially if you are using *alot* of them), you can 
use:

$GLOBALS[SCRIPT_FILENAME];

Chris



Re: [PHP] RE: [PHP-WIN] Can PHP and Java work together?

2001-08-31 Thread mark Charette

From: "Robin Bolton" <[EMAIL PROTECTED]>

> Also, if you are considering using JavaScript to validate your form, you
may
> want to reconsider doing it in PHP as JavaScript is easy to circumvent.

I think most if not all of us doing industrial-strength Web programming for
our living end up doing it at both ends - JavaScript for browsers that
support it (reduces round-trips if we can verify early and customer gets
immediate and nicely presented feedback) and server side (for those browsers
that aren't "doing" JavaScript and for doing heavy-duty and/or session based
validation).

You just can't win ...

Mark C.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Alexander Skwar

So sprach »Boget, Chris« am 2001-08-31 um 10:04:49 -0500 :
> Or, so you don't have to specify all the variables you are using 
> as globals (especially if you are using *alot* of them), you can 
> use:
> 
> $GLOBALS[SCRIPT_FILENAME];

What's the gain?  'global ' has 7 characters, whereas '$GLOBALS[]' has
10 characters.  So, you don't type less.  And with using global(), the
code is more orderly, and thus easier to read.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 2 hours 0 minutes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Cookies

2001-08-31 Thread Jason Radley

Does anyone know how to share cookies between servers.
What I want to do is set a cookies on non secure server for a
secure server.
Here is 
setcookie("SessionID","$sessid",time() + 7200,"https://domainname.com";);
Thanks



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


RE: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Boget, Chris

> > Or, so you don't have to specify all the variables you are using 
> > as globals (especially if you are using *alot* of them), you can 
> > use:
> > $GLOBALS[SCRIPT_FILENAME];
> What's the gain?  'global ' has 7 characters, whereas '$GLOBALS[]' has
> 10 characters.  So, you don't type less.  And with using global(), the
> code is more orderly, and thus easier to read.

True.  But take the following function:

function processLotsOfFormVars() {
  global $fieldOne, $fieldTwo, $fieldThree, $fieldFour;
  global $fieldFive, $fieldSix, $fieldSeven;
  global $PHP_SELF, $REQUEST_URI;
  global $HTTP_REFERER;

  echo "Field One is: $fieldOne\n";
  echo "Field Two is: $fieldTwo\n";
// etc
}

OR you can do it this way:

function processLotsOfFormVars() {
  echo "Field One is: $GLOBALS[fieldOne]\n";
  echo "Field Two is: $GLOBALS[fieldTwo]\n";
// etc
}

I've done it both ways.  I'm not advocating using 
"$GLOBALS[var_name];" over "global $var_name",
just that it is an alternative if you are using alot of global 
variables in a function.  Plus, if the function gets large, 
it's easier to see where the value is coming from by using
the $GLOBALS variable.
That's all I was saying.

Chris



Re: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Arcadius A.

RE: [PHP] PHP_SELF or REQUEST_URI within Function ?Ok Men !!!. Now I see  
thanks alot for the inputs ! :o))

Arcad


  - Original Message - 
  From: Boget, Chris 
  To: 'Alexander Skwar' 
  Cc: Arcadius A. ; [EMAIL PROTECTED] 
  Sent: Friday, August 31, 2001 8:22 AM
  Subject: RE: [PHP] PHP_SELF or REQUEST_URI within Function ?


  > > Or, so you don't have to specify all the variables you are using 
  > > as globals (especially if you are using *alot* of them), you can 
  > > use: 
  > > $GLOBALS[SCRIPT_FILENAME]; 
  > What's the gain?  'global ' has 7 characters, whereas '$GLOBALS[]' has 
  > 10 characters.  So, you don't type less.  And with using global(), the 
  > code is more orderly, and thus easier to read. 

  True.  But take the following function: 

  function processLotsOfFormVars() { 
global $fieldOne, $fieldTwo, $fieldThree, $fieldFour; 
global $fieldFive, $fieldSix, $fieldSeven; 
global $PHP_SELF, $REQUEST_URI; 
global $HTTP_REFERER; 

echo "Field One is: $fieldOne\n"; 
echo "Field Two is: $fieldTwo\n"; 
  // etc 
  } 

  OR you can do it this way: 

  function processLotsOfFormVars() { 
echo "Field One is: $GLOBALS[fieldOne]\n"; 
echo "Field Two is: $GLOBALS[fieldTwo]\n"; 
  // etc 
  } 

  I've done it both ways.  I'm not advocating using 
  "$GLOBALS[var_name];" over "global $var_name", 
  just that it is an alternative if you are using alot of global 
  variables in a function.  Plus, if the function gets large, 
  it's easier to see where the value is coming from by using 
  the $GLOBALS variable. 
  That's all I was saying. 

  Chris 




Re: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Alexander Skwar

So sprach »Boget, Chris« am 2001-08-31 um 10:22:28 -0500 :
> True.  But take the following function:
> 
> function processLotsOfFormVars() {
>   global $fieldOne, $fieldTwo, $fieldThree, $fieldFour;
>   global $fieldFive, $fieldSix, $fieldSeven;
>   global $PHP_SELF, $REQUEST_URI;
>   global $HTTP_REFERER;
> 
>   echo "Field One is: $fieldOne\n";
>   echo "Field Two is: $fieldTwo\n";
> // etc
> }
> 
> OR you can do it this way:
> 
> function processLotsOfFormVars() {
>   echo "Field One is: $GLOBALS[fieldOne]\n";
>   echo "Field Two is: $GLOBALS[fieldTwo]\n";
> // etc
> }

Uh?  I don't see it.  The "matching" function 1 is:

function processLotsOfFormVars() {
global $fieldOne;
global $fieldTwo;

echo "Field One is: $fieldOne\n";
echo "Field Two is: $fieldTwo\n";
}

this quite doesn't look as intimidating as the piece you wrote.  And
even if there are 10 lines of 'global', I still like it a lot better,
because it CLEARLY shows which form vars are going to be used.

One of the downside of PHP IMHO is, that you do not have to define
variables.  This leads to a lot of errors.  At least there should be a
"option", which forces you to define variables, like maybe so:

dim $some_var;

this leads to easier readable code IMHO.

> variables in a function.  Plus, if the function gets large, 
> it's easier to see where the value is coming from by using
> the $GLOBALS variable.

Now, that's the point I'm arguing here.  I don't think so.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 2 hours 10 minutes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP to fax

2001-08-31 Thread Ari Nepon

Does anyone know of a way to go directly from a PHP/MySQL application to
having a fax sent out??? I am trying to set up my application so that when a
transaction is completed. Both parties receive a fax. Anyone done anything
like this?

Thanks,

Ari Nepon


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Cookies

2001-08-31 Thread Jon Farmer

You can't set a cookie for a different domain or subdomain. If you set a
cookie for a domain and then goto to SSL then the cookie will still be
presented.

Regards

Jon
--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07968 524175
PGP Key available, send blank email to [EMAIL PROTECTED]

- Original Message -
From: "Jason Radley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 4:11 PM
Subject: [PHP] Cookies


> Does anyone know how to share cookies between servers.
> What I want to do is set a cookies on non secure server for a
> secure server.
> Here is
> setcookie("SessionID","$sessid",time() + 7200,"https://domainname.com";);
> Thanks
>
>






> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP to fax

2001-08-31 Thread Andrey Hristov

use exec() to call fax program on Linux.


Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS


- Original Message - 
From: "Ari Nepon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 6:25 PM
Subject: [PHP] PHP to fax 


> Does anyone know of a way to go directly from a PHP/MySQL application to
> having a fax sent out??? I am trying to set up my application so that when a
> transaction is completed. Both parties receive a fax. Anyone done anything
> like this?
> 
> Thanks,
> 
> Ari Nepon
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Boget, Chris

> One of the downside of PHP IMHO is, that you do not have to define
> variables.  This leads to a lot of errors.  At least there should be a
> "option", which forces you to define variables, like maybe so:
>   dim $some_var;

I definitely agree there.  I've been bitten by this bug more times
than I can count.  Granted, it's always been my fault, but it would
have been nice to have something there to say "hey, this variable
hasn't been defined".  I know you can make PHP do this if you set
the error checking very, very high but in doing so, you are also
opening up another bucket of worms that you don't always need
to deal with.

> > variables in a function.  Plus, if the function gets large, 
> > it's easier to see where the value is coming from by using
> > the $GLOBALS variable.
> Now, that's the point I'm arguing here.  I don't think so.

This is definitely a matter of coding style.  Neither of us are
wrong, just a matter of preference.  In replying, I was simply
offering alternatives so that Arcadius would know all options
open to him.  I wasn't trying to say your way was erroneous
and if I came off that way, my apologies.

Chris



Re: [PHP] Cookies

2001-08-31 Thread Jon Farmer

Ignore my previous post it is incorrect

Sorry

Jon
--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07968 524175
PGP Key available, send blank email to [EMAIL PROTECTED]

- Original Message -
From: "Jon Farmer" <[EMAIL PROTECTED]>
To: "Jason Radley" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 4:31 PM
Subject: Re: [PHP] Cookies


> You can't set a cookie for a different domain or subdomain. If you set a
> cookie for a domain and then goto to SSL then the cookie will still be
> presented.
>
> Regards
>
> Jon
> --
> Jon Farmer
> Systems Programmer, Entanet www.enta.net
> Tel 01952 428969 Mob 07968 524175
> PGP Key available, send blank email to [EMAIL PROTECTED]
>
> - Original Message -
> From: "Jason Radley" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, August 31, 2001 4:11 PM
> Subject: [PHP] Cookies
>
>
> > Does anyone know how to share cookies between servers.
> > What I want to do is set a cookies on non secure server for a
> > secure server.
> > Here is
> > setcookie("SessionID","$sessid",time() + 7200,"https://domainname.com";);
> > Thanks
> >
> >
>
>
> --
--
> 
>
>
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Arcadius A.

Cool ...
Now that we're talking about PHP 
I'd like to ask a question 
You know the "overloading" function in C++  Is that possible in PHP ?

Basically , I'd like to define  more than one function having the same name
but different number of variables/parameters ... so PHP would know which one
I'm calling depending on the numbwer/type of the variables ...
exemple :





Would this work ?

Thanks...

- Original Message -
From: "Alexander Skwar" <[EMAIL PROTECTED]>
To: "Boget, Chris" <[EMAIL PROTECTED]>
Cc: "Arcadius A." <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 8:21 AM
Subject: Re: [PHP] PHP_SELF or REQUEST_URI within Function ?


> So sprach »Boget, Chris« am 2001-08-31 um 10:22:28 -0500 :
> > True.  But take the following function:
> >
> > function processLotsOfFormVars() {
> >   global $fieldOne, $fieldTwo, $fieldThree, $fieldFour;
> >   global $fieldFive, $fieldSix, $fieldSeven;
> >   global $PHP_SELF, $REQUEST_URI;
> >   global $HTTP_REFERER;
> >
> >   echo "Field One is: $fieldOne\n";
> >   echo "Field Two is: $fieldTwo\n";
> > // etc
> > }
> >
> > OR you can do it this way:
> >
> > function processLotsOfFormVars() {
> >   echo "Field One is: $GLOBALS[fieldOne]\n";
> >   echo "Field Two is: $GLOBALS[fieldTwo]\n";
> > // etc
> > }
>
> Uh?  I don't see it.  The "matching" function 1 is:
>
> function processLotsOfFormVars() {
> global $fieldOne;
> global $fieldTwo;
>
> echo "Field One is: $fieldOne\n";
> echo "Field Two is: $fieldTwo\n";
> }
>
> this quite doesn't look as intimidating as the piece you wrote.  And
> even if there are 10 lines of 'global', I still like it a lot better,
> because it CLEARLY shows which form vars are going to be used.
>
> One of the downside of PHP IMHO is, that you do not have to define
> variables.  This leads to a lot of errors.  At least there should be a
> "option", which forces you to define variables, like maybe so:
>
> dim $some_var;
>
> this leads to easier readable code IMHO.
>
> > variables in a function.  Plus, if the function gets large,
> > it's easier to see where the value is coming from by using
> > the $GLOBALS variable.
>
> Now, that's the point I'm arguing here.  I don't think so.
>
> Alexander Skwar
> --
> How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
> Homepage: http://www.digitalprojects.com   |   http://www.iso-top.de
>iso-top.de - Die günstige Art an Linux Distributionen zu kommen
> Uptime: 2 days 2 hours 10 minutes
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Plese help me

2001-08-31 Thread soawarat weangkawe

We have installed PHP4.06 manually to use it with IIS 5 on win2000server

We did everything the installation guide told us to do.
We uncommented some options in php.ini including

extension=php_oci8.dll

Afer we stopped and started the Web server every dll was loaded except 
php_oci.dll

"unable to load dynamic library 'C:/PHP/extentions/php_oci.dll'-The 
specified procedure could not be found."

What should I do?
Your help will be very appreciated

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] My apologies for the OOAR's

2001-08-31 Thread Phil Labonte

Apparently I caused some agitation with my reply to Eric.
I want to be clear so that everyone knows.

I apologies for my reply and I will not be sending anymore OOAR to the list.

Once again, I apologize.

Phil Labonte


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Boget, Chris

> Cool ...
> Now that we're talking about PHP 
> I'd like to ask a question 
> You know the "overloading" function in C++  Is that 
> possible in PHP ?

No, I do not believe so.
 
> Basically , I'd like to define  more than one function having 
> the same name but different number of variables/parameters ... 
> so PHP would know which one I'm calling depending on the 
> numbwer/type of the variables ... exemple :

You can do this with variable parameters.  Something along
these lines:

function myFunc( $requiredVar, $optionalVar1 = "", $optionalVar2 = "" ) {
  echo "$requiredVar\n";

  if( $optionalVar1 ) {
echo "$optionalVar1\n";

  } 
// etc.
}

Alternately, if you need *alot* of optional vars, consider passing
an array and check that.

Chris



Re: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Philip Olson


> One of the downside of PHP IMHO is, that you do not have to define
> variables.  This leads to a lot of errors.  At least there should be a
> "option", which forces you to define variables, like maybe so:

I've not followed this thread but this is pretty much what E_NOTICE is
for, turn it on in error_reporting and it'll tell you every undefined
variable.  Do this in php.ini or with error_reporting function.  In fact,
one _should_ develop with E_ALL on.

 if ($var) // will produce a Warning if $var is not set

 echo $notset; // ditto

 $arr[somekey] // Warning if constant variable somekey is 
  not defined (i.e. use 'quotes')

 $arr['key']   // Warning if key 'key' not defined

See :

  http://www.php.net/manual/en/phpdevel-errors.php
  http://marc.theaimsgroup.com/?l=php-general&m=99486381324867

Much more can be said, hope the above helps.

Regards,
Philip Olson



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP to fax

2001-08-31 Thread Sean C. McCarthy

Hi Ari,

If you are using Linux (if not you should! really) You can use lprfax
which will let you use 'lpr -Pfax -J', mgetty-fax, efax
or something like that. If you use one of those programs dump the
information to file and use exec() from PHP.

Sean C. McCarthy
SCI, S.L. (www.sci-spain.com)


Ari Nepon wrote:
> 
> Does anyone know of a way to go directly from a PHP/MySQL application to
> having a fax sent out??? I am trying to set up my application so that when a
> transaction is completed. Both parties receive a fax. Anyone done anything
> like this?
> 
> Thanks,
> 
> Ari Nepon
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] The future of PHP

2001-08-31 Thread Philip Olson

looks bright.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Arcadius A.

Ok .I see Thanks to you both !
Have a nice weekend 
Arcad


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] array search

2001-08-31 Thread Joseph Bannon

I have an array of names, like below...

$people = array("Jim","John","JP");

Is there a way in an IF statement to see if someone's name is in the array?
Like...

if ($people =~ $person) { }

I don't want to have to create a foreach loop to go through the array to see
if that person is there.

Joseph



















-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP Security

2001-08-31 Thread Seb Frost

Great question - I'd love to know too.

I can give you one hint.  Make sure that you validate any variables passed
in the url.  I had a script that should take an integer, and realised if
someone put in a fraction or text then the script output errors to the html
page showing file and directory names that I wanted hidden.

To solve this I used:

function SecureInt($var,$default)
{
if (($var!=0) && ($var*1!=0) && is_int($var*1))
{
$var=$var*1;
//echo "is int";
}
else
{
$var=$default;
//echo "is not int";
}
return($var);
}

$intvar = SecureInt($intvar,1);


- seb

-Original Message-
From: Alfredeen, Johan [mailto:[EMAIL PROTECTED]]
Sent: 31 August 2001 15:54
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Security


I am looking for a good, practical tutorial on what I should be doing as a
developer to create a secure web site (PHP related). I have looked in my PHP
text and searched the web, but haven't found anything real useful. I am not
interested in Apache or OS security, as this is -hopefully- taken care of by
my webhost. So if you know of a good guide, online or off, please
contribute.

Thanks,

Johan
PongWorld.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] array search

2001-08-31 Thread Andrey Hristov

from http://php.net/quickref.php

$os = array ("Mac", "NT", "Irix", "Linux");
if (in_array ("Irix", $os)){
print "Got Irix";
}
  
Andrey HristovIcyGEN Corporationhttp://www.icygen.comBALANCED SOLUTIONS
- Original Message - 
From: "Joseph Bannon" <[EMAIL PROTECTED]>
To: "PHP (E-mail)" <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 6:40 PM
Subject: [PHP] array search


> I have an array of names, like below...
> 
> $people = array("Jim","John","JP");
> 
> Is there a way in an IF statement to see if someone's name is in the array?
> Like...
> 
> if ($people =~ $person) { }
> 
> I don't want to have to create a foreach loop to go through the array to see
> if that person is there.
> 
> Joseph
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Setcookie

2001-08-31 Thread Galvin, Max

Is there any way to see whether or not the cookie setting has actually
worked without going to another page? I suspect there isn't but I'd like
confirmation ;)

Cheers

Max

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP Security

2001-08-31 Thread Alfredeen, Johan

Thanks for the tip. This is what I am talking about. Even with an error like
the one you mention below, preferably the page should die nicely and not
output a bunch of secret info or other stuff to the client. I am generally
careful to prevent that from happening in all my dealings with my mySQL db
by checking all the db connections, results, and things, and killing the
execution if there was some error. This works well. But I am sure I have not
covered every possibility.

I am mainly looking for a list of links or textbooks that outlines some of
these things. 

Johan


-Original Message-
From: Seb Frost [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 31, 2001 9:57 AM
To: Alfredeen, Johan; [EMAIL PROTECTED]
Subject: RE: [PHP] PHP Security


Great question - I'd love to know too.

I can give you one hint.  Make sure that you validate any variables passed
in the url.  I had a script that should take an integer, and realised if
someone put in a fraction or text then the script output errors to the html
page showing file and directory names that I wanted hidden.

To solve this I used:

function SecureInt($var,$default)
{
if (($var!=0) && ($var*1!=0) && is_int($var*1))
{
$var=$var*1;
//echo "is int";
}
else
{
$var=$default;
//echo "is not int";
}
return($var);
}

$intvar = SecureInt($intvar,1);


- seb

-Original Message-
From: Alfredeen, Johan [mailto:[EMAIL PROTECTED]]
Sent: 31 August 2001 15:54
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Security


I am looking for a good, practical tutorial on what I should be doing as a
developer to create a secure web site (PHP related). I have looked in my PHP
text and searched the web, but haven't found anything real useful. I am not
interested in Apache or OS security, as this is -hopefully- taken care of by
my webhost. So if you know of a good guide, online or off, please
contribute.

Thanks,

Johan
PongWorld.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Setcookie

2001-08-31 Thread Jason Radley

Please enable cookies.You need cookies to shop 
this
site";
}
else{
header("Location: somepage.php3");
}
}
?>

-Original Message-
From: Galvin, Max [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 31, 2001 9:45 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Setcookie


Is there any way to see whether or not the cookie setting has actually
worked without going to another page? I suspect there isn't but I'd like
confirmation ;)

Cheers

Max

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] array search

2001-08-31 Thread Philip Olson

just to add some info.  rememember this is case sensitive and spaces do
matter, sometimes (depending on your goals) the following will apply :

  $good_names = array('jim','philip','sasheen');

  $my_name= 'PHiliP';

  if (in_array(trim(strtolower($my_name)),$good_names))

and, another good function is array_keys and array_search.  see :

  http://www.php.net/array

regards,
Philip Olson

On Fri, 31 Aug 2001, Andrey Hristov wrote:

> from http://php.net/quickref.php
> 
> $os = array ("Mac", "NT", "Irix", "Linux");
> if (in_array ("Irix", $os)){
> print "Got Irix";
> }
>   
> Andrey HristovIcyGEN Corporationhttp://www.icygen.comBALANCED SOLUTIONS
> - Original Message - 
> From: "Joseph Bannon" <[EMAIL PROTECTED]>
> To: "PHP (E-mail)" <[EMAIL PROTECTED]>
> Sent: Friday, August 31, 2001 6:40 PM
> Subject: [PHP] array search
> 
> 
> > I have an array of names, like below...
> > 
> > $people = array("Jim","John","JP");
> > 
> > Is there a way in an IF statement to see if someone's name is in the array?
> > Like...
> > 
> > if ($people =~ $person) { }
> > 
> > I don't want to have to create a foreach loop to go through the array to see
> > if that person is there.
> > 
> > Joseph
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] passing variables between scripts?

2001-08-31 Thread Jon Thompson Coon

I can't cope the fact that I loose my variables every time I reload the
page. If someone could point me to the right direction, I'd be grateful.

Present problem:

I have a script that has some globals (surprise). Within this script,
pretty deep in a function call tree, a function saves a query into an
array and saves it to a global. Then an user makes an selection and the
script reloads itself. After this I'd like to my hands on the saved
query, but the global variable where it's saved seems to get initialised
on reload. How to get around this? Sessions? I'm pretty new (a
forthnight and wery little documentation) to server side programming, so
I'm probably misunderstanding some basics.

Most of my problems are related to this area, so anyone bold enough to
anwer will probably pounded with several questions more.

Thank you in advance
Jon Thompson Coon


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] array search

2001-08-31 Thread Alfredeen, Johan

Joseph,
 The below postings are what you're looking for. Hopefully the in_array PHP
function uses a smart search algorithm and doesn't go through the entire
array. If you store your values in a db you can make use of an index on the
column, or you could write your own search algorithm that uses a btree or
some other type of search methodology.

Johan


-Original Message-
From: Papp Gyozo [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 31, 2001 10:02 AM
To: Joseph Bannon; PHP (E-mail)
Subject: Re: [PHP] array search


yes, in_array($person, $people)!

however, you may take a look into the manual.
- Original Message -
From: Joseph Bannon <[EMAIL PROTECTED]>
To: PHP (E-mail) <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 5:40 PM
Subject: [PHP] array search


> I have an array of names, like below...
>
> $people = array("Jim","John","JP");
>
> Is there a way in an IF statement to see if someone's name is in the
array?
> Like...
>
> if ($people =~ $person) { }
>
> I don't want to have to create a foreach loop to go through the array to
see
> if that person is there.
>
> Joseph
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Alexander Skwar

So sprach »Arcadius  A.« am 2001-08-31 um 17:36:51 -0700 :
> Would this work ?

Kinda, but not really.

If you want to do this, you've got to stuff it all in one function, like
so:

function dunno($mandatory, $optional1 = NULL, $opt2 = NULL){
if (NULL === $optional1){
// behave, as if only $mandatory is set
echo 'mandatory is: ' . $mandatory;
return;
}
if (NULL === $optional2){
// behave, as if $man. and $opt1 have set
echo 'mand is : ' . $mandatory;
echo 'opt1 is : ' . $optional1;
return;
}
// neither $opt1 nor $opt2 are null
echo 'mand is : ' . $mandatory;
echo 'opt1 is : ' . $optional1;
echo 'opt2 is : ' . $opt2;
return;
}

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 2 hours 31 minutes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] just 10 characters from a string

2001-08-31 Thread Alexander Skwar

So sprach »Marcos Lloret« am 2001-08-31 um 09:53:01 +0200 :
> i have a long string (about 255 characters) and i would like to show only 10. 
>how can i do it?

substr

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 1 hour 48 minutes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Setcookie

2001-08-31 Thread Galvin, Max

Header redirect isn't vaiable in this situation.

> --
> From: Jason Radley[SMTP:[EMAIL PROTECTED]]
> Sent: 31 August 2001 17:00
> To:   Galvin, Max
> Cc:   [EMAIL PROTECTED]
> Subject:  RE: [PHP] Setcookie
> 
>  $alertthem = "Testing your browser for cookies.";
> 
> if(empty($check)){
>   $page = "$PHP_SELF?check=1";
>   header("Location: $page");
>   setcookie("testcookie","1");
> }
> else{
>   if(empty($testcookie)){
>   $alertthem = "Please enable cookies.You need cookies
> to shop this
> site";
>   }
>   else{
>   header("Location: somepage.php3");
>   }
> }
> ?>
> 
> -Original Message-
> From: Galvin, Max [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 31, 2001 9:45 AM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP] Setcookie
> 
> 
> Is there any way to see whether or not the cookie setting has actually
> worked without going to another page? I suspect there isn't but I'd like
> confirmation ;)
> 
> Cheers
> 
> Max
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] The future of PHP

2001-08-31 Thread pierre-yves

> 
> 1) some want direct marketing
> 2) Some believe the status quo is enough
> 3) all agreee php is useful as a web development tool/language
...

Did you open source your thread filter program? :)

Good job anyway. For me the most important point is that
the developer/maintainer of the language are focusing on
making the best web development language out there.
(even if it is already the best)

py

- Original Message -
From: "Christopher CM Allen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 10:29 AM
Subject: Re: [PHP] The future of PHP


> Php'ers:
>
> These are great points that have been brought up (a kinda synopsis, since
we
> are repeating here :)
>
> 
> 1) some want direct marketing
> 2) Some believe the status quo is enough
> 3) all agreee php is useful as a web development tool/language
> 4) some agree that it can/should be more (GTK/Command Line etc)
>
> This originally started as a call to php'ers to step up and market the
> language so that it can compete more vitally in a larger market.
> Both Rasmus and Zeev have stated that they believe they are doing just
that
> via conferences and Zend. Mr Lemos et al believe that more should be done.
A
> more constructive targeted aim at the .NET and Java based crowd. Several
> solutions/ideas have been suggested one of which is a poll/display of
> quality/imaginative etc php sites. Another suggested that php go the way
of
> BIND and APACHE and that the wait will pay off with the volume of  users
in
> 10-12 years.
>
> 
>
> Good Day!
> --ccma
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] help again

2001-08-31 Thread Nikola Veber

I am having big troubles here. I wrote this code just as it said in the manual, and 
it prints 
"{$beer}'s taste is great";?>



PHP Test


"{$beer}'s taste is great";
?>



and if I don't put  string into  it prints nothing !

I'm kind of confused right now ...

(win98, opera 5.12, php installed with installShield)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] help again

2001-08-31 Thread Jason Bell

All you should need to do is echo "$beer's taste is great";

don't use the braces.

-Jbell
- Original Message -
From: "Nikola Veber" <[EMAIL PROTECTED]>
To: "php forum" <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 9:38 AM
Subject: [PHP] help again


> I am having big troubles here. I wrote this code just as it said in the
manual, and
> it prints
> "{$beer}'s taste is great";?>
>
> 
> 
> PHP Test
> 
> 
>  $beer = 'Heineken';
> echo "{$beer}'s taste is great";
> ?>
> 
> 
>
> and if I don't put  string into  it prints nothing !
>
> I'm kind of confused right now ...
>
> (win98, opera 5.12, php installed with installShield)
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] help again

2001-08-31 Thread Alex Marín Fica \(Desarrollo\)

echo sends a literal string to the output and eventually evaluates variables
that are found inside, so it seems that your instruction should be:

echo "{$beer}'s taste is great";

Why it worked with  outside, I guess because it was closing some former
tag in your code or something like that...

Hope this helps (this sentence should be a tag!)
Regards,
Alex.

- Original Message -
From: "Nikola Veber" <[EMAIL PROTECTED]>
To: "php forum" <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 12:38 PM
Subject: [PHP] help again


> I am having big troubles here. I wrote this code just as it said in the
manual, and
> it prints
> "{$beer}'s taste is great";?>
>
> 
> 
> PHP Test
> 
> 
>  $beer = 'Heineken';
> echo "{$beer}'s taste is great";
> ?>
> 
> 
>
> and if I don't put  string into  it prints nothing !
>
> I'm kind of confused right now ...
>
> (win98, opera 5.12, php installed with installShield)
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] help again

2001-08-31 Thread Philip Olson

Sounds like you want to do :

  $guiness = 'Thick and Creamy!';

  $beer= 'guiness';

  print ${$beer}; // Thick and Creamy!

Regards,
Philip Olson


On Fri, 31 Aug 2001, Nikola Veber wrote:

> I am having big troubles here. I wrote this code just as it said in the manual, and 
> it prints 
> "{$beer}'s taste is great";?>
> 
> 
> 
> PHP Test
> 
> 
>  $beer = 'Heineken';
> echo "{$beer}'s taste is great";
> ?>
> 
> 
> 
> and if I don't put  string into  it prints nothing !
> 
> I'm kind of confused right now ...
> 
> (win98, opera 5.12, php installed with installShield)
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] The future of PHP or my 2 cents

2001-08-31 Thread B. van Ouwerkerk


>I think with everyone replying to "The future of PHP" e-mails and putting in
>their two cents, we're eventually going to raise that $100,000 in no time.
>

Yeah.. not to mention the time it takes to read or just download those 
messages.

I stopped counting and started hitting the delete button.

Just wondering how long this tread will keep alive.. thought it would be 
dead by now.

It started as "The future of PHP" but seems to become a discussion about 
what is a suitable job for a PHP script.. how to do some marketing for 
PHP.. ISP's not nowing everything about PHP.. and many many other things..

I've got some great ideas for cheap but very effective marketing.. but I'm 
running out of time now.

Bye,


B.


 /"\
 \ /
ASCII Ribbon CampaignX Against HTML Mail and News
 / \ 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] RE: multiple submit buttons

2001-08-31 Thread Johnson, Kirk

Tim Ward wrote:
> 
Be careful using values of submit buttons ... if the user hits return
instead of clicking one of the buttons you won't get anything. If you want a
default value try a hidden field before the submits with same name.
> 

Tim, thanks for the tip. I had heard of this behavior before, but never
witnessed it. Today I wrote a test form with 1 text field and 1 submit, and
it did do this: when I submitted via return, the submit field was not
posted. However, when I added a second text field to the form, the submit
did get posted. I was careful that the focus was still in the text field,
and not on the button, when I hit return.

Any ideas on why this inconsistency? Just curious. Since it is inconsistent,
your point is important and well-taken.

My code is below if anyone wants to play.

Kirk

submit.php
--












submitRun.php
-
";
}
?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP with Access?

2001-08-31 Thread EDUMEXICO

Try upsizer, simple but work fine.

On Thu, Aug 30, 2001 at 10:02:03AM -0400, Jeff Lewis wrote:
> I am using mySQL with all of my stuff but a friend who started writing some files 
>for our online baseball league was using Access as his database.  We tried running it 
>on my server but it returns an error that says undefined function odbc_connect.
> 
> Now my questions, can I get this to work on a Linux box?  If not, is there a nice 
>way to convert the MDB to mySQL? :)
> 
> Jeff

-- 
Mauricio Téllez Jiménez
Seguimiento Técnico EDUMEXICO
[EMAIL PROTECTED]
Zamora No. 25, Col. Centro
C.P. 91000, Xalapa, Ver.
Tel. 52(28)17-86-87, 17-73-80
Fax. 52(28)18-64-13

 PGP signature


  1   2   >