php-windows Digest 18 Dec 2001 02:13:19 -0000 Issue 906

Topics (messages 10930 through 10976):

Re: How to do a File browse operation in PHP
        10930 by: Boget, Chris

test
        10931 by: Silverio Diquigiovanni

API
        10932 by: Silverio Diquigiovanni
        10973 by: Ignatius Teo

Re: ISAPI status
        10933 by: Bryant Brabson

dll libraries for new php release...
        10934 by: Tekin Suleyman

exe app with php
        10935 by: Kevin
        10936 by: Svensson, B.A.T. (HKG)
        10937 by: Boget, Chris

Access Problems
        10938 by: A. Bacon
        10939 by: Tommy Finsen

Installing w/Apache
        10940 by: Randall Barber
        10972 by: Ignatius Teo

http message
        10941 by: LaserJetter
        10942 by: Phillip Oertel
        10943 by: LaserJetter

coffe message
        10944 by: Svensson, B.A.T. (HKG)
        10945 by: Erik H. Mathy
        10946 by: Svensson, B.A.T. (HKG)
        10947 by: LaserJetter
        10948 by: Svensson, B.A.T. (HKG)
        10949 by: alain samoun
        10950 by: Asendorf, John
        10951 by: Daniel Parsons
        10952 by: Svensson, B.A.T. (HKG)
        10953 by: Erik H. Mathy
        10954 by: Svensson, B.A.T. (HKG)
        10956 by: LaserJetter
        10960 by: alain samoun
        10974 by: Ross Fleming
        10975 by: Ross Fleming

Re: coffee message
        10955 by: alain samoun
        10957 by: Svensson, B.A.T. (HKG)
        10958 by: Erik H. Mathy
        10959 by: LaserJetter
        10961 by: Erik H. Mathy
        10962 by: LaserJetter
        10963 by: Svensson, B.A.T. (HKG)
        10964 by: Erik H. Mathy
        10965 by: Svensson, B.A.T. (HKG)
        10966 by: alain samoun
        10967 by: Erik H. Mathy
        10968 by: LaserJetter
        10969 by: Robin Bolton
        10970 by: Svensson, B.A.T. (HKG)
        10971 by: alain samoun

Form Problem using PHP
        10976 by: Anthony Ritter

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
> This can be done simply by HTML, just put this line in your code:
> <input type="file" name="xxx">

This can be a little dangerous if all he wants is a file name and not
have that file uploaded.  Becasue that's what would happen auto-
matically if he uses the above.  I know that, as a user, if I were filling
out a a form that just wanted a file name (and not necessarily the file), 
I'd be leery of using such an input field.

Chris
--- End Message ---
--- Begin Message ---
test

--- End Message ---
--- Begin Message ---
Hi to all, I've an hot question to submit you.
I use PHP.EXE to generate HTML page from a .PHP file in a standalone PC.
I love the php script language and so I don't use Jave or other similar.
I would to use the PHP facilities without create a file with PHP extension
end so I would a mechanism to passa a string with PHP language and obtain
a string with HTML code. I think PHP.EXE to do own work use a set of
DLL objects, but I'm not able to know the API calling to transform a PHP
file to an HTML file.

Can you expose me or illustrate me a web page with sample/instructions ?

Regards,
Silverio Diquigiovanni



--- End Message ---
--- Begin Message ---
If you can run php.exe from the command line, you don't need anything else.

Try php.exe -f myscript.php


----- Original Message -----
From: "Silverio Diquigiovanni" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 1:12 AM
Subject: [PHP-WIN] API


> Hi to all, I've an hot question to submit you.
> I use PHP.EXE to generate HTML page from a .PHP file in a standalone PC.
> I love the php script language and so I don't use Jave or other similar.
> I would to use the PHP facilities without create a file with PHP extension
> end so I would a mechanism to passa a string with PHP language and obtain
> a string with HTML code. I think PHP.EXE to do own work use a set of
> DLL objects, but I'm not able to know the API calling to transform a PHP
> file to an HTML file.
>
> Can you expose me or illustrate me a web page with sample/instructions ?
>
> Regards,
> Silverio Diquigiovanni
>
>
>
>
> --
> PHP Windows 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]
>

--- End Message ---
--- Begin Message ---
Can't use the ISAPI module. On a W2K Server SP2(256MB 650mhz), the following
error occurs after a short time of usage:

The HTTP server encountered an unhandled exception while processing the
ISAPI Application '
php4ts!zend_hash_copy + 0x1B + 0xA05E5983'.

The CGI binary has been rock solid for me though.

--- End Message ---
--- Begin Message ---
hi all,
I just installed the latest version of php (4.1) and was wondering what the
best place to obtain some of the extensions would be (gd, ming, etc). Am I
right in thinking that extensions compiled for versions prior to 4.1 won't
work with 4.1?
your help is much appreciated.
tekin

--- End Message ---
--- Begin Message ---
Is there a way to launch an .exe app using PHP. Example; Have a user click a
link to notepad and have it launch the user's notepad.exe for them?

Thanks!


--- End Message ---
--- Begin Message ---
RTFM: http://www.php.net/manual/en/function.exec.php

