php-windows Digest 21 Nov 2002 18:36:03 -0000 Issue 1451

Topics (messages 17055 through 17072):

Re: Question from a total newb
        17055 by: Joe Finlinson
        17056 by: Davy Obdam
        17057 by: Dash McElroy
        17059 by: Joe Finlinson
        17061 by: Dash McElroy
        17064 by: Cam Dunstan
        17065 by: Joe Finlinson
        17067 by: Joe Finlinson
        17068 by: erythros
        17069 by: Dash McElroy
        17070 by: Dash McElroy

mysql loop problem
        17058 by: Gareth Thomas
        17060 by: Dash McElroy

Re: Why run apache and IIS ?
        17062 by: Neil Smith

iconv()
        17063 by: Alexander Kuznetsov

remote machine data
        17066 by: Szilard Bokros

Extensions
        17071 by: Gary Hayers

documentation questions
        17072 by: Darren Reynolds

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 ---
Thank you for your help... by some miracle and with your advice things seem
to be working ok.  However, I am having a heck of a time figuring out how
mysql works into the whole thing.  I was trying to follow a tutorial that
came with dreamweaver, and it just gets me all confused.  I setup a user and
password but at the command prompt I can't manage to log in.  How do you do
the sql stuff?  Also, once all this is going how would I go about actually
installing a php script into my webpage... or better yet... what kinds of
tools are out there to help me write php?





"Dash McElroy" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Alright, I'll take the bait.
>
> 1. If you've got IIS installed, why are you trying to install Apache?
> Choose one or the other.
>
> 2. Configuration for either server should be drop dead easy. The PHP
> installer exe file should configure IIS (I don't use IIS, fortunately),
> and the zip file contains what you should use for Apache. Put it in c:\php
> (or wherever...). Apache config is easy for a localhost install. You'll
> have to change a few lines and add a few.
>
>  a. For an Apache server without a DNS entry, change the following line to
> reference your IP:
>
> ServerName xxx.xxx.xxx.xxx
>
>  b. Add these lines for PHP
>
> LoadModule c:/php/sapi/php4apache.dll
> AddType application/x-httpd-php .php
>
>  c. Change this line if you want index.php to be a valid initial page:
>
> DirectoryIndex index.html
>
>  to
>
> DirectoryIndex index.php index.html
>
>  d. Restart Apache.
>
> 3. Get MySQL from MySQL.com and install it where you want. MySQL should be
> the easiest thing to install of the three. Set up a user and a password
> for PHP. I initially learned MySQL (scratch that - still learning) using
> the root user (very dangerous) until got a grasp of it's permissions.
> Definitely don't do that for code that others will use.
>
> Good luck!
>
> -Dash
>
> Immortality -- a fate worse than death.
> -- Edgar A. Shoaff
>
> On Wed, 20 Nov 2002, Joe Finlinson wrote:
>
> > I am using a machine running Windows XP pro... I managed to install IIS
just
> > fine.  However, it seems that I am having major traumas getting PHP,
Apache,
> > and mysql to function.  I have tried downloading some pre-configured
kits
> > from various sites with no luck.  Can any of you suggest a place where I
can
> > download the software... and give me some advice on configuring it.
> >
> > Thanks in advance,
> > Joe
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>


--- End Message ---
--- Begin Message ---
Hi Joe,

You only need either Apache or IIS, not both. I am also running WinXP,
but i have Home edition so i have no choice other then to run Apache,
but Apache is better anyways;-)
I have Apache 2.0.40 (http://httpd.apache.org/) with PHP 4.3.2(
http://www.php.net/downloads.php) and MySQL 3.23.52(
http://www.mysql.com )And it all works fine. First remove IIS, however u
can run both if u change the ports, both Apache and IIS listen to port
80 by default, if u change that for one of em.... But i would go with
Apache. First instal MySQL, after installing go to C:/mysql/bin and
click on WinMysqladmin and it works. Then instal Apache.. Type in
http://localhost to confirm apache is running. Now install PHP, if u
want and easy way take the installer version, but i would recommend the
ZIP file. Unzip this to C:/php and copy the php4ts.dll file to
C:/WINDOWS/System32 and copy the php.ini-dist to C:/WINDOWS and rename
it to php.ini. Now your almost done... Add the following lines to you
http.conf file: ( Change your path according to your installation)

#Added myself for php(SAPI-Version)
#
LoadModule php4_module "C:/PHP/sapi/php4apache2.dll"
AddType application/x-httpd-php .php .php3 .phtml
#

Restart your webserver and it should work;-)
Make a script with :

<?php
phpinfo();
?>

And place it into you webserver root.. Call it info.php for instance and
with your browser poin to http://localhost/info.php and if everything
works you should see a page. Have FUN.

Best regards,
 
Davy Obdam
 
Obdam w e b d e s i g nC
Webdesign, application and database development
tel : +31(0)641 222 385
mailto:[EMAIL PROTECTED]


> -----Oorspronkelijk bericht-----
> Van: Joe Finlinson [mailto:[EMAIL PROTECTED]] 
> Verzonden: donderdag 21 november 2002 2:25
> Aan: [EMAIL PROTECTED]
> Onderwerp: [PHP-WIN] Question from a total newb
> 
> 
> I am using a machine running Windows XP pro... I managed to 
> install IIS just fine.  However, it seems that I am having 
> major traumas getting PHP, Apache, and mysql to function.  I 
> have tried downloading some pre-configured kits from various 
> sites with no luck.  Can any of you suggest a place where I 
> can download the software... and give me some advice on 
> configuring it.
> 
> Thanks in advance,
> Joe
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> ================================================================
> Deze e-mail is door E-mail VirusScanner van Planet Internet 
> gecontroleerd op virussen. Op http://www.planet.nl/evs staat 
> een verwijzing naar de actuele lijst waar op wordt gecontroleerd.
> 
> 


--- End Message ---
--- Begin Message ---
Glad I could be of assistance.

I had a hard time getting the hang of MySQL, so I downloaded phpMyAdmin
(www.phpmyadmin.net), set it up, and watched the SQL commands fly.

Try this:

mysql -u <user> -p <return> (it should ask you for a password)

Here's a grand question: What do you want to do with PHP? Interactive
forms? Interactive content? Website counter? etc...

As far as tools that make PHP, I know of one that will do some PHP for
you. Dreamweaver MX. I haven't used it myself, but it looks pretty slick.
I prefer to do my PHP manually (text editor all the way). I tried
ActiveState's Komodo for a while ($30 personal license, $300 commercial or
so) but it's not as slick and clean as a plain jane text editor. I'm sure
there are other tools that will assist you with PHP.

The great thing about PHP is that it integrates flawlessly with existing
HTML. Just put the PHP tags in an html file (rename it .php if that's the
only server mapping for PHP) and it will be parsed right among the HTML.