>-----Original Message-----
>From: Kevin [mailto:[EMAIL PROTECTED]]
>Sent: Monday, December 17, 2001 3:16 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP-WIN] exe app with php
>
>
>Is there a way to launch an .exe app using PHP. Example; Have a user click
a
>link to notepad and have it launch the user's notepad.exe for them?
--- End Message ---
--- Begin Message ---
> >Is there a way to launch an .exe app using PHP. Example; 
> > Have a user click a link to notepad and have it launch the 
> > user's notepad.exe for them?
> RTFM: http://www.php.net/manual/en/function.exec.php

Except that is server side and what the person asking the question
wants to do is client side.

Kevin, PHP can't do anything client side.  You are going to have
to do that using some other technology (possibly including, if
possibel, just using a simple anchor tag).

Chris
--- End Message ---
--- Begin Message ---
Help?  I cannot get access to anything in mysql through my php scripts.
I have a good connection (with a user and password set up by inserting
into the user db) and can work with mysql from dos with no problem, but
when I issue any command to mysql through php, I get an 'access denied
for 'tonloc@localhost' for database 'whatever'...

Any help would be greatly appreciated...Tonloc.

I'm running mysql 3.22.34/apache3.12/php4.0 on  a win95 machine

--- End Message ---
--- Begin Message ---
At 17.12.2001 17:50, A. Bacon wrote:
>Help?  I cannot get access to anything in mysql through my php scripts.
>I have a good connection (with a user and password set up by inserting
>into the user db) and can work with mysql from dos with no problem, but
>when I issue any command to mysql through php, I get an 'access denied
>for 'tonloc@localhost' for database 'whatever'...

Have you made a user by that name who i supposed to have access to the DB 
in question?
Use root@localhost (the default user) if you do not know how to make your 
own user (this is of course a huge security issue, so you should relly 
start reading those MySQL manuals ;)

Regards
- Tommy


- --- -- -- -.--   ..-. .. -. ... . -.
Tommy Finsen
Redaktør, Webmaster, Hostmaster, Postmaster
http://www.laiv.org
Mail: mailto:[EMAIL PROTECTED] | ICQ: 908297
Cell +47 90531602 | Work +47 23062856 | Fax +47 23062801
- "Careful. We don't want to learn from this." - Calvin


--- End Message ---
--- Begin Message ---
I have:

W2K
Apache 1.3.x

I have downloaded:

PHP 4.0.6
and
PHP 4.1.0

I have used both versions with same results.  I have used the MSI and tried to do it 
on my own.

This is the error I get from Apache:

c:/program filesnt/apache group/apache/conf/httpd.conf: Syntax OK
[Mon Dec 17 10:39:07 2001] [error] Cannot remove module mod_php4.c: not found in
 module list
Note the errors or messages above, and press the <ESC> key to exit.  20...

I don't even know where mod_php4.c is.  I have never had this error before either.  
What am I missing?
I just want the dumb thing to run as a module.

I followed the INSTALL.TXT instructions to no avail.

I'm lost
Thanks for your help in advance
RDB
--- End Message ---
--- Begin Message ---
This is an Apache issue. Apache expects a mod_????.c file for each
corresponding apachemodule.so or .dll file.

Try commenting out the entire block in your httpd.conf

Ignatius

----- Original Message -----
From: "Randall Barber" <[EMAIL PROTECTED]>
To: "PHP Windows mailing list" <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 4:41 AM
Subject: [PHP-WIN] Installing w/Apache


I have:

W2K
Apache 1.3.x

I have downloaded:

PHP 4.0.6
and
PHP 4.1.0

I have used both versions with same results.  I have used the MSI and tried
to do it on my own.

This is the error I get from Apache:

c:/program filesnt/apache group/apache/conf/httpd.conf: Syntax OK
[Mon Dec 17 10:39:07 2001] [error] Cannot remove module mod_php4.c: not
found in
 module list
Note the errors or messages above, and press the <ESC> key to exit.  20...

I don't even know where mod_php4.c is.  I have never had this error before
either.  What am I missing?
I just want the dumb thing to run as a module.

I followed the INSTALL.TXT instructions to no avail.

I'm lost
Thanks for your help in advance
RDB


--- End Message ---
--- Begin Message ---
Is there a way for PHP to attempt to open a URL and return the HTTP response
header?
For example, I want to make a PHP page which will redirect a visitor to a
mirror site if it encounters a 404 Not found error whilst trying to open the
website homepage. This test page will reside on a seperate server.
I was thinking maybe attempting to open the homepage with something like
fopen() and, using nested if() statements, try the next mirror in the list
if the fopen() command didnt succeed.
Any ideas?


--- End Message ---
--- Begin Message ---
see my message Re: URL checking.
i just posted a few curl functions that do exactly what you want to.
phil.

--- End Message ---
--- Begin Message ---
Thanks all of you. I'm sure one of these will work!!


--- End Message ---
--- Begin Message ---
Is there a way for PHP to check the coffee machine if the coffee is ready?

Maybe someone has a sample brew for me?
--- End Message ---
--- Begin Message ---
Do you have a Java or network enabled coffee machine? I seem to recall Sun
was pimping something along those lines a few years ago when "Internet
enabled everything, including your sock drawer" was all the rage. :)

> -----Original Message-----
> From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 17, 2001 2:07 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] coffe message
>
>
> Is there a way for PHP to check the coffee machine if the coffee is ready?
>
> Maybe someone has a sample brew for me?
>
> --
> PHP Windows 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]
>

--- End Message ---
--- Begin Message ---
I would guess you need beans for that to work.

But I am using running Win200 on a CMB VIC20, and they don't support the Sun
environment on this platform.

>-----Original Message-----
>From: Erik H. Mathy [mailto:[EMAIL PROTECTED]]
>Sent: Monday, December 17, 2001 9:06 PM
>To: [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] coffe message
>
>
>Do you have a Java or network enabled coffee machine? I seem to recall Sun
>was pimping something along those lines a few years ago when "Internet
>enabled everything, including your sock drawer" was all the rage. :)
>
>> -----Original Message-----
>> From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, December 17, 2001 2:07 PM
>> To: [EMAIL PROTECTED]
>> Subject: [PHP-WIN] coffe message
>>
>>
>> Is there a way for PHP to check the coffee machine if the 
>coffee is ready?
>>
>> Maybe someone has a sample brew for me?
--- End Message ---
--- Begin Message ---
Yes, if you had a coffee machine with a network socket and supporting TCP/IP
I can see that this would clearly be possible using sockets!!!



"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
27E647E5629ED211BF78009027289C6302157D67@mail1">news:27E647E5629ED211BF78009027289C6302157D67@mail1...
> Is there a way for PHP to check the coffee machine if the coffee is ready?
>
> Maybe someone has a sample brew for me?


--- End Message ---
--- Begin Message ---
Unfortunately the coffee machine only supports IEEE 805

>-----Original Message-----
>From: LaserJetter [mailto:[EMAIL PROTECTED]]
>Sent: Monday, December 17, 2001 9:42 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP-WIN] Re: coffe message
>
>
>Yes, if you had a coffee machine with a network socket and supporting
TCP/IP
>I can see that this would clearly be possible using sockets!!!
>
>
>
>"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
>27E647E5629ED211BF78009027289C6302157D67@mail1">news:27E647E5629ED211BF78009027289C6302157D67@mail1...
>> Is there a way for PHP to check the coffee machine if the 
>coffee is ready?
>>
>> Maybe someone has a sample brew for me?
>
>
>
>-- 
>PHP Windows 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]
>
--- End Message ---
--- Begin Message ---
Maybe also possible using some COM locally if the machine has a serial port.
A+
Alain

-----Original Message-----
From: LaserJetter [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 12:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: coffe message


Yes, if you had a coffee machine with a network socket and supporting TCP/IP
I can see that this would clearly be possible using sockets!!!



"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
27E647E5629ED211BF78009027289C6302157D67@mail1">news:27E647E5629ED211BF78009027289C6302157D67@mail1...
> Is there a way for PHP to check the coffee machine if the coffee is ready?
>
> Maybe someone has a sample brew for me?



--
PHP Windows 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]

--- End Message ---
--- Begin Message ---
Does anyone know if adodb will connect with the temperature databases on the
coffee pot?  I'd like to keep track of the instances of "smelly, burnt"
coffee temperatures.

---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit


> -----Original Message-----
> From: alain samoun [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 17, 2001 3:48 PM
> To: LaserJetter; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Re: coffe message
> 
> 
> Maybe also possible using some COM locally if the machine has 
> a serial port.
> A+
> Alain
> 
> -----Original Message-----
> From: LaserJetter [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 17, 2001 12:42 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: coffe message
> 
> 
> Yes, if you had a coffee machine with a network socket and 
> supporting TCP/IP
> I can see that this would clearly be possible using sockets!!!
> 
> 
> 
> "B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
> 27E647E5629ED211BF78009027289C6302157D67@mail1">news:27E647E5629ED211BF78009027289C6302157D67@mail1...
> > Is there a way for PHP to check the coffee machine if the 
> coffee is ready?
> >
> > Maybe someone has a sample brew for me?
> 
> 
> 
> --
> PHP Windows 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 Windows 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]
> 
--- End Message ---
--- Begin Message ---
 The IEEE Recommended Practice for System Identification in Nuclear
Power Plants and Related Facilities ?!?!? That is some coffee you're
drinking there. (with both of your heads??)



> -----Original Message-----
> From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 18 December 2001 9:45 a.m.
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Re: coffe message
>
>
> Unfortunately the coffee machine only supports IEEE 805
>
> >-----Original Message-----
> >From: LaserJetter [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, December 17, 2001 9:42 PM
> >To: [EMAIL PROTECTED]
> >Subject: [PHP-WIN] Re: coffe message
> >
> >
> >Yes, if you had a coffee machine with a network socket and supporting
> TCP/IP
> >I can see that this would clearly be possible using sockets!!!
> >
> >
> >
> >"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
> >27E647E5629ED211BF78009027289C6302157D67@mail1">news:27E647E5629ED211BF78009027289C6302157D67@mail1...
> >> Is there a way for PHP to check the coffee machine if the
> >coffee is ready?
> >>
> >> Maybe someone has a sample brew for me?
> >
> >
> >
> >--
> >PHP Windows 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 Windows 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]
>

--- End Message ---
--- Begin Message ---
The only thing I found about COM with php was the Component Object Model,
and that doesn't really relate to the serial port, does it?

>-----Original Message-----
>From: alain samoun [mailto:[EMAIL PROTECTED]]
>Sent: Monday, December 17, 2001 9:48 PM
>To: LaserJetter; [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] Re: coffe message
>
>
>Maybe also possible using some COM locally if the machine has 
>a serial port.
>A+
>Alain
>
>-----Original Message-----
>From: LaserJetter [mailto:[EMAIL PROTECTED]]
>Sent: Monday, December 17, 2001 12:42 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP-WIN] Re: coffe message
>
>
>Yes, if you had a coffee machine with a network socket and 
>supporting TCP/IP
>I can see that this would clearly be possible using sockets!!!
>
>
>
>"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
>27E647E5629ED211BF78009027289C6302157D67@mail1">news:27E647E5629ED211BF78009027289C6302157D67@mail1...
>> Is there a way for PHP to check the coffee machine if the 
>coffee is ready?
>>
>> Maybe someone has a sample brew for me?
>
>
>
>--
>PHP Windows 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 Windows 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]
>
--- End Message ---
--- Begin Message ---
> I would guess you need beans for that to work.