There are also lots of resources on the web like phpbuilder.com and a few
others. Check the links page on php.net. And if you've got the funds, get
a good book. Just be careful that PHP 4.2.x and beyond have a new way of
accessing variables (see
http://www.php.net/manual/en/security.registerglobals.php for more info)
with register_globals turned off.

And above all, have fun!

-Dash

Hard work may not kill you, but why take chances?

On Wed, 20 Nov 2002, Joe Finlinson wrote:

> Thank you for your help... by some miracle and with your advice things seem
> to be working ok.  However, I am having a heck of a time figuring out how
> mysql works into the whole thing.  I was trying to follow a tutorial that
> came with dreamweaver, and it just gets me all confused.  I setup a user and
> password but at the command prompt I can't manage to log in.  How do you do
> the sql stuff?  Also, once all this is going how would I go about actually
> installing a php script into my webpage... or better yet... what kinds of
> tools are out there to help me write php?
>
>
>
>
>
> "Dash McElroy" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Alright, I'll take the bait.
> >
> > 1. If you've got IIS installed, why are you trying to install Apache?
> > Choose one or the other.
> >
> > 2. Configuration for either server should be drop dead easy. The PHP
> > installer exe file should configure IIS (I don't use IIS, fortunately),
> > and the zip file contains what you should use for Apache. Put it in c:\php
> > (or wherever...). Apache config is easy for a localhost install. You'll
> > have to change a few lines and add a few.
> >
> >  a. For an Apache server without a DNS entry, change the following line to
> > reference your IP:
> >
> > ServerName xxx.xxx.xxx.xxx
> >
> >  b. Add these lines for PHP
> >
> > LoadModule c:/php/sapi/php4apache.dll
> > AddType application/x-httpd-php .php
> >
> >  c. Change this line if you want index.php to be a valid initial page:
> >
> > DirectoryIndex index.html
> >
> >  to
> >
> > DirectoryIndex index.php index.html
> >
> >  d. Restart Apache.
> >
> > 3. Get MySQL from MySQL.com and install it where you want. MySQL should be
> > the easiest thing to install of the three. Set up a user and a password
> > for PHP. I initially learned MySQL (scratch that - still learning) using
> > the root user (very dangerous) until got a grasp of it's permissions.
> > Definitely don't do that for code that others will use.
> >
> > Good luck!
> >
> > -Dash
> >
> > Immortality -- a fate worse than death.
> > -- Edgar A. Shoaff
> >
> > On Wed, 20 Nov 2002, Joe Finlinson wrote:
> >
> > > I am using a machine running Windows XP pro... I managed to install IIS
> just
> > > fine.  However, it seems that I am having major traumas getting PHP,
> Apache,
> > > and mysql to function.  I have tried downloading some pre-configured
> kits
> > > from various sites with no luck.  Can any of you suggest a place where I
> can
> > > download the software... and give me some advice on configuring it.
> > >
> > > Thanks in advance,
> > > Joe
> > >
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
> Here's a grand question: What do you want to do with PHP? Interactive
> forms? Interactive content? Website counter? etc...

I am a college student who is in way over his head.  I am having a lot of
fun, and learning a lot, but for what was supposed to be a writing 3400
class, I feel this is a little over the top.  The long and short of the
question is, I have been assigned to redo the website for a non-profit here
in town, (and they are more than happy, because it is free.)  They have
asked for an event calendar, and an easy way to update a news section on
their site.  As I got into research I realized that plain old HTML wasn't
going to work, and the host company really doesn't like cgi scripts... they
suggested that I get into PHP.  I have no idea how to code it, I am barely
walking in HTML at the moment, dreamweaver helps a lot, but this PHP stuff
is flying over my head... I am about 10 hours into it now, and I realize
that sooner or later (hopefully sooner) this will be a great tool for me.  I
have been looking at the following PHP calendar scripts, although I have no
idea how they are actually to be implemented into my site.  I really
appreciate your comments and help... you are saving me hours of
frustrations.

http://www.luciddesigns.com/calendar/

http://myphpcalendar.sourceforge.net/

http://calendar.codewalkers.com/   I LIKE THIS ONE!!!!






"Dash McElroy" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Glad I could be of assistance.
>
> I had a hard time getting the hang of MySQL, so I downloaded phpMyAdmin
> (www.phpmyadmin.net), set it up, and watched the SQL commands fly.
>
> Try this:
>
> mysql -u <user> -p <return> (it should ask you for a password)
>
> Here's a grand question: What do you want to do with PHP? Interactive
> forms? Interactive content? Website counter? etc...
>
> As far as tools that make PHP, I know of one that will do some PHP for
> you. Dreamweaver MX. I haven't used it myself, but it looks pretty slick.
> I prefer to do my PHP manually (text editor all the way). I tried
> ActiveState's Komodo for a while ($30 personal license, $300 commercial or
> so) but it's not as slick and clean as a plain jane text editor. I'm sure
> there are other tools that will assist you with PHP.
>
> The great thing about PHP is that it integrates flawlessly with existing
> HTML. Just put the PHP tags in an html file (rename it .php if that's the
> only server mapping for PHP) and it will be parsed right among the HTML.
>
> There are also lots of resources on the web like phpbuilder.com and a few
> others. Check the links page on php.net. And if you've got the funds, get
> a good book. Just be careful that PHP 4.2.x and beyond have a new way of
> accessing variables (see
> http://www.php.net/manual/en/security.registerglobals.php for more info)
> with register_globals turned off.
>
> And above all, have fun!
>
> -Dash
>
> Hard work may not kill you, but why take chances?
>
> On Wed, 20 Nov 2002, Joe Finlinson wrote:
>
> > Thank you for your help... by some miracle and with your advice things
seem
> > to be working ok.  However, I am having a heck of a time figuring out
how
> > mysql works into the whole thing.  I was trying to follow a tutorial
that
> > came with dreamweaver, and it just gets me all confused.  I setup a user
and
> > password but at the command prompt I can't manage to log in.  How do you
do
> > the sql stuff?  Also, once all this is going how would I go about
actually
> > installing a php script into my webpage... or better yet... what kinds
of
> > tools are out there to help me write php?
> >
> >
> >
> >
> >
> > "Dash McElroy" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Alright, I'll take the bait.
> > >
> > > 1. If you've got IIS installed, why are you trying to install Apache?
> > > Choose one or the other.
> > >
> > > 2. Configuration for either server should be drop dead easy. The PHP
> > > installer exe file should configure IIS (I don't use IIS,
fortunately),
> > > and the zip file contains what you should use for Apache. Put it in
c:\php
> > > (or wherever...). Apache config is easy for a localhost install.
You'll
> > > have to change a few lines and add a few.
> > >
> > >  a. For an Apache server without a DNS entry, change the following
line to
> > > reference your IP:
> > >
> > > ServerName xxx.xxx.xxx.xxx
> > >
> > >  b. Add these lines for PHP
> > >
> > > LoadModule c:/php/sapi/php4apache.dll
> > > AddType application/x-httpd-php .php
> > >
> > >  c. Change this line if you want index.php to be a valid initial page:
> > >
> > > DirectoryIndex index.html
> > >
> > >  to
> > >
> > > DirectoryIndex index.php index.html
> > >
> > >  d. Restart Apache.
> > >
> > > 3. Get MySQL from MySQL.com and install it where you want. MySQL
should be
> > > the easiest thing to install of the three. Set up a user and a
password
> > > for PHP. I initially learned MySQL (scratch that - still learning)
using
> > > the root user (very dangerous) until got a grasp of it's permissions.
> > > Definitely don't do that for code that others will use.
> > >
> > > Good luck!
> > >
> > > -Dash
> > >
> > > Immortality -- a fate worse than death.
> > > -- Edgar A. Shoaff
> > >
> > > On Wed, 20 Nov 2002, Joe Finlinson wrote:
> > >
> > > > I am using a machine running Windows XP pro... I managed to install
IIS
> > just
> > > > fine.  However, it seems that I am having major traumas getting PHP,
> > Apache,
> > > > and mysql to function.  I have tried downloading some pre-configured
> > kits
> > > > from various sites with no luck.  Can any of you suggest a place
where I
> > can
> > > > download the software... and give me some advice on configuring it.
> > > >
> > > > Thanks in advance,
> > > > Joe
> > > >
> > > >
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>


--- End Message ---
--- Begin Message ---
Sounds cool. PHP has been a great tool for the past 2.5 years for me. It
most certainly has come in handy.

The calendar at calendar.codewalkers.com looks slick.

I would heavily advise getting a book so you have a piece of paper you can
turn to or flip to. A good one is PHP and MySQL Web Development by Luke
Welling and Laura Thompson.

Have fun and keep us (or me?) updated.

-Dash

Brady's First Law of Problem Solving:
        When confronted by a difficult problem, you can solve it more
easily by reducing it to the question, "How would the Lone Ranger have
handled this?"

On Thu, 21 Nov 2002, Joe Finlinson wrote:

> > Here's a grand question: What do you want to do with PHP? Interactive
> > forms? Interactive content? Website counter? etc...
>
> I am a college student who is in way over his head.  I am having a lot of
> fun, and learning a lot, but for what was supposed to be a writing 3400
> class, I feel this is a little over the top.  The long and short of the
> question is, I have been assigned to redo the website for a non-profit here
> in town, (and they are more than happy, because it is free.)  They have
> asked for an event calendar, and an easy way to update a news section on
> their site.  As I got into research I realized that plain old HTML wasn't
> going to work, and the host company really doesn't like cgi scripts... they
> suggested that I get into PHP.  I have no idea how to code it, I am barely
> walking in HTML at the moment, dreamweaver helps a lot, but this PHP stuff
> is flying over my head... I am about 10 hours into it now, and I realize
> that sooner or later (hopefully sooner) this will be a great tool for me.  I
> have been looking at the following PHP calendar scripts, although I have no
> idea how they are actually to be implemented into my site.  I really
> appreciate your comments and help... you are saving me hours of
> frustrations.
>
> http://www.luciddesigns.com/calendar/
>
> http://myphpcalendar.sourceforge.net/
>
> http://calendar.codewalkers.com/   I LIKE THIS ONE!!!!
>
>
>
>
>
>
> "Dash McElroy" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Glad I could be of assistance.
> >
> > I had a hard time getting the hang of MySQL, so I downloaded phpMyAdmin
> > (www.phpmyadmin.net), set it up, and watched the SQL commands fly.
> >
> > Try this:
> >
> > mysql -u <user> -p <return> (it should ask you for a password)
> >
> > Here's a grand question: What do you want to do with PHP? Interactive
> > forms? Interactive content? Website counter? etc...
> >
> > As far as tools that make PHP, I know of one that will do some PHP for
> > you. Dreamweaver MX. I haven't used it myself, but it looks pretty slick.
> > I prefer to do my PHP manually (text editor all the way). I tried
> > ActiveState's Komodo for a while ($30 personal license, $300 commercial or
> > so) but it's not as slick and clean as a plain jane text editor. I'm sure
> > there are other tools that will assist you with PHP.
> >
> > The great thing about PHP is that it integrates flawlessly with existing
> > HTML. Just put the PHP tags in an html file (rename it .php if that's the
> > only server mapping for PHP) and it will be parsed right among the HTML.
> >
> > There are also lots of resources on the web like phpbuilder.com and a few
> > others. Check the links page on php.net. And if you've got the funds, get
> > a good book. Just be careful that PHP 4.2.x and beyond have a new way of
> > accessing variables (see
> > http://www.php.net/manual/en/security.registerglobals.php for more info)
> > with register_globals turned off.
> >
> > And above all, have fun!
> >
> > -Dash
> >
> > Hard work may not kill you, but why take chances?
> >
> > On Wed, 20 Nov 2002, Joe Finlinson wrote:
> >
> > > Thank you for your help... by some miracle and with your advice things
> seem
> > > to be working ok.  However, I am having a heck of a time figuring out
> how
> > > mysql works into the whole thing.  I was trying to follow a tutorial
> that
> > > came with dreamweaver, and it just gets me all confused.  I setup a user
> and
> > > password but at the command prompt I can't manage to log in.  How do you
> do
> > > the sql stuff?  Also, once all this is going how would I go about
> actually
> > > installing a php script into my webpage... or better yet... what kinds
> of
> > > tools are out there to help me write php?
> > >
> > >
> > >
> > >
> > >
> > > "Dash McElroy" <[EMAIL PROTECTED]> wrote in message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > Alright, I'll take the bait.
> > > >
> > > > 1. If you've got IIS installed, why are you trying to install Apache?
> > > > Choose one or the other.
> > > >
> > > > 2. Configuration for either server should be drop dead easy. The PHP
> > > > installer exe file should configure IIS (I don't use IIS,
> fortunately),
> > > > and the zip file contains what you should use for Apache. Put it in
> c:\php
> > > > (or wherever...). Apache config is easy for a localhost install.
> You'll
> > > > have to change a few lines and add a few.
> > > >
> > > >  a. For an Apache server without a DNS entry, change the following
> line to
> > > > reference your IP:
> > > >
> > > > ServerName xxx.xxx.xxx.xxx
> > > >
> > > >  b. Add these lines for PHP
> > > >
> > > > LoadModule c:/php/sapi/php4apache.dll
> > > > AddType application/x-httpd-php .php
> > > >
> > > >  c. Change this line if you want index.php to be a valid initial page:
> > > >
> > > > DirectoryIndex index.html
> > > >
> > > >  to
> > > >
> > > > DirectoryIndex index.php index.html
> > > >
> > > >  d. Restart Apache.
> > > >
> > > > 3. Get MySQL from MySQL.com and install it where you want. MySQL
> should be
> > > > the easiest thing to install of the three. Set up a user and a
> password
> > > > for PHP. I initially learned MySQL (scratch that - still learning)
> using
> > > > the root user (very dangerous) until got a grasp of it's permissions.
> > > > Definitely don't do that for code that others will use.
> > > >
> > > > Good luck!
> > > >
> > > > -Dash
> > > >
> > > > Immortality -- a fate worse than death.
> > > > -- Edgar A. Shoaff
> > > >
> > > > On Wed, 20 Nov 2002, Joe Finlinson wrote:
> > > >
> > > > > I am using a machine running Windows XP pro... I managed to install
> IIS
> > > just
> > > > > fine.  However, it seems that I am having major traumas getting PHP,
> > > Apache,
> > > > > and mysql to function.  I have tried downloading some pre-configured
> > > kits
> > > > > from various sites with no luck.  Can any of you suggest a place
> where I
> > > can
> > > > > download the software... and give me some advice on configuring it.
> > > > >
> > > > > Thanks in advance,
> > > > > Joe
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > PHP Windows Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
hey Joe,

You ought to try some of those tools for MySQL Dash recommends, there`s some
beauties amongst them, especially phpmyadmin.  In the meantime, here is a
little script, quick and dirty that will let you look at a database and
generate some basic queries and forms for you.
Just copy and paste this into a script file, change the $dbase value near
the top of the script to your database name and "run" it, it does nothing to
your database except read it and knock up some php code for you.

Use it for two things....

1. an object  lesson in how NOT to program, avoid the sloppy lazy style,
total lack of comments and abysmal presentation of results.

2. Takes a little of the tedium out of keying up a long query or form when
you can`t remember fieldnames etc


But remember!  you`re a newbie!  you mustn`t produce sloppy code with no
comments, no error checking, no indentation and no proper presentation of
results until you`re an expert!

 good luck!




<?php

$dbase = "beadace";

$db = mysql_connect("localhost", "root");


function friendly_date($mydate){
// unix or mysql string type datetime to friendly dd/mm/yyyy type date
string
return date("d/m/Y", strtotime($mydate));
}




mysql_select_db($dbase,$db);

$underline = "-";
for ($m = 0; $m < 60; $m++){
$underline = $underline."-";
}
$underline = $underline."<br>\n";

$result = mysql_list_tables($dbase);
$rowcount = mysql_num_rows($result);


for ($j = 0; $j < $rowcount; $j++){
$tablenam = mysql_tablename($result, $j);
echo $underline;
echo $tablenam.";";

$fieldresult =  mysql_list_fields($dbase, $tablenam);
$fieldcount =  mysql_num_fields($fieldresult);
echo $fieldcount."<br>\n";
//echo "<br>";

$updatestatement = "\"UPDATE ".$tablenam." SET ";
$insertprefix = "\"INSERT INTO ".$tablenam." (";
$insertsuffix = " VALUES (";
$formstatement = "";


for ($k = 0; $k < $fieldcount; $k++){

$fieldnam = mysql_field_name($fieldresult, $k);

if ((strpos($fieldnam, "hoto") > 0) || (strpos($fieldnam, "humbnail") > 0)){
$fieldnaminsert = $fieldnam."_name";
} else {
$fieldnaminsert = $fieldnam;
}

echo "&nbsp;&nbsp;&nbsp;".$fieldnam.";";
$fieldtyp = mysql_field_type($fieldresult, $k);
echo $fieldtyp.";";
$fieldsiz = mysql_field_len($fieldresult, $k);
echo $fieldsiz.";<br>\n";

$sep = "\\\"";
if (((strcmp($fieldtyp, "int") ==0)) || ((strcmp($fieldtyp, "real")
==0))){$sep = ""; }

$fieldlabel = ucwords(str_replace("_", " ", $fieldnam));

if (strcmp($fieldtyp, "datetime") == 0){
$scriptstatement = "<"."?"."php if ("."$"."addrec == 0){echo
friendly_date($"."myrow[\"".$fieldnam."\"])"."; }"." ?".">";
} else {
$scriptstatement = "<"."?"."php if ("."$"."addrec == 0){echo
$"."myrow[\"".$fieldnam."\"]"."; }"." ?".">";
}

if ($fieldsiz > 64){
$formstatement = $formstatement.$fieldlabel."<br><textarea cols=\"40\"
rows=\"8\"
name=\"".$fieldnam."\">".$scriptstatement."</textarea><br><br>\n";
} else {
$formstatement = $formstatement.$fieldlabel." <input type=\"text\"
size=\"".$fieldsiz."\" name=\"".$fieldnam."\"
value=\"".$scriptstatement."\"><br>\n";
}

$updatestatement =
$updatestatement.$fieldnam."=".$sep."\".$".$fieldnaminsert.".\"".$sep;

$insertprefix = $insertprefix.$fieldnam;
$insertsuffix = $insertsuffix.$sep."\".$".$fieldnaminsert.".\"".$sep;

if ($k < ($fieldcount - 1)){
$updatestatement = $updatestatement.", ";
$insertprefix = $insertprefix.", ";
$insertsuffix = $insertsuffix.", ";
}

}
$updatestatement = $updatestatement." WHERE
pin=\\\""."\".$"."pin.\""."\\\"\";";
echo $updatestatement."<br>\n";

$insertstatement = $insertprefix.")".$insertsuffix.")\";";
echo $insertstatement."<br>\n\n";

$formstatement = $formstatement."</form>\n";

echo "<p>View Source to inspect FORMS design code.</p>\n";

echo "<!--\n";
echo "<form ENCTYPE=\"multipart/form-data\" name=\"someform\"
action=\"somescript.php\" method=\"POST\">\n";
echo "<INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"1000000\">\n";
echo $formstatement."<br>\n\n";
echo "-->\n";

}

?>






--- End Message ---
--- Begin Message ---
You are all helping me SOOO much!  I did manage to download myphpadmin...
and by some miracle got through the installation process.  It is a pretty
slick program although I have no idea what I am looking at.  I have learned
more in the last 10 hours than I ever thought possible, although I haven't
written a line of code besides a simple test to make sure that the PHP
server was configured correctly.  This stuff looks like it could really turn
out to be a ton of fun.

Anyway,  So what is the story about mysql... supposing I download a script
that requires a mysql database, would I want to configure that on my own
machine or configure it on the host computer... this is where things begin
to get confusing.  I am guessing that I can configure a mysql database from
the myphpadmin... and then I just add the fields that I want etc..???  I
think I will be hitting Barnes and Noble today so that I can buy that book
that Dash recommended... then maybe I will stop pestering all of you.
However in the meantime, I am ever so grateful for your kindness in helping
me step into this new world.


"Cam Dunstan" <[EMAIL PROTECTED]> wrote in message
003801c29179$29737ce0$7866a8c0@camhome">news:003801c29179$29737ce0$7866a8c0@camhome...
> hey Joe,
>
> You ought to try some of those tools for MySQL Dash recommends, there`s
some
> beauties amongst them, especially phpmyadmin.  In the meantime, here is a
> little script, quick and dirty that will let you look at a database and
> generate some basic queries and forms for you.
> Just copy and paste this into a script file, change the $dbase value near
> the top of the script to your database name and "run" it, it does nothing
to
> your database except read it and knock up some php code for you.
>
> Use it for two things....
>
> 1. an object  lesson in how NOT to program, avoid the sloppy lazy style,
> total lack of comments and abysmal presentation of results.
>
> 2. Takes a little of the tedium out of keying up a long query or form when
> you can`t remember fieldnames etc
>
>
> But remember!  you`re a newbie!  you mustn`t produce sloppy code with no
> comments, no error checking, no indentation and no proper presentation of
> results until you`re an expert!
>
>  good luck!
>
>
>
>
> <?php
>
> $dbase = "beadace";
>
> $db = mysql_connect("localhost", "root");
>
>
> function friendly_date($mydate){
> // unix or mysql string type datetime to friendly dd/mm/yyyy type date
> string
> return date("d/m/Y", strtotime($mydate));
> }
>
>
>
>
> mysql_select_db($dbase,$db);
>
> $underline = "-";
> for ($m = 0; $m < 60; $m++){
> $underline = $underline."-";
> }
> $underline = $underline."<br>\n";
>
> $result = mysql_list_tables($dbase);
> $rowcount = mysql_num_rows($result);
>
>
> for ($j = 0; $j < $rowcount; $j++){
> $tablenam = mysql_tablename($result, $j);
> echo $underline;
> echo $tablenam.";";
>
> $fieldresult =  mysql_list_fields($dbase, $tablenam);
> $fieldcount =  mysql_num_fields($fieldresult);
> echo $fieldcount."<br>\n";
> //echo "<br>";
>
> $updatestatement = "\"UPDATE ".$tablenam." SET ";
> $insertprefix = "\"INSERT INTO ".$tablenam." (";
> $insertsuffix = " VALUES (";
> $formstatement = "";
>
>
> for ($k = 0; $k < $fieldcount; $k++){
>
> $fieldnam = mysql_field_name($fieldresult, $k);
>
> if ((strpos($fieldnam, "hoto") > 0) || (strpos($fieldnam, "humbnail") >
0)){
> $fieldnaminsert = $fieldnam."_name";
> } else {
> $fieldnaminsert = $fieldnam;
> }
>
> echo "&nbsp;&nbsp;&nbsp;".$fieldnam.";";
> $fieldtyp = mysql_field_type($fieldresult, $k);
> echo $fieldtyp.";";
> $fieldsiz = mysql_field_len($fieldresult, $k);
> echo $fieldsiz.";<br>\n";
>
> $sep = "\\\"";
> if (((strcmp($fieldtyp, "int") ==0)) || ((strcmp($fieldtyp, "real")
> ==0))){$sep = ""; }
>
> $fieldlabel = ucwords(str_replace("_", " ", $fieldnam));
>
> if (strcmp($fieldtyp, "datetime") == 0){
> $scriptstatement = "<"."?"."php if ("."$"."addrec == 0){echo
> friendly_date($"."myrow[\"".$fieldnam."\"])"."; }"." ?".">";
> } else {
> $scriptstatement = "<"."?"."php if ("."$"."addrec == 0){echo
> $"."myrow[\"".$fieldnam."\"]"."; }"." ?".">";
> }
>
> if ($fieldsiz > 64){
> $formstatement = $formstatement.$fieldlabel."<br><textarea cols=\"40\"
> rows=\"8\"
> name=\"".$fieldnam."\">".$scriptstatement."</textarea><br><br>\n";
> } else {
> $formstatement = $formstatement.$fieldlabel." <input type=\"text\"
> size=\"".$fieldsiz."\" name=\"".$fieldnam."\"
> value=\"".$scriptstatement."\"><br>\n";
> }
>
> $updatestatement =
> $updatestatement.$fieldnam."=".$sep."\".$".$fieldnaminsert.".\"".$sep;
>
> $insertprefix = $insertprefix.$fieldnam;
> $insertsuffix = $insertsuffix.$sep."\".$".$fieldnaminsert.".\"".$sep;
>
> if ($k < ($fieldcount - 1)){
> $updatestatement = $updatestatement.", ";
> $insertprefix = $insertprefix.", ";
> $insertsuffix = $insertsuffix.", ";
> }
>
> }
> $updatestatement = $updatestatement." WHERE
> pin=\\\""."\".$"."pin.\""."\\\"\";";
> echo $updatestatement."<br>\n";
>
> $insertstatement = $insertprefix.")".$insertsuffix.")\";";
> echo $insertstatement."<br>\n\n";
>
> $formstatement = $formstatement."</form>\n";
>
> echo "<p>View Source to inspect FORMS design code.</p>\n";
>
> echo "<!--\n";
> echo "<form ENCTYPE=\"multipart/form-data\" name=\"someform\"
> action=\"somescript.php\" method=\"POST\">\n";
> echo "<INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"1000000\">\n";
> echo $formstatement."<br>\n\n";
> echo "-->\n";
>
> }
>
> ?>
>
>
>
>
>
>


--- End Message ---
--- Begin Message ---
ok... for example because I have no idea how to do this on my own... I found
a php calendar, and these were the install instructions:

ltwCalendar v1.5
written by Matt Wade - http://codewalkers.com
demo of ltwCalendar at http://codewalkers.com/cal/calendar.php
I don't care for all that license crap. Just use it as you will, but give
credit where it is due.

Install :

1. Stick all the files in a dir.
2. Modify the ltw_config.php file for your options.
3. Run install.php
4. Delete the install.php.

If you want to create more users in the future, upload install.php again.
But always delete it when you are done

How do you "run" install.php.... it looks like every other php doc?  There
must be something that I am clearly missing BIG TIME.


--- End Message ---
--- Begin Message ---
??? where did you get PHP 4.3.2 ??? the php website only has 4.2.3 and i
could get that to work with Apache 2
"Davy Obdam" <[EMAIL PROTECTED]> wrote in message
000001c2912a$a5cf5ec0$9600000a@hewlett0bg96om">news:000001c2912a$a5cf5ec0$9600000a@hewlett0bg96om...
> Hi Joe,
>
> You only need either Apache or IIS, not both. I am also running WinXP,
> but i have Home edition so i have no choice other then to run Apache,
> but Apache is better anyways;-)
> I have Apache 2.0.40 (http://httpd.apache.org/) with PHP 4.3.2(
> http://www.php.net/downloads.php) and MySQL 3.23.52(
> http://www.mysql.com )And it all works fine. First remove IIS, however u
> can run both if u change the ports, both Apache and IIS listen to port
> 80 by default, if u change that for one of em.... But i would go with
> Apache. First instal MySQL, after installing go to C:/mysql/bin and
> click on WinMysqladmin and it works. Then instal Apache.. Type in
> http://localhost to confirm apache is running. Now install PHP, if u
> want and easy way take the installer version, but i would recommend the
> ZIP file. Unzip this to C:/php and copy the php4ts.dll file to
> C:/WINDOWS/System32 and copy the php.ini-dist to C:/WINDOWS and rename
> it to php.ini. Now your almost done... Add the following lines to you
> http.conf file: ( Change your path according to your installation)
>
> #Added myself for php(SAPI-Version)
> #
> LoadModule php4_module "C:/PHP/sapi/php4apache2.dll"
> AddType application/x-httpd-php .php .php3 .phtml
> #
>
> Restart your webserver and it should work;-)
> Make a script with :
>
> <?php
> phpinfo();
> ?>
>
> And place it into you webserver root.. Call it info.php for instance and
> with your browser poin to http://localhost/info.php and if everything
> works you should see a page. Have FUN.
>
> Best regards,
>
> Davy Obdam
>
> Obdam w e b d e s i g nC
> Webdesign, application and database development
> tel : +31(0)641 222 385
> mailto:[EMAIL PROTECTED]
>
>
> > -----Oorspronkelijk bericht-----
> > Van: Joe Finlinson [mailto:[EMAIL PROTECTED]]
> > Verzonden: donderdag 21 november 2002 2:25
> > Aan: [EMAIL PROTECTED]
> > Onderwerp: [PHP-WIN] Question from a total newb
> >
> >
> > I am using a machine running Windows XP pro... I managed to
> > install IIS just fine.  However, it seems that I am having
> > major traumas getting PHP, Apache, and mysql to function.  I
> > have tried downloading some pre-configured kits from various
> > sites with no luck.  Can any of you suggest a place where I
> > can download the software... and give me some advice on
> > configuring it.
> >
> > Thanks in advance,
> > Joe
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > ================================================================
> > Deze e-mail is door E-mail VirusScanner van Planet Internet
> > gecontroleerd op virussen. Op http://www.planet.nl/evs staat
> > een verwijzing naar de actuele lijst waar op wordt gecontroleerd.
> >
> >
>
>


--- End Message ---
--- Begin Message ---
"You musn't produce sloppy code with no comments, no error checking, no
indentation and no proper presentation of results until you're an expert!"

Great... So as soon as I started programming in PHP, I became an expert...
and now that I'm properly indenting my code and (finally) starting to use
comments, I've turned into a newbie!

Seriously, phpMyAdmin saved me major headaches in figuring out MySQL.

-Dash

Time flies like an arrow
Fruit flies like a banana

On Fri, 22 Nov 2002, Cam Dunstan wrote:

> hey Joe,
>
> You ought to try some of those tools for MySQL Dash recommends, there`s some
> beauties amongst them, especially phpmyadmin.  In the meantime, here is a
> little script, quick and dirty that will let you look at a database and
> generate some basic queries and forms for you.
> Just copy and paste this into a script file, change the $dbase value near
> the top of the script to your database name and "run" it, it does nothing to
> your database except read it and knock up some php code for you.
>
> Use it for two things....
>
> 1. an object  lesson in how NOT to program, avoid the sloppy lazy style,
> total lack of comments and abysmal presentation of results.
>
> 2. Takes a little of the tedium out of keying up a long query or form when
> you can`t remember fieldnames etc
>
>
> But remember!  you`re a newbie!  you mustn`t produce sloppy code with no
> comments, no error checking, no indentation and no proper presentation of
> results until you`re an expert!
>
>  good luck!
>
>
>
>
> <?php
>
> $dbase = "beadace";
>
> $db = mysql_connect("localhost", "root");
>
>
> function friendly_date($mydate){
> // unix or mysql string type datetime to friendly dd/mm/yyyy type date
> string
> return date("d/m/Y", strtotime($mydate));
> }
>
>
>
>
> mysql_select_db($dbase,$db);
>
> $underline = "-";
> for ($m = 0; $m < 60; $m++){
> $underline = $underline."-";
> }
> $underline = $underline."<br>\n";
>
> $result = mysql_list_tables($dbase);
> $rowcount = mysql_num_rows($result);
>
>
> for ($j = 0; $j < $rowcount; $j++){
> $tablenam = mysql_tablename($result, $j);
> echo $underline;
> echo $tablenam.";";
>
> $fieldresult =  mysql_list_fields($dbase, $tablenam);
> $fieldcount =  mysql_num_fields($fieldresult);
> echo $fieldcount."<br>\n";
> //echo "<br>";
>
> $updatestatement = "\"UPDATE ".$tablenam." SET ";
> $insertprefix = "\"INSERT INTO ".$tablenam." (";
> $insertsuffix = " VALUES (";
> $formstatement = "";
>
>
> for ($k = 0; $k < $fieldcount; $k++){
>
> $fieldnam = mysql_field_name($fieldresult, $k);
>
> if ((strpos($fieldnam, "hoto") > 0) || (strpos($fieldnam, "humbnail") > 0)){
> $fieldnaminsert = $fieldnam."_name";
> } else {
> $fieldnaminsert = $fieldnam;
> }
>
> echo "&nbsp;&nbsp;&nbsp;".$fieldnam.";";
> $fieldtyp = mysql_field_type($fieldresult, $k);
> echo $fieldtyp.";";
> $fieldsiz = mysql_field_len($fieldresult, $k);
> echo $fieldsiz.";<br>\n";
>
> $sep = "\\\"";
> if (((strcmp($fieldtyp, "int") ==0)) || ((strcmp($fieldtyp, "real")
> ==0))){$sep = ""; }
>
> $fieldlabel = ucwords(str_replace("_", " ", $fieldnam));
>
> if (strcmp($fieldtyp, "datetime") == 0){
> $scriptstatement = "<"."?"."php if ("."$"."addrec == 0){echo
> friendly_date($"."myrow[\"".$fieldnam."\"])"."; }"." ?".">";
> } else {
> $scriptstatement = "<"."?"."php if ("."$"."addrec == 0){echo
> $"."myrow[\"".$fieldnam."\"]"."; }"." ?".">";
> }
>
> if ($fieldsiz > 64){
> $formstatement = $formstatement.$fieldlabel."<br><textarea cols=\"40\"
> rows=\"8\"
> name=\"".$fieldnam."\">".$scriptstatement."</textarea><br><br>\n";
> } else {
> $formstatement = $formstatement.$fieldlabel." <input type=\"text\"
> size=\"".$fieldsiz."\" name=\"".$fieldnam."\"
> value=\"".$scriptstatement."\"><br>\n";
> }
>
> $updatestatement =
> $updatestatement.$fieldnam."=".$sep."\".$".$fieldnaminsert.".\"".$sep;
>
> $insertprefix = $insertprefix.$fieldnam;
> $insertsuffix = $insertsuffix.$sep."\".$".$fieldnaminsert.".\"".$sep;
>
> if ($k < ($fieldcount - 1)){
> $updatestatement = $updatestatement.", ";
> $insertprefix = $insertprefix.", ";
> $insertsuffix = $insertsuffix.", ";
> }
>
> }
> $updatestatement = $updatestatement." WHERE
> pin=\\\""."\".$"."pin.\""."\\\"\";";
> echo $updatestatement."<br>\n";
>
> $insertstatement = $insertprefix.")".$insertsuffix.")\";";
> echo $insertstatement."<br>\n\n";
>
> $formstatement = $formstatement."</form>\n";
>
> echo "<p>View Source to inspect FORMS design code.</p>\n";
>
> echo "<!--\n";
> echo "<form ENCTYPE=\"multipart/form-data\" name=\"someform\"
> action=\"somescript.php\" method=\"POST\">\n";
> echo "<INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"1000000\">\n";
> echo $formstatement."<br>\n\n";
> echo "-->\n";
>
> }
>
> ?>
>
>
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
So, if you want to use MySQL, create yourself a database and some tables
with the fields you like in phpMyAdmin, then connect PHP to the database.

If you download a PHP script that requires MySQL support, you'll likely
have to tell it what host, user and password MySQL requires. Depending on
the size of the script (i.e. one file or 200... etc) it will be in the
file or (most likely) an include file.

As for installing the calendar (two messages down...), just open up the
install.php file in a web browser (i.e. if you put the calendar in
htdocs\calendar, you'll call up http://localhost/calendar/install.php).
That should do the trick.

Glad you're learning stuff. Just don't let that brain explode...

-Dash

Time flies like an arrow
Fruit flies like a banana

On Thu, 21 Nov 2002, Joe Finlinson wrote:

> You are all helping me SOOO much!  I did manage to download myphpadmin...
> and by some miracle got through the installation process.  It is a pretty
> slick program although I have no idea what I am looking at.  I have learned
> more in the last 10 hours than I ever thought possible, although I haven't
> written a line of code besides a simple test to make sure that the PHP
> server was configured correctly.  This stuff looks like it could really turn
> out to be a ton of fun.
>
> Anyway,  So what is the story about mysql... supposing I download a script
> that requires a mysql database, would I want to configure that on my own
> machine or configure it on the host computer... this is where things begin
> to get confusing.  I am guessing that I can configure a mysql database from
> the myphpadmin... and then I just add the fields that I want etc..???  I
> think I will be hitting Barnes and Noble today so that I can buy that book
> that Dash recommended... then maybe I will stop pestering all of you.
> However in the meantime, I am ever so grateful for your kindness in helping
> me step into this new world.
>
>
> "Cam Dunstan" <[EMAIL PROTECTED]> wrote in message
> 003801c29179$29737ce0$7866a8c0@camhome">news:003801c29179$29737ce0$7866a8c0@camhome...
> > hey Joe,
> >
> > You ought to try some of those tools for MySQL Dash recommends, there`s
> some
> > beauties amongst them, especially phpmyadmin.  In the meantime, here is a
> > little script, quick and dirty that will let you look at a database and
> > generate some basic queries and forms for you.
> > Just copy and paste this into a script file, change the $dbase value near
> > the top of the script to your database name and "run" it, it does nothing
> to
> > your database except read it and knock up some php code for you.
> >
> > Use it for two things....
> >
> > 1. an object  lesson in how NOT to program, avoid the sloppy lazy style,
> > total lack of comments and abysmal presentation of results.
> >
> > 2. Takes a little of the tedium out of keying up a long query or form when
> > you can`t remember fieldnames etc
> >
> >
> > But remember!  you`re a newbie!  you mustn`t produce sloppy code with no
> > comments, no error checking, no indentation and no proper presentation of
> > results until you`re an expert!
> >
> >  good luck!
> >
> >
> >
> >
> > <?php
> >
> > $dbase = "beadace";
> >
> > $db = mysql_connect("localhost", "root");
> >
> >
> > function friendly_date($mydate){
> > // unix or mysql string type datetime to friendly dd/mm/yyyy type date
> > string
> > return date("d/m/Y", strtotime($mydate));
> > }
> >
> >
> >
> >
> > mysql_select_db($dbase,$db);
> >
> > $underline = "-";
> > for ($m = 0; $m < 60; $m++){
> > $underline = $underline."-";
> > }
> > $underline = $underline."<br>\n";
> >
> > $result = mysql_list_tables($dbase);
> > $rowcount = mysql_num_rows($result);
> >
> >
> > for ($j = 0; $j < $rowcount; $j++){
> > $tablenam = mysql_tablename($result, $j);
> > echo $underline;
> > echo $tablenam.";";
> >
> > $fieldresult =  mysql_list_fields($dbase, $tablenam);
> > $fieldcount =  mysql_num_fields($fieldresult);
> > echo $fieldcount."<br>\n";
> > //echo "<br>";
> >
> > $updatestatement = "\"UPDATE ".$tablenam." SET ";
> > $insertprefix = "\"INSERT INTO ".$tablenam." (";
> > $insertsuffix = " VALUES (";
> > $formstatement = "";
> >
> >
> > for ($k = 0; $k < $fieldcount; $k++){
> >
> > $fieldnam = mysql_field_name($fieldresult, $k);
> >
> > if ((strpos($fieldnam, "hoto") > 0) || (strpos($fieldnam, "humbnail") >
> 0)){
> > $fieldnaminsert = $fieldnam."_name";
> > } else {
> > $fieldnaminsert = $fieldnam;
> > }
> >
> > echo "&nbsp;&nbsp;&nbsp;".$fieldnam.";";
> > $fieldtyp = mysql_field_type($fieldresult, $k);
> > echo $fieldtyp.";";
> > $fieldsiz = mysql_field_len($fieldresult, $k);
> > echo $fieldsiz.";<br>\n";
> >
> > $sep = "\\\"";
> > if (((strcmp($fieldtyp, "int") ==0)) || ((strcmp($fieldtyp, "real")
> > ==0))){$sep = ""; }
> >
> > $fieldlabel = ucwords(str_replace("_", " ", $fieldnam));
> >
> > if (strcmp($fieldtyp, "datetime") == 0){
> > $scriptstatement = "<"."?"."php if ("."$"."addrec == 0){echo
> > friendly_date($"."myrow[\"".$fieldnam."\"])"."; }"." ?".">";
> > } else {
> > $scriptstatement = "<"."?"."php if ("."$"."addrec == 0){echo
> > $"."myrow[\"".$fieldnam."\"]"."; }"." ?".">";
> > }
> >
> > if ($fieldsiz > 64){
> > $formstatement = $formstatement.$fieldlabel."<br><textarea cols=\"40\"
> > rows=\"8\"
> > name=\"".$fieldnam."\">".$scriptstatement."</textarea><br><br>\n";
> > } else {
> > $formstatement = $formstatement.$fieldlabel." <input type=\"text\"
> > size=\"".$fieldsiz."\" name=\"".$fieldnam."\"
> > value=\"".$scriptstatement."\"><br>\n";
> > }
> >
> > $updatestatement =
> > $updatestatement.$fieldnam."=".$sep."\".$".$fieldnaminsert.".\"".$sep;
> >
> > $insertprefix = $insertprefix.$fieldnam;
> > $insertsuffix = $insertsuffix.$sep."\".$".$fieldnaminsert.".\"".$sep;
> >
> > if ($k < ($fieldcount - 1)){
> > $updatestatement = $updatestatement.", ";
> > $insertprefix = $insertprefix.", ";
> > $insertsuffix = $insertsuffix.", ";
> > }
> >
> > }
> > $updatestatement = $updatestatement." WHERE
> > pin=\\\""."\".$"."pin.\""."\\\"\";";
> > echo $updatestatement."<br>\n";
> >
> > $insertstatement = $insertprefix.")".$insertsuffix.")\";";
> > echo $insertstatement."<br>\n\n";
> >
> > $formstatement = $formstatement."</form>\n";
> >
> > echo "<p>View Source to inspect FORMS design code.</p>\n";
> >
> > echo "<!--\n";
> > echo "<form ENCTYPE=\"multipart/form-data\" name=\"someform\"
> > action=\"somescript.php\" method=\"POST\">\n";
> > echo "<INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"1000000\">\n";
> > echo $formstatement."<br>\n\n";
> > echo "-->\n";
> >
> > }
> >
> > ?>
> >
> >
> >
> >
> >
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Hi,

I am trying to write some code to sit and wait for an entry in a table, once an entry 
is made it is processed and then the waiting loop begins again. Problem is that after 
a period of time the code just stops, almost like a timeout with no error message or 
any indication of why. This is the code:

echo('Waiting for command \n');
   do {
      $result = mysql_query("SELECT * FROM command_queue LIMIT 1");
      $rows = mysql_num_rows($result);
      }
   while ($rows == 0);

My PHP version is 4.2.3. Does anyone have any idea why this is occurring? Is there 
maybe a better way of doing this?

Any help will be much appreciated.

Gareth

--- End Message ---
--- Begin Message ---
Gareth,

PHP has a default 30 second timeout. This can be changed in php.ini (not
reccomended) or by set_time_limit
(http://www.php.net/manual/en/function.set-time-limit.php). Set it to "0"
to disable the timout script.

-Dash

"I think the sky is blue because it's a shift from black through purple
to blue, and it has to do with where the light is.  You know, the
farther we get into darkness, and there's a shifting of color of light
into the blueness, and I think as you go farther and farther away from
the reflected light we have from the sun or the light that's bouncing
off this earth, uh, the darker it gets ... I think if you look at the
color scale, you start at black, move it through purple, move it on
out, it's the shifting of color.  We mentioned before about the stars
singing, and that's one of the effects of the shifting of colors."
                -- Pat Robertson, The 700 Club

On Wed, 20 Nov 2002, Gareth Thomas wrote:

> Hi,
>
> I am trying to write some code to sit and wait for an entry in a table, once an 
>entry is made it is processed and then the waiting loop begins again. Problem is that 
>after a period of time the code just stops, almost like a timeout with no error 
>message or any indication of why. This is the code:
>
> echo('Waiting for command \n');
>    do {
>       $result = mysql_query("SELECT * FROM command_queue LIMIT 1");
>       $rows = mysql_num_rows($result);
>       }
>    while ($rows == 0);
>
> My PHP version is 4.2.3. Does anyone have any idea why this is occurring? Is there 
>maybe a better way of doing this?
>
> Any help will be much appreciated.
>
> Gareth
>
>

--- End Message ---
--- Begin Message ---
At 06:08 21/11/2002 +0000, you wrote:
Subject: Re: [PHP-WIN] Question from a total newb

Alright, I'll take the bait.

1. If you've got IIS installed, why are you trying to install Apache?
Choose one or the other.
Its just possible he wants to run some legacy ASP or COM applications on IIS, using apache as a reverse-proxy for IIS.

<< Waits with bated breath for reasons *not* to do this - ok I venture stability, ease of use, security etc LOL

Neil Smith.
--- End Message ---
--- Begin Message ---
Hello All,

How can I use iconv functions under win32?
And can I?

-- 
Best regards,
Alexander Kuznetsov


--- End Message ---
--- Begin Message ---
Hello,
is there a way to retrieve data from remote computers using php?
I would like to have an application that retrievs data from remote
computers,
stores them in a database and displays them on a web interface.
I would like to retrieve data from the computers on my LAN like:
system configuration info (CPU, ROM, BIOS, RAM, disk info, video, mice,
system devices),
workstation serial number, Registry, startup files, installed software.

Also: how can I make a page open in Word instead of the browser?

<INPUT type="button" value="Open Word"
onclick="OpenWord()">
This script will open Word empty.
The file is generated on the fly,
so there is no real file to open, just the output from the webserver.
As far as I know, Word can open html pages as well as documents.
The problem is: how to pass to MSWord the output of the php code?

Thanks for any idea
Szilard

Some sysinfo:

PHP Version 4.2.3
SystemWindows NT 5.0 build 2195
Build DateOct 5 2002 15:06:37
Server APIApache
Virtual Directory Supportenabled
Configuration File (php.ini) PathC:\WINNT\php.ini
Debug Buildno
Thread Safetyenabled

com.allow_dcom
Off
com.autoregister_casesensitive
On
com.autoregister_typelib
Offf
com.autoregister_verbose
Offf
com.typelib_file
no value


--- End Message ---
--- Begin Message ---
Any idea where I can get the extensions php_mcal.dll and php_mcrypt.dll
from as a windows binary?

TIA

Regards,

Gary


--- End Message ---
--- Begin Message ---
working on a little project for myself here that had some general questions
about since am just getting started on the planning phase.  the first
function that i'm going to be working on will eventuall take user input in
the form of a directory path on the machine.  what i need it to do then is
recursively scan each directory under the user specified directory and
generate an array containing that information (something along the lines
<drive>:\\<path_to_files>\<filenames>).  the discs the program will be
scanning all have the exact same naming structure, so once the array for the
disc has been read i wanna scan each line and tell the program something
like "scan until you find this particular pattern of characters, then take
everything before that and move it into *this* variable.  and so on and so
forth line by line until the entire array has been parsed.  once i get that
taken care of i can then start to write the sql update statements to get
those variables put into the tables / etc i've made.

what i'm hoping that someone could help me with was a pointer to some
documentation that might help me learn what i need to get this done.  also,
if anyone can think of an easier way to accomplish what i've outlined i'm
definitely open to suggestions ... :)

--- End Message ---

Reply via email to