Well, we ARE talking about coffee!!!


--- End Message ---
--- Begin Message ---
Well, we uses to heat the coffee in core reactor of the power plant. It has
lots of benefits, like you will always see were you cup of coffee is
located, even if the light goes out. And believe it or not, but it happens
all the time - customers comes in first place, you know. ;)

But it hard to find someone running in the all the time to check the status
of the coffee machine, that's why we need to automate this task.

>-----Original Message-----
>From: Daniel Parsons [mailto:[EMAIL PROTECTED]]
>Sent: Monday, December 17, 2001 9:53 PM
>To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] Re: coffe message
>
>
> The IEEE Recommended Practice for System Identification in Nuclear
>Power Plants and Related Facilities ?!?!? That is some coffee you're
>drinking there. (with both of your heads??)
>
>
>
>> -----Original Message-----
>> From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, 18 December 2001 9:45 a.m.
>> To: [EMAIL PROTECTED]
>> Subject: RE: [PHP-WIN] Re: coffe message
>>
>>
>> Unfortunately the coffee machine only supports IEEE 805
>>
>> >-----Original Message-----
>> >From: LaserJetter [mailto:[EMAIL PROTECTED]]
>> >Sent: Monday, December 17, 2001 9:42 PM
>> >To: [EMAIL PROTECTED]
>> >Subject: [PHP-WIN] Re: coffe message
>> >
>> >
>> >Yes, if you had a coffee machine with a network socket and 
>supporting
>> TCP/IP
>> >I can see that this would clearly be possible using sockets!!!
>> >
>> >
>> >
>> >"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
>> >27E647E5629ED211BF78009027289C6302157D67@mail1">news:27E647E5629ED211BF78009027289C6302157D67@mail1...
>> >> Is there a way for PHP to check the coffee machine if the
>> >coffee is ready?
>> >>
>> >> Maybe someone has a sample brew for me?
>> >
>> >
>> >
>> >--
>> >PHP Windows 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 Windows 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]
>>
>
--- End Message ---
--- Begin Message ---
Has anyone heard any more about that toaster that would burn the day's
weather forecast sybol into the toast for you in the morning? It was
connected to the net and dialled up a service provider while the toast was
getting started and then cooked it a bit more in the shape of a sun or a
cloud (this is no joke!).
Could a similar idea be used for the coffee machine??


"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
27E647E5629ED211BF78009027289C6302157D6C@mail1">news:27E647E5629ED211BF78009027289C6302157D6C@mail1...
> Unfortunately the coffee machine only supports IEEE 805
>
> >-----Original Message-----
> >From: LaserJetter [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, December 17, 2001 9:42 PM
> >To: [EMAIL PROTECTED]
> >Subject: [PHP-WIN] Re: coffe message
> >
> >
> >Yes, if you had a coffee machine with a network socket and supporting
> TCP/IP
> >I can see that this would clearly be possible using sockets!!!
> >
> >
> >
> >"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
> >27E647E5629ED211BF78009027289C6302157D67@mail1">news:27E647E5629ED211BF78009027289C6302157D67@mail1...
> >> Is there a way for PHP to check the coffee machine if the
> >coffee is ready?
> >>
> >> Maybe someone has a sample brew for me?
> >
> >
> >
> >--
> >PHP Windows 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]
> >


--- End Message ---
--- Begin Message ---
Check with John Lim, he has already done this installation, but Manuel Lemos
is already at his heels.
A+
Alain

-----Original Message-----
From: Asendorf, John [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 12:50 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Re: coffe message


Does anyone know if adodb will connect with the temperature databases on the
coffee pot?  I'd like to keep track of the instances of "smelly, burnt"
coffee temperatures.

---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit


> -----Original Message-----
> From: alain samoun [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 17, 2001 3:48 PM
> To: LaserJetter; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Re: coffe message
>
>
> Maybe also possible using some COM locally if the machine has
> a serial port.
> A+
> Alain
>
> -----Original Message-----
> From: LaserJetter [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 17, 2001 12:42 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: coffe message
>
>
> Yes, if you had a coffee machine with a network socket and
> supporting TCP/IP
> I can see that this would clearly be possible using sockets!!!
>
>
>
> "B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
> 27E647E5629ED211BF78009027289C6302157D67@mail1">news:27E647E5629ED211BF78009027289C6302157D67@mail1...
> > Is there a way for PHP to check the coffee machine if the
> coffee is ready?
> >
> > Maybe someone has a sample brew for me?
>
>
>
> --
> PHP Windows 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 Windows 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 Windows 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]

--- End Message ---
--- Begin Message ---
Wake up and smell the coffee!  Chances are the coffee machine isn't y2k
compatible.  Connecting it to a webserver and hence the internet could cause
global meltdown!!!  Stop the madness I say! ;0)

Only Svensson can come up with a thread like this that would last so long!!
:)

Cheered me up anyway

Ross


-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
Sent: 17 December 2001 20:07
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] coffe message


Is there a way for PHP to check the coffee machine if the coffee is ready?

Maybe someone has a sample brew for me?

--
PHP Windows 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]

--- End Message ---
--- Begin Message ---
just had a plus-side thought, you won't need to install a firewall, most
come with
filters built-in.   ;)

-----Original Message-----
From: Ross Fleming [mailto:[EMAIL PROTECTED]]
Sent: 17 December 2001 23:08
To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] coffe message


Wake up and smell the coffee!  Chances are the coffee machine isn't y2k
compatible.  Connecting it to a webserver and hence the internet could cause
global meltdown!!!  Stop the madness I say! ;0)

Only Svensson can come up with a thread like this that would last so long!!
:)

Cheered me up anyway

Ross


-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
Sent: 17 December 2001 20:07
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] coffe message


Is there a way for PHP to check the coffee machine if the coffee is ready?

Maybe someone has a sample brew for me?

--
PHP Windows 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 Windows 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]

--- End Message ---
--- Begin Message ---
Yes, actually it does as there are several COM to control the serial port.
But your nuclear powered coffee machine would probably better be controlled
by something that has no relation with M$, or just tell us where your
installation is so we can move.
A+
Alain

-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 12:55 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Re: coffe message


The only thing I found about COM with php was the Component Object Model,
and that doesn't really relate to the serial port, does it?

>-----Original Message-----
>From: alain samoun [mailto:[EMAIL PROTECTED]]
>Sent: Monday, December 17, 2001 9:48 PM
>To: LaserJetter; [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] Re: coffe message
>
>
>Maybe also possible using some COM locally if the machine has
>a serial port.
>A+
>Alain
>
>-----Original Message-----
>From: LaserJetter [mailto:[EMAIL PROTECTED]]
>Sent: Monday, December 17, 2001 12:42 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP-WIN] Re: coffe message
>
>
>Yes, if you had a coffee machine with a network socket and
>supporting TCP/IP
>I can see that this would clearly be possible using sockets!!!
>
>
>
>"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
>27E647E5629ED211BF78009027289C6302157D67@mail1">news:27E647E5629ED211BF78009027289C6302157D67@mail1...
>> Is there a way for PHP to check the coffee machine if the
>coffee is ready?
>>
>> Maybe someone has a sample brew for me?
>
>
>
>--
>PHP Windows 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 Windows 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 Windows 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]

--- End Message ---
--- Begin Message ---
We are in Harrisburg...

>-----Original Message-----
>From: alain samoun [mailto:[EMAIL PROTECTED]]
>Sent: Monday, December 17, 2001 10:00 PM
>To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] Re: coffee message
>
>
>Yes, actually it does as there are several COM to control the serial port.
>But your nuclear powered coffee machine would probably better be controlled
>by something that has no relation with M$, or just tell us where your
>installation is so we can move.
>A+
>Alain
>
>-----Original Message-----
>From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
>Sent: Monday, December 17, 2001 12:55 PM
>To: [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] Re: coffe message
>
>
>The only thing I found about COM with php was the Component 
>Object Model,
>and that doesn't really relate to the serial port, does it?
>
>>-----Original Message-----
>>From: alain samoun [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, December 17, 2001 9:48 PM
>>To: LaserJetter; [EMAIL PROTECTED]
>>Subject: RE: [PHP-WIN] Re: coffe message
>>
>>
>>Maybe also possible using some COM locally if the machine has
>>a serial port.
>>A+
>>Alain
>>
>>-----Original Message-----
>>From: LaserJetter [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, December 17, 2001 12:42 PM
>>To: [EMAIL PROTECTED]
>>Subject: [PHP-WIN] Re: coffe message
>>
>>
>>Yes, if you had a coffee machine with a network socket and
>>supporting TCP/IP
>>I can see that this would clearly be possible using sockets!!!
>>
>>
>>
>>"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
>>27E647E5629ED211BF78009027289C6302157D67@mail1">news:27E647E5629ED211BF78009027289C6302157D67@mail1...
>>> Is there a way for PHP to check the coffee machine if the
>>coffee is ready?
>>>
>>> Maybe someone has a sample brew for me?
>>
>>
>>
>>--
>>PHP Windows 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 Windows 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 Windows 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 Windows 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]
>
--- End Message ---
--- Begin Message ---
> Yes, actually it does as there are several COM to control the serial port.
> But your nuclear powered coffee machine would probably better be
> controlled
> by something that has no relation with M$, or just tell us where your
> installation is so we can move.

It does indeed make think about the new ramifications of a "Blue Screen of
Death"!! Would the mushroom cloud have a glowing memory dump, I wonder?

--- End Message ---
--- Begin Message ---
If you had some kind of temperature sensor on the coffee pot and this was
connected to a machine running Apache+PHP and an interace program, the php
page could use exec() to run the interface program say every 5 seconds to
retrieve the temperature and if it was above say xº it could print "Coffee
ready" in the browser window (or active desktop on Win).
If it was a unix machine, it could send a messgae to all the networked
terminals in the workgroup i.e. those associated with coffe machine 1.
"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
27E647E5629ED211BF78009027289C6302157D6F@mail1">news:27E647E5629ED211BF78009027289C6302157D6F@mail1...
> We are in Harrisburg...
>
> >-----Original Message-----
> >From: alain samoun [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, December 17, 2001 10:00 PM
> >To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
> >Subject: RE: [PHP-WIN] Re: coffee message
> >
> >
> >Yes, actually it does as there are several COM to control the serial
port.
> >But your nuclear powered coffee machine would probably better be
controlled
> >by something that has no relation with M$, or just tell us where your
> >installation is so we can move.
> >A+
> >Alain
> >
> >-----Original Message-----
> >From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, December 17, 2001 12:55 PM
> >To: [EMAIL PROTECTED]
> >Subject: RE: [PHP-WIN] Re: coffe message
> >
> >
> >The only thing I found about COM with php was the Component
> >Object Model,
> >and that doesn't really relate to the serial port, does it?
> >
> >>-----Original Message-----
> >>From: alain samoun [mailto:[EMAIL PROTECTED]]
> >>Sent: Monday, December 17, 2001 9:48 PM
> >>To: LaserJetter; [EMAIL PROTECTED]
> >>Subject: RE: [PHP-WIN] Re: coffe message
> >>
> >>
> >>Maybe also possible using some COM locally if the machine has
> >>a serial port.
> >>A+
> >>Alain
> >>
> >>-----Original Message-----
> >>From: LaserJetter [mailto:[EMAIL PROTECTED]]
> >>Sent: Monday, December 17, 2001 12:42 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: [PHP-WIN] Re: coffe message
> >>
> >>
> >>Yes, if you had a coffee machine with a network socket and
> >>supporting TCP/IP
> >>I can see that this would clearly be possible using sockets!!!
> >>
> >>
> >>
> >>"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
> >>27E647E5629ED211BF78009027289C6302157D67@mail1">news:27E647E5629ED211BF78009027289C6302157D67@mail1...
> >>> Is there a way for PHP to check the coffee machine if the
> >>coffee is ready?
> >>>
> >>> Maybe someone has a sample brew for me?
> >>
> >>
> >>
> >>--
> >>PHP Windows 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 Windows 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 Windows 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 Windows 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]
> >


--- End Message ---
--- Begin Message ---
> If you had some kind of temperature sensor on the coffee pot and this was
> connected to a machine running Apache+PHP and an interace program, the php
> page could use exec() to run the interface program say every 5 seconds to
> retrieve the temperature and if it was above say xo it could print "Coffee
> ready" in the browser window (or active desktop on Win).
> If it was a unix machine, it could send a messgae to all the networked
> terminals in the workgroup i.e. those associated with coffe machine 1.

Actually, you bring up a good point. :)

But, if he's stuck with Win2k on a CMB VIC20 he might want to consider
ditching IIS5 and going with something really small, like Xitami. He can run
the exec() through PHP as suggested with minimal memory/processor usage.

I don't even want to consider the security aspects of a Win2K/IIS5 install
on a nuclear installation, though! :0

--- End Message ---
--- Begin Message ---
The interface could even be written in something like VisualBasic, C++ or
even QuickBasic and compiled as a DOS exe. This would let you access the
serial port and return the value of the sensor.
If you want to be really flash, a serial output could be connected to a
mains relay which could switch the coffee machine on from the computer!!!!



"Erik H. Mathy" <[EMAIL PROTECTED]> wrote in message
001801c1873f$6e666be0$3700020a@erik_laptop">news:001801c1873f$6e666be0$3700020a@erik_laptop...
> > If you had some kind of temperature sensor on the coffee pot and this
was
> > connected to a machine running Apache+PHP and an interace program, the
php
> > page could use exec() to run the interface program say every 5 seconds
to
> > retrieve the temperature and if it was above say xo it could print
"Coffee
> > ready" in the browser window (or active desktop on Win).
> > If it was a unix machine, it could send a messgae to all the networked
> > terminals in the workgroup i.e. those associated with coffe machine 1.
>
> Actually, you bring up a good point. :)
>
> But, if he's stuck with Win2k on a CMB VIC20 he might want to consider
> ditching IIS5 and going with something really small, like Xitami. He can
run
> the exec() through PHP as suggested with minimal memory/processor usage.
>
> I don't even want to consider the security aspects of a Win2K/IIS5 install
> on a nuclear installation, though! :0
>


--- End Message ---
--- Begin Message ---
>I don't even want to consider the security aspects of a 
>Win2K/IIS5 install on a nuclear installation, though! :0

But it uses a Motorola 6502, and that's been proven to be a secure CPU. By
the way it is Win200 and not Win2k.
--- End Message ---
--- Begin Message ---
> But it uses a Motorola 6502, and that's been proven to be a secure CPU. By
> the way it is Win200 and not Win2k.

Is that their new embedded server OS?
--- End Message ---
--- Begin Message ---
>If you had some kind of temperature sensor on the coffee pot and this was
>connected to a machine running Apache+PHP and an interace program, the php
>page could use exec() to run the interface program say every 5 seconds to
>retrieve the temperature and if it was above say xº it could print "Coffee
>ready" in the browser window (or active desktop on Win).
>If it was a unix machine, it could send a messgae to all the networked
>terminals in the workgroup i.e. those associated with coffe machine 1.

It is fascinating to see how this group explcitly (PHP-WIN) dedicated to M$
software warms for thge OpenSource software, and exploits the bad sides of
M$. But that's life isn't it?! We don't work with what we like to work with,
but what we got paid to work with.

Anyone doesn't running Linux/FreeBSD/NetBSD/Solaris at home raise a hand,
please.


--- End Message ---
--- Begin Message ---
Though, maybe the 8088 would be a better choice.
A+
Alain

-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 1:20 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Re: coffee message


>I don't even want to consider the security aspects of a 
>Win2K/IIS5 install on a nuclear installation, though! :0

But it uses a Motorola 6502, and that's been proven to be a secure CPU. By
the way it is Win200 and not Win2k.

-- 
PHP Windows 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]

--- End Message ---
--- Begin Message ---
> Anyone doesn't running Linux/FreeBSD/NetBSD/Solaris at home raise a hand,
> please.

Me! I don't run anything at home. OK, a Sega Dreamcast, but it's OS doesn't
count.

Once I leave work, I don't want anything to do with computers. My
girlfriend, dog, friends, motorcycles, bicycles, family...yes.
Computers...nope!

--- End Message ---
--- Begin Message ---
I'm a windows person (sorry) but i like playing around in RedHat Linux but
havent sorted out PHP and MySQL for it yet.



"Erik H. Mathy" <[EMAIL PROTECTED]> wrote in message
001a01c18741$6e4675e0$3700020a@erik_laptop">news:001a01c18741$6e4675e0$3700020a@erik_laptop...
> > Anyone doesn't running Linux/FreeBSD/NetBSD/Solaris at home raise a
hand,
> > please.
>
> Me! I don't run anything at home. OK, a Sega Dreamcast, but it's OS
doesn't
> count.
>
> Once I leave work, I don't want anything to do with computers. My
> girlfriend, dog, friends, motorcycles, bicycles, family...yes.
> Computers...nope!
>


--- End Message ---
--- Begin Message ---
Well, technically, depending on what game you play, you may end up using an
MS operating system. Some Dreamcast games were developed using Windows CE,
and ship with the OS on the GD-ROM. All of the other games use Sega's own
OS.

As for the large amount of MS bashing/anti-bashing going on here lately, I
always got the impression that the Windows part of this list more often than
not indicated the development platform, not the deployment platform. Each OS
has its uses.

I use Windows almost exclusively for my development (albeit with Apache not
IIS), and Linux/BSD (whatever my HSP uses) for the hosting. I would suspect
that most people here are running a similar setup.

-----Original Message-----
From: Erik H. Mathy [mailto:[EMAIL PROTECTED]]
Sent: 17-Dec-01 14:26
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Re: coffee message


> Anyone doesn't running Linux/FreeBSD/NetBSD/Solaris at home raise a hand,
> please.

Me! I don't run anything at home. OK, a Sega Dreamcast, but it's OS doesn't
count.

Once I leave work, I don't want anything to do with computers. My
girlfriend, dog, friends, motorcycles, bicycles, family...yes.
Computers...nope!


--
PHP Windows 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]


--- End Message ---
--- Begin Message ---
>> But it uses a Motorola 6502, and that's been proven to be a secure CPU.
By
>> the way it is Win200 and not Win2k.
>
>Is that their new embedded server OS?

No, that's Windoes CE (CErebral cavernous malformations), Win200 in our in
house patched version of Win3.11 cross complied on a Microbee to a Sinclair
to complain with the Temperature Monitoring System, the Containment
Environmental Monitoring System and the Non Essential Service Water System
as described in IEEE 805.

As you guys might now, we some times over do our coffee a little bit here in
Harrisburg. Therefor one guy (actually the cleaner) thought it might be a
good idea to keep it monitored by a machine instead.
--- End Message ---
--- Begin Message ---
Got to leave this interesting thread, but keep the good work, at least
win200 is more secure.
A+
Alain


-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 1:40 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Re: coffee message


>> But it uses a Motorola 6502, and that's been proven to be a secure CPU.
By
>> the way it is Win200 and not Win2k.
>
>Is that their new embedded server OS?

No, that's Windoes CE (CErebral cavernous malformations), Win200 in our in
house patched version of Win3.11 cross complied on a Microbee to a Sinclair
to complain with the Temperature Monitoring System, the Containment
Environmental Monitoring System and the Non Essential Service Water System
as described in IEEE 805.

As you guys might now, we some times over do our coffee a little bit here in
Harrisburg. Therefor one guy (actually the cleaner) thought it might be a
good idea to keep it monitored by a machine instead.

--
PHP Windows 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]

--- End Message ---
--- Begin Message ---
I am trying to create a two step form sequence using three files - one file
is html and the other two are php.

I am using Julie Meloni's book, "PHP Fast and Easy" as my source and the
code is from that book on pp.198-209.

The three files are:

1. show_createtable.html

2. do_showfielddef.php

3. do_createtable.php

I am able to connect to mysql since I have tested her previous scripts
before this chapter.

And, I am able to fill out and submit the first html form which is merely
two textboxes with a place for your table name and number of fields.

I then submit that form and get the second script  (do_showfielddef.php)
where I have three boxes for the attributes of the fields - name, type and
length.

When I fill out that form and hit submit... I am getting a:

 "Couldn't execute query" .

This happens on many of my tables that I am trying to create.

I have listed the three scripts below.

If anybody can assist me that would be great.  Please note that her username
and password  in the mysql_connect function are taken from the book.

Many thanks,
Tony Ritter
.......................................................

// #1 script

<HTML>
<HEAD>
<TITLE>Create a Database Table: Step 1</TITLE>
</HEAD>
<BODY>

<H1>Step 1: Name and Number</H1>

<FORM METHOD="POST" ACTION="do_showfielddef.php">

<P><strong>Table Name:</strong><br>
<INPUT TYPE="text" NAME="table_name" SIZE=30></p>

<P><strong>Number of Fields:</strong><br>
<INPUT TYPE="text" NAME="num_fields" SIZE=5></p>

<P><INPUT TYPE="submit" NAME="submit" VALUE="Go to Step 2"></p>

</FORM>

</BODY>
</HTML>
.........................................................

// #2 script
<?

if ((!$table_name) || (!$num_fields)) {
 header( "Location: http://localhost/show_createtable.html";);
 exit;
}

$form_block = "

<FORM METHOD=\"POST\" ACTION=\"do_createtable.php\">
<INPUT TYPE=\"hidden\" NAME=\"table_name\" VALUE=\"$table_name\">

<TABLE CELLSPACING=5 CELLPADDING=5>
<TR>
<TH>FIELD NAME</TH><TH>FIELD TYPE</TH><TH>FIELD LENGTH</TH></TR>

";

// create form fields on the fly

for ($i = 0 ; $i <$num_fields; $i++) {

 $form_block .= "
 <TR>

 <TD ALIGN=CENTER><INPUT TYPE=\"text\" NAME=\"field_name[]\"
SIZE=\"30\"></TD>

 <TD ALIGN=CENTER>
 <SELECT NAME=\"field_type[]\">
  <OPTION VALUE=\"char\">char</OPTION>
  <OPTION VALUE=\"date\">date</OPTION>
  <OPTION VALUE=\"float\">float</OPTION>
  <OPTION VALUE=\"int\">int</OPTION>
  <OPTION VALUE=\"text\">text</OPTION>
  <OPTION VALUE=\"varchar\">varchar</OPTION>
 </SELECT>
 </TD>

 <TD ALIGN=CENTER><INPUT TYPE=\"text\" NAME=\"field_length[]\"
SIZE=\"5\"></TD>

 </TR>
 ";

}


$form_block .= "
<TR>
<TD ALIGN=CENTER COLSPAN=3><INPUT TYPE=\"submit\" VALUE=\"Create
Table\"></TD>
</TR>

</TABLE>
</FORM>
";


?>

<HTML>
<HEAD>
<TITLE>Create a Database Table: Step 2</TITLE>
</HEAD>
<BODY>

<H1>Define fields for  <? echo  "$table_name"; ?></H1>

<? echo "$form_block"; ?>


</BODY>
</HTML>
...........................................................

// # 3 script

<?

$db_name = "testDB";

$connection = @mysql_connect("localhost", "sandman", "tQ9472b")
 or die("Couldn't connect.");

$db = @mysql_select_db($db_name, $connection)
 or die("Couldn't select database.");

$sql = "CREATE TABLE $table_name (";

for ($i = 0; $i < count($field_name); $i++) {

 $sql .= "$field_name[$i] $field_type[$i]";

 if ($field_length[$i] != "") {
  $sql .= " ($field_length[$i]),";
 } else {
  $sql .= ",";
 }
}

$sql = substr($sql, 0, -1);

$sql .= ")";


$result = mysql_query($sql,$connection)
 or die("Couldn't execute query.");

if ($result)

 $msg =  "<P>$table_name has been created!</p>";
}


?>

<HTML>
<HEAD>
<TITLE>Create a Database Table: Step 3</TITLE>
</HEAD>
<BODY>

<h1>Adding table to <? echo "$db_name"; ?>...</h1>

<? echo "$msg"; ?>


</BODY>
</HTML>






--- End Message ---

Reply via email to