php-windows Digest 28 Dec 2001 22:08:34 -0000 Issue 924
Topics (messages 11168 through 11195):
Re: my site works well on WinME but Doesn`t work on WinXP HEEELLLLLPPPPP MEEEEEEEEE
11168 by: Michel Laine
11169 by: Svensson, B.A.T. (HKG)
XSL encoding not recognized in PHP 4.1.0 XSLT support ?
11170 by: rashkatsa
ftp_nlist/rawlist
11171 by: psycho
header() problem
11172 by: Jukka Pakkanen
11176 by: Mike Flynn
11177 by: Jukka Pakkanen
11178 by: Mike Flynn
11182 by: Jukka Pakkanen
11188 by: John Meyer
11193 by: Woolsey, Fred
Re: includes problem
11173 by: Asendorf, John
Re: [PHP] PHP software tool
11174 by: Asendorf, John
11186 by: Todd Williamsen
Re: Call another page after the menu had been selected
11175 by: Mike Flynn
Re: Mathimatical equations in PHP
11179 by: Todd Williamsen
11180 by: Rconover.americanbridge.net
11181 by: Svensson, B.A.T. (HKG)
11183 by: Mike Flynn
11184 by: Svensson, B.A.T. (HKG)
11185 by: Todd Williamsen
11187 by: Asendorf, John
11190 by: Steven Dowd
11194 by: Mike Flynn
Re: Image Magick on Windows NT?
11189 by: Grant Babb
11191 by: Damiano Ferrari
11192 by: Damiano Ferrari
Re: Real dumb newbie question...
11195 by: LaserJetter
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 ---
Could it be the WinXP built-in firewall that is blocking access to the default
MySQL port?
Todd Williamsen wrote:
> if you give system specs, it may helps us help you... what web server you
> using?
>
> "Aiquidie" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I do not understand why?
> >
> > it works great on Win ME bu when I work on XP I get ""Supplied argument is
> > not a valid MySQL result resource in"" message.
> >
> > and the weirdest thing is that the site defines the user but when listing
> > other users it gives that warning. So mysql works but makes some mistakes
> > somewhere. Maybe the php.
> >
> > Please help meeeeeee
> >
> >
--
Michel Laine
Engineer / Network Administrator
SYSTEM TECHNOLOGY SWEDEN AB
Phone:(+46)-8-982255
Fax:(+46)-8-982060
Snail mail: Vretenvagen 2, 171 54 SOLNA, SWEDEN
E-mail: [EMAIL PROTECTED]
WWW: http://www.systemtech.se
--- End Message ---
--- Begin Message ---
Michel, I would prefer, as one always should do, to look for a more likely
and realistic reason based on facts and empirical evidence. It must instead,
beyond all doubt and question, be someone of the following reason (or a mix
- possible all of them together, even) :
1) CIA and NSA has instrumented your system and prevent this kind of actions
to be performed.
2) Space aliens are stealing the information.
3) It is an act of evil minded terrorism (consult U.S.A. for help).
4) Bill Gates simply doesn't like you in person.
>From: Michel Laine
>
>Could it be the WinXP built-in firewall that is blocking
>access to the default MySQL port?
>
>Todd Williamsen wrote:
>
>> if you give system specs, it may helps us help you... what
>web server you
>> using?
>>
>> "Aiquidie" <[EMAIL PROTECTED]> wrote in message
>> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> > I do not understand why?
>> >
>> > it works great on Win ME bu when I work on XP I get
>""Supplied argument is
>> > not a valid MySQL result resource in"" message.
>> >
>> > and the weirdest thing is that the site defines the user
>but when listing
>> > other users it gives that warning. So mysql works but
>makes some mistakes
>> > somewhere. Maybe the php.
>> >
>> > Please help meeeeeee
>> >
>> >
>
>--
>
>Michel Laine
>Engineer / Network Administrator
>
>SYSTEM TECHNOLOGY SWEDEN AB
>Phone:(+46)-8-982255
>Fax:(+46)-8-982060
>Snail mail: Vretenvagen 2, 171 54 SOLNA, SWEDEN
>
>E-mail: [EMAIL PROTECTED]
>WWW: http://www.systemtech.se
>
>
>
>--
>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 ---
Hi all,
I've downloaded the standard windows build of latest version of PHP
(4.1.0) and install it on my W2k Professionnal. I've tested the XML
support (with expat) and it works fine. I've activated the extension
xslt and try to transform an XML into HTML through XSLT API.
questions :
1) Should i rebuild from PHP source to get full XML/XSLT support or just
uncomment xslt extension and copy sablot, expat and iconv in sys32 do it
well ?
2) With this windows build (.tar.gz on php.net) when i use
xslt_set_encoding($xh,"UTF-8") for example, i get this :
"Warning: xslt_set_encoding() is not supported in this PHP build"
3) here is my problem : when i try to use xslt_process(...) i've got this :
Warning: Sablotron error on line 1: unknown encoding ''
reason = unknown encoding '' & error code = 62
(the last line use xslt_error et errno). It seems that sablotron is
called but find an error in the first line of my XSLT ! here it is :
<?xml version="1.0" encoding="UTF-8" ?>
what's a joke ! :) I've checked that sablotron support some encoding by
default (even without iconv lib) and UTF-8, ISO-8859-1 are supported by
default.
Someone has succeeded to use XSLT extension in the standard windows
build of PHP 4.1.0 (.tar.gz) actually available on www.php.net ?
does xslt_set_encoding(...) works for you ?
if you have any ideas, i will be very happy to get feedback.
regards,
rashkatsa.
--- End Message ---
--- Begin Message ---
The ftp_nlist command causes a great lag or something, when executet.
I wrote a script that reads dirs and subdirs of an ftp and writes an
index of the files into my mysql db....
Since I use a recursive function for that, the ftp_nlist has to be
called about some thousand times.....it is really impossible to get the
script run until finished reading all dirs.
Maximum I got was about 30 entries.
When I increase set_time_limit, the script takes more time, but the
results are even less than with 5 seconds limit or something.
I read about a problem like this on php.net, and there was printed, to
use the ftp_rawlist command instead.
The ftp_rawlist command causes exactly the same latency.
Does anybody know what this is and what I can do?
Is it a bug?
Here is the code of the function:
function auslesen($verzeichnis)
{
global $verbinden;
$arrliste=array();
$arrliste=ftp_rawlist($verbinden, $verzeichnis);
while (list($num, $entry) = each($arrliste))
{
auslesen($entry);
schreiben($entry, $verzeichnis);
}
ftp_cdup($verbinden);
}
well.....the function works.......but just in 3 of 5 cases, in the other
2 it causes the latency......but when it reads about 5000 dirs
recursive, there is no chance for the script.
Please help
Sincerely Rudi
--- End Message ---
--- Begin Message ---
Running NT4sp6a and PHP4.1.0.
I try to redirect the browser to a new location [<? header("Location:
http://www.qnet.fi"); ?>], but nothing happens in the browser. There are no
extra spaces, CR's, LF's or anything, and output_buffers are on in the
php.ini.
Any ideas??
I run in to this problem when trying to run some software which is known to
work, and now I tested it with a simple test.php (above). Don't work.
--- End Message ---
--- Begin Message ---
At 02:46 PM 12/28/2001 +0200, you wrote:
>Running NT4sp6a and PHP4.1.0.
>
>I try to redirect the browser to a new location [<? header("Location:
>http://www.qnet.fi"); ?>], but nothing happens in the browser. There are no
>extra spaces, CR's, LF's or anything, and output_buffers are on in the
>php.ini.
>
>Any ideas??
>
>I run in to this problem when trying to run some software which is known to
>work, and now I tested it with a simple test.php (above). Don't work.
Try:
<?php
header("Location: http://www.qnet.fi/\r\n\n");
exit();
?>
--- End Message ---
--- Begin Message ---
Thanks Mike, but still no luck. Nothing happens. No errors, no redirects, no nothing :(
----- Original Message -----
From: "Mike Flynn" <[EMAIL PROTECTED]>
To: "Jukka Pakkanen" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, December 28, 2001 5:03 PM
Subject: Re: [PHP-WIN] header() problem
> At 02:46 PM 12/28/2001 +0200, you wrote:
> >Running NT4sp6a and PHP4.1.0.
> >
> >I try to redirect the browser to a new location [<? header("Location:
> >http://www.qnet.fi"); ?>], but nothing happens in the browser. There are no
> >extra spaces, CR's, LF's or anything, and output_buffers are on in the
> >php.ini.
> >
> >Any ideas??
> >
> >I run in to this problem when trying to run some software which is known to
> >work, and now I tested it with a simple test.php (above). Don't work.
>
> Try:
> <?php
>
> header("Location: http://www.qnet.fi/\r\n\n");
> exit();
>
> ?>
>
>
>
--- End Message ---
--- Begin Message ---
At 05:44 PM 12/28/2001 +0200, Jukka Pakkanen wrote:
>Thanks Mike, but still no luck. Nothing happens. No errors, no redirects,
>no nothing :(
Hmmm.. have you tried just making a blank page with this code? If so, what
shows up in the browser? A blank page? View the source, what does it show?
You're running Netscape 4, is that right? Have you tried it in another
browser?
-Mike
> > At 02:46 PM 12/28/2001 +0200, you wrote:
> > >Running NT4sp6a and PHP4.1.0.
> > >
> > >I try to redirect the browser to a new location [<? header("Location:
> > >http://www.qnet.fi"); ?>], but nothing happens in the browser. There
> are no
> > >extra spaces, CR's, LF's or anything, and output_buffers are on in the
> > >php.ini.
> > >
> > >Any ideas??
> > >
> > >I run in to this problem when trying to run some software which is
> known to
> > >work, and now I tested it with a simple test.php (above). Don't work.
> >
> > Try:
> > <?php
> >
> > header("Location: http://www.qnet.fi/\r\n\n");
> > exit();
> >
> > ?>
> >
> >
> >
>
>
>--
>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]
-=- Mike Flynn - Burlington, VT -=-
[EMAIL PROTECTED] http://www.mikeflynn.net/ * Give blood *
...maintaining lawns, watching televised sports, birthing
children, listening to Top 40 music, and collecting
stuffed animals...
--- End Message ---
--- Begin Message ---
The test.php file only has:
<?php
header("Location: http://www.qnet.fi\r\n\n");
exit();
?>
Result is a blank page, source code:
[!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"]
[HTML][HEAD]
[META http-equiv=Content-Type content="text/html; charset=windows-1252"][/HEAD]
[BODY][/BODY][/HTML]
The webserver is Website Pro 3. I've tried IE 5.5sp2 and IE 6. You can try it at
http://www.karting.fi/test.php
Otherwise PHP works ok in the server.
> At 05:44 PM 12/28/2001 +0200, Jukka Pakkanen wrote:
> >Thanks Mike, but still no luck. Nothing happens. No errors, no redirects,
> >no nothing :(
>
> Hmmm.. have you tried just making a blank page with this code? If so, what
> shows up in the browser? A blank page? View the source, what does it show?
>
> You're running Netscape 4, is that right? Have you tried it in another
> browser?
>
> -Mike
>
>
> > > At 02:46 PM 12/28/2001 +0200, you wrote:
> > > >Running NT4sp6a and PHP4.1.0.
> > > >
> > > >I try to redirect the browser to a new location [<? header("Location:
> > > >http://www.qnet.fi"); ?>], but nothing happens in the browser. There
> > are no
> > > >extra spaces, CR's, LF's or anything, and output_buffers are on in the
> > > >php.ini.
> > > >
> > > >Any ideas??
> > > >
> > > >I run in to this problem when trying to run some software which is
> > known to
> > > >work, and now I tested it with a simple test.php (above). Don't work.
> > >
> > > Try:
> > > <?php
> > >
> > > header("Location: http://www.qnet.fi/\r\n\n");
> > > exit();
> > >
> > > ?>
> > >
> > >
> > >
> >
> >
> >--
> >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]
>
> -=- Mike Flynn - Burlington, VT -=-
> [EMAIL PROTECTED] http://www.mikeflynn.net/ * Give blood *
> ...maintaining lawns, watching televised sports, birthing
> children, listening to Top 40 music, and collecting
> stuffed animals...
>
>
>
--- End Message ---
--- Begin Message ---
What type of server are you running the program on? And is it properly
configured.
----- Original Message -----
From: "Jukka Pakkanen" <[EMAIL PROTECTED]>
To: "Mike Flynn" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, December 28, 2001 8:44 AM
Subject: Re: [PHP-WIN] header() problem
Thanks Mike, but still no luck. Nothing happens. No errors, no redirects, no
nothing :(
----- Original Message -----
From: "Mike Flynn" <[EMAIL PROTECTED]>
To: "Jukka Pakkanen" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, December 28, 2001 5:03 PM
Subject: Re: [PHP-WIN] header() problem
> At 02:46 PM 12/28/2001 +0200, you wrote:
> >Running NT4sp6a and PHP4.1.0.
> >
> >I try to redirect the browser to a new location [<? header("Location:
> >http://www.qnet.fi"); ?>], but nothing happens in the browser. There are
no
> >extra spaces, CR's, LF's or anything, and output_buffers are on in the
> >php.ini.
> >
> >Any ideas??
> >
> >I run in to this problem when trying to run some software which is known
to
> >work, and now I tested it with a simple test.php (above). Don't work.
>
> Try:
> <?php
>
> header("Location: http://www.qnet.fi/\r\n\n");
> exit();
>
> ?>
>
>
>
--
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 ---
Jukka,
I've used another method to do redirects that works OK (but it requires
Javascript on the client):
Something like echo "<script
language=\"javascript\">window.location.href=\"mypage.php\"</script>";
I've used this with "... or die(...);" as a quick-and-dirty redirect to an
error page.
Cheers,
Fred Woolsey
-----Original Message-----
From: Jukka Pakkanen
To: Mike Flynn
Cc: [EMAIL PROTECTED]
Sent: 12/28/2001 11:26 AM
Subject: Re: [PHP-WIN] header() problem
The test.php file only has:
<?php
header("Location: http://www.qnet.fi\r\n\n");
exit();
?>
Result is a blank page, source code:
[!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"]
[HTML][HEAD]
[META http-equiv=Content-Type content="text/html;
charset=windows-1252"][/HEAD]
[BODY][/BODY][/HTML]
The webserver is Website Pro 3. I've tried IE 5.5sp2 and IE 6. You can
try it at http://www.karting.fi/test.php
Otherwise PHP works ok in the server.
> At 05:44 PM 12/28/2001 +0200, Jukka Pakkanen wrote:
> >Thanks Mike, but still no luck. Nothing happens. No errors, no
redirects,
> >no nothing :(
>
> Hmmm.. have you tried just making a blank page with this code? If so,
what
> shows up in the browser? A blank page? View the source, what does it
show?
>
> You're running Netscape 4, is that right? Have you tried it in
another
> browser?
>
> -Mike
>
>
> > > At 02:46 PM 12/28/2001 +0200, you wrote:
> > > >Running NT4sp6a and PHP4.1.0.
> > > >
> > > >I try to redirect the browser to a new location [<?
header("Location:
> > > >http://www.qnet.fi"); ?>], but nothing happens in the browser.
There
> > are no
> > > >extra spaces, CR's, LF's or anything, and output_buffers are on
in the
> > > >php.ini.
> > > >
> > > >Any ideas??
> > > >
> > > >I run in to this problem when trying to run some software which
is
> > known to
> > > >work, and now I tested it with a simple test.php (above). Don't
work.
> > >
> > > Try:
> > > <?php
> > >
> > > header("Location: http://www.qnet.fi/\r\n\n");
> > > exit();
> > >
> > > ?>
> > >
> > >
> > >
> >
> >
> >--
> >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]
>
> -=- Mike Flynn - Burlington, VT -=-
> [EMAIL PROTECTED] http://www.mikeflynn.net/ * Give blood *
> ...maintaining lawns, watching televised sports, birthing
> children, listening to Top 40 music, and collecting
> stuffed animals...
>
>
>
--
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 ---
Thanks for the offer Jim but I think I have it worked around. I still don't
understand the linux paths on this server I've got one of my websites set up
on so I don't really get where my include path is... it's not quite as
simple as my configuration here at work with our NT box (albeit may be much
more secure!)
Thanks,
John
---------------------
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: Jim Lucas [php] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 27, 2001 3:12 PM
> To: Asendorf, John
> Subject: Re: [PHP-WIN] includes problem
>
>
> why don't you send me a copy and I will look at it.
> Jim Lucas
> ----- Original Message -----
> From: "Asendorf, John" <[EMAIL PROTECTED]>
> To: "Php-Windows (E-mail)" <[EMAIL PROTECTED]>
> Sent: Thursday, December 27, 2001 9:31 AM
> Subject: [PHP-WIN] includes problem
>
>
> > I have three files:
> >
> > adodb.inc.php - a database abstract class
> > soldier_db.inc.php - a specific include for the databases
> I am working
> > with
> > index.php - a page that displays lots of different things...
> >
> > soldier_db.inc.php has the include line for adodb.inc.php
> and establishes
> a
> > connection to a mysql batabase called $connection
> >
> > index.php includes soldier_db.inc.php and then tries to use
> some of the
> > class elements from adodb.inc.php and $connection **from**
> > soldier_db.inc.php
> >
> > The debugging shows the connection as valid while echoing from the
> > soldier_db.inc.php but dead when echoing from the index.php
> >
> > for example, this code reports "OK" while in the
> soldier_db.inc.php but
> > "Dead" in the index.php portion.... exact same code,
> soldier_db.inc.php
> > included above this code in index.php
> >
> > if (!$connection) {
> > echo "Dead";
> > }
> > else {
> > echo "OK";
> > }
> >
> > Does anyone have an idea why this is happening? None of
> these items are
> in
> > functions, so I guess I wouldn't think that it's a globals
> issue. (and
> I've
> > tried establishing $connection as a global variable to no change in
> results)
> >
> > If anyone wants the code itself, I'll pull it out and send it.
> >
> > Thanks in advance,
> >
> > John
> >
> >
> >
> >
> >
> >
> >
> > ---------------------
> > 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
> >
> > --
> > 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 ---
Is that the same as PHPEd? If so, it's no longer free, NuSphere bought it
and is selling it at something like $299... It was nice when it was still
free, not spectacular, but nice...
---------------------
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: Todd Williamsen [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 27, 2001 10:26 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: [PHP] PHP software tool
>
>
> PHPEdit
>
> I forget who its by... its nice, needs work, but what do you
> expect for
> free?
>
>
> "B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
> 27E647E5629ED211BF78009027289C6302157DA9@mail1">news:27E647E5629ED211BF78009027289C6302157DA9@mail1...
> >So sprach »LaserJetter« am 2001-12-22 um 18:46:46 -0000 :
> >> Does anybody know of or can recommend any freeware text
> editing tools for
> >> editing PHP code in Win32?
> >
> >vim
>
> Hey, what's wrong with notepad now then?
>
>
>
> --
> 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 ---
Here:
http://www.phpedit.com/
its still free
"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
27E647E5629ED211BF78009027289C6302157DB5@mail1">news:27E647E5629ED211BF78009027289C6302157DB5@mail1...
From: Todd Williamsen
>PHPEdit
>
>I forget who its by... its nice, needs work, but what do you expect for
>free?
GnuEmax?
>"B.A.T. Svensson" wrote in message
>>So sprach »LaserJetter« am 2001-12-22 um 18:46:46 -0000 :
>>> Does anybody know of or can recommend any freeware text editing tools
for
>>> editing PHP code in Win32?
>>
>>vim
>
>Hey, what's wrong with notepad now then?
--- End Message ---
--- Begin Message ---
At 02:10 PM 12/28/2001 +0800, you wrote:
>Dear all
>I'm using UltraDev which build a form containing a menu, there a two items
>inside this menu for user to choose. This form is using Post Action to
>$php_self which means it will pass back the variable to itself.
>Then here is the question:
>
> what should i do if i want to call a page prompt from a blank window when
>the item A is selected?
>and another page when Item B is selected!
>
>thx a lot
>jack
>[EMAIL PROTECTED]
I'm not sure what you mean by "call a page prompt from a blank window when
item A is selected". Do you mean at the exact moment that item A is
selected, or do you mean after the user has submitted the form? If you
mean you want to pop a new window as soon as the user selects one of the
pulldown options, then you use JavaScript for that.
Something like this:
<script language="JavaScript"><!--//
function loadpage(thepage) {
if (thepage) {
self.location = thepage;
}
}
//--></script>
<form action="./" method="post" name="theform">
<select name="pages"
onChange="loadpage(this.options[this.selectedIndex].value);">
<option value="0">--- Please select one: ---</option>
<option value="page1.php">Page 1</option>
<option value="page2.php">Page 2</option>
<option value="page3.php">Page 3</option>
</select>
</form>
If you mean you'd like it to redirect them after they submit the form, you
could do it with the PHP..
[before any other HTML code]
<?php
if ($submitted && $pages) {
// .. do stuff..
header("Location: $pages\r\n\n");
exit();
}
?>
[...html code...]
<form action="./" method="post" name="theform">
<select name="pages">
<option value="0">--- Please select one: ---</option>
<option value="page1.php">Page 1</option>
<option value="page2.php">Page 2</option>
<option value="page3.php">Page 3</option>
</select><br>
<input type="hidden" name="submitted" value="1">
<input type="submit" value="Go to page">
</form>
...
Hope that helps.
-Mike
--- End Message ---
--- Begin Message ---
That is not what I was looking for, is there a function in PHP that does
this?
"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
27E647E5629ED211BF78009027289C6302157DB4@mail1">news:27E647E5629ED211BF78009027289C6302157DB4@mail1...
> >I have a site that is for a football game and people play each other then
> >report who is the winner and loser. Well, I want to inject some
excitement
> >a bit and do some stats, like Passing averages per game and rushing
average
> >per game.
> >
> >The problem is that it will need to make the total yards then divide them
> by
> >the number of games they played.
> >
> >How would I do that?
>
> What about the old fashion addition, multiplication and division we all
> learnt in basic school?
>
> > Also would I need two rows, one for total yards and
> >one for averages? or just one row just for the averages?
>
> For total use addition for average divide the total with number of
> participates.
--- End Message ---
--- Begin Message ---
Just use basic multiplication *, division / , and subtraction -, addition +
Why would you need a function to do this?
Average=total#ofwidgets/#ofwidgets
Ryan Conover
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.pitt.edu/~rscst25/
-----Original Message-----
From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 28, 2001 11:04 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Mathimatical equations in PHP
That is not what I was looking for, is there a function in PHP that does
this?
"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
27E647E5629ED211BF78009027289C6302157DB4@mail1">news:27E647E5629ED211BF78009027289C6302157DB4@mail1...
> >I have a site that is for a football game and people play each other then
> >report who is the winner and loser. Well, I want to inject some
excitement
> >a bit and do some stats, like Passing averages per game and rushing
average
> >per game.
> >
> >The problem is that it will need to make the total yards then divide them
> by
> >the number of games they played.
> >
> >How would I do that?
>
> What about the old fashion addition, multiplication and division we all
> learnt in basic school?
>
> > Also would I need two rows, one for total yards and
> >one for averages? or just one row just for the averages?
>
> For total use addition for average divide the total with number of
> participates.
--
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 kind of pessimistic by nature, and would not with out having checked
out this thing believe the case is not in you favor this time.
/Anders
>-----Original Message-----
>From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
>Sent: Friday, December 28, 2001 5:04 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [PHP-WIN] Mathimatical equations in PHP
>
>
>That is not what I was looking for, is there a function in PHP
>that does this?
>
>
>"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
>27E647E5629ED211BF78009027289C6302157DB4@mail1">news:27E647E5629ED211BF78009027289C6302157DB4@mail1...
>> >I have a site that is for a football game and people play
>each other then
>> >report who is the winner and loser. Well, I want to inject some
>excitement
>> >a bit and do some stats, like Passing averages per game and rushing
>average
>> >per game.
>> >
>> >The problem is that it will need to make the total yards
>> >then divide them by
>> >the number of games they played.
>> >
>> >How would I do that?
>>
>> What about the old fashion addition, multiplication and
>> division we all learnt in basic school?
>>
>> > Also would I need two rows, one for total yards and
>> >one for averages? or just one row just for the averages?
>>
>> For total use addition for average divide the total with number of
>> participates.
>
--- End Message ---
--- Begin Message ---
Huh? To average? You just use addition and division. It doesn't require
a function. A function would not only be silly but probably take more
keystrokes just to type.
Average = sum of units' values / number of units.
Additionally, you can do this automatically if you're storing your values
in a database such as MySQL, using built-in functions. See the MySQL
manual (www.mysql.com) or whatever database for more on this.
-Mike
At 05:11 PM 12/28/2001 +0100, Svensson, B.A.T. (HKG) wrote:
>I am kind of pessimistic by nature, and would not with out having checked
>out this thing believe the case is not in you favor this time.
>
> /Anders
>
> >-----Original Message-----
> >From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
> >Sent: Friday, December 28, 2001 5:04 PM
> >To: [EMAIL PROTECTED]
> >Subject: Re: [PHP-WIN] Mathimatical equations in PHP
> >
> >
> >That is not what I was looking for, is there a function in PHP
> >that does this?
> >
--- End Message ---
--- Begin Message ---
Don't send CC message to those who does not need the information,
pleeeeeeeeeeeeeeeese!!!
(I am starting to get pretty fucking annoyed about that people doesn't check
those things before pressing the send button/key.)
>-----Original Message-----
>From: Mike Flynn [mailto:[EMAIL PROTECTED]]
>Sent: Friday, December 28, 2001 5:32 PM
>To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] Mathimatical equations in PHP
>
>
>Huh? To average? You just use addition and division. It
>doesn't require
>a function. A function would not only be silly but probably take more
>keystrokes just to type.
>
>Average = sum of units' values / number of units.
>
>Additionally, you can do this automatically if you're storing
>your values
>in a database such as MySQL, using built-in functions. See the MySQL
>manual (www.mysql.com) or whatever database for more on this.
>
>-Mike
>
>At 05:11 PM 12/28/2001 +0100, Svensson, B.A.T. (HKG) wrote:
>>I am kind of pessimistic by nature, and would not with out
>having checked
>>out this thing believe the case is not in you favor this time.
>>
>> /Anders
>>
>> >-----Original Message-----
>> >From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
>> >Sent: Friday, December 28, 2001 5:04 PM
>> >To: [EMAIL PROTECTED]
>> >Subject: Re: [PHP-WIN] Mathimatical equations in PHP
>> >
>> >
>> >That is not what I was looking for, is there a function in PHP
>> >that does this?
>> >
>
>
--- End Message ---
--- Begin Message ---
BAT..
you need to get that stick out of your ass, you are annoying and no help to
people that needs it
"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
27E647E5629ED211BF78009027289C6302157DC5@mail1">news:27E647E5629ED211BF78009027289C6302157DC5@mail1...
> Don't send CC message to those who does not need the information,
> pleeeeeeeeeeeeeeeese!!!
>
> (I am starting to get pretty fucking annoyed about that people doesn't
check
> those things before pressing the send button/key.)
>
> >-----Original Message-----
> >From: Mike Flynn [mailto:[EMAIL PROTECTED]]
> >Sent: Friday, December 28, 2001 5:32 PM
> >To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
> >Subject: RE: [PHP-WIN] Mathimatical equations in PHP
> >
> >
> >Huh? To average? You just use addition and division. It
> >doesn't require
> >a function. A function would not only be silly but probably take more
> >keystrokes just to type.
> >
> >Average = sum of units' values / number of units.
> >
> >Additionally, you can do this automatically if you're storing
> >your values
> >in a database such as MySQL, using built-in functions. See the MySQL
> >manual (www.mysql.com) or whatever database for more on this.
> >
> >-Mike
> >
> >At 05:11 PM 12/28/2001 +0100, Svensson, B.A.T. (HKG) wrote:
> >>I am kind of pessimistic by nature, and would not with out
> >having checked
> >>out this thing believe the case is not in you favor this time.
> >>
> >> /Anders
> >>
> >> >-----Original Message-----
> >> >From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
> >> >Sent: Friday, December 28, 2001 5:04 PM
> >> >To: [EMAIL PROTECTED]
> >> >Subject: Re: [PHP-WIN] Mathimatical equations in PHP
> >> >
> >> >
> >> >That is not what I was looking for, is there a function in PHP
> >> >that does this?
> >> >
> >
> >
--- End Message ---
--- Begin Message ---
I agree, he is a bit on the edgy side... but he's also right. This is
simple math.
Here, I'll write you a function:
function average ( $array_numbers ) {
$total_numbers = count ( array_keys ( $array_numbers ) );
$sum = array_sum ( $array_numbers );
$average = $sum / $total_numbers;
return $average;
}
$numbers = array ( 1 , 5 , 7 , 8 , 10 , 14 , 3 , 2 , 5 , 2 , 7 );
$average = average ( $numbers );
echo $average;
---------------------
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: Todd Williamsen [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 28, 2001 11:44 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Mathimatical equations in PHP
>
>
> BAT..
>
> you need to get that stick out of your ass, you are annoying
> and no help to
> people that needs it
>
> "B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
> 27E647E5629ED211BF78009027289C6302157DC5@mail1">news:27E647E5629ED211BF78009027289C6302157DC5@mail1...
> > Don't send CC message to those who does not need the information,
> > pleeeeeeeeeeeeeeeese!!!
> >
> > (I am starting to get pretty fucking annoyed about that
> people doesn't
> check
> > those things before pressing the send button/key.)
> >
> > >-----Original Message-----
> > >From: Mike Flynn [mailto:[EMAIL PROTECTED]]
> > >Sent: Friday, December 28, 2001 5:32 PM
> > >To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
> > >Subject: RE: [PHP-WIN] Mathimatical equations in PHP
> > >
> > >
> > >Huh? To average? You just use addition and division. It
> > >doesn't require
> > >a function. A function would not only be silly but
> probably take more
> > >keystrokes just to type.
> > >
> > >Average = sum of units' values / number of units.
> > >
> > >Additionally, you can do this automatically if you're storing
> > >your values
> > >in a database such as MySQL, using built-in functions.
> See the MySQL
> > >manual (www.mysql.com) or whatever database for more on this.
> > >
> > >-Mike
> > >
> > >At 05:11 PM 12/28/2001 +0100, Svensson, B.A.T. (HKG) wrote:
> > >>I am kind of pessimistic by nature, and would not with out
> > >having checked
> > >>out this thing believe the case is not in you favor this time.
> > >>
> > >> /Anders
> > >>
> > >> >-----Original Message-----
> > >> >From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
> > >> >Sent: Friday, December 28, 2001 5:04 PM
> > >> >To: [EMAIL PROTECTED]
> > >> >Subject: Re: [PHP-WIN] Mathimatical equations in PHP
> > >> >
> > >> >
> > >> >That is not what I was looking for, is there a function in PHP
> > >> >that does this?
> > >> >
> > >
> > >
>
>
>
> --
> 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 ---
BAT , theres no need for that.
whats up guy , didnt you get what you want off santa. cool it,
but really , this isnt any different from most of your cynical posts, I
honestly do not know half the time why you even bother to post, so why get
upset at others single cc , when you waste my bandwidth much more often.
quote "What the heck are you talking about?"
quote "Of course it is possible. (Why would it not be?)"
quote " I've don it my self "
quote "Is there a way for PHP to check the coffee machine if the coffee is
ready?
Maybe someone has a sample brew for me?"
quote "I would guess you need beans for that to work."
quote "To beging with, why not give the manual a try?"
quote "(I am starting to get pretty fucking annoyed about that people
doesn't check
those things before pressing the send button/key.)"
In fact your general attitude to helping people is totally self centered ,
"I can do it, why can't you?"
Sad.
definatley didnt get the wanted xmas prezzy...
Steven
----- Original Message -----
From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 28, 2001 4:32 PM
Subject: RE: [PHP-WIN] Mathimatical equations in PHP
> Don't send CC message to those who does not need the information,
> pleeeeeeeeeeeeeeeese!!!
>
> (I am starting to get pretty fucking annoyed about that people doesn't
check
> those things before pressing the send button/key.)
--- End Message ---
--- Begin Message ---
At 05:32 PM 12/28/01 +0100, you wrote:
>Don't send CC message to those who does not need the information,
>pleeeeeeeeeeeeeeeese!!!
>
>(I am starting to get pretty fucking annoyed about that people doesn't check
>those things before pressing the send button/key.)
Actually, I did it on purpose, not by accident. I thought it was useful
information so it doesn't get asked again by someone else 20 more times. No?
-Mike
--- End Message ---
--- Begin Message ---
>Imagemagick does have some pretty dope features.
You can always pipe input to and from IM using system or eval commands.
I vote for a php library of functions for ImageMagick!!
Grant Babb Email: [EMAIL PROTECTED]
Data Junction Corporation Phone: (512) 459-1308
2201 Northland Dr. Fax: (512) 459-1309
Austin, TX 78756-1117 Web: http://www.datajunction.com
--- End Message ---
--- Begin Message ---
Frank,
Thanks for the help. In first place, I didn't even know if I could use Image
Magick on Windows, I will look for the binaries, as I only found the source
code so far and I don't have a C compiler handy right now.
I also downloaded the php_gd.dll from your site. Just a curiosity: it is
420Kb, as opposed to the old .dll I had, which is about 550Kb. Does this
make sense or I already had the GD2 and I ended up replacing it with the dll
with GD1 only? If the one on your site got both GD, then I have the right
one. The result appears to be, quite frankly, a bit better now.
Damiano
"Frank M. Kromann" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> ImageMagic works fine on Window. You can download the binaries from one of
the mirror sites.
>
> I have a web page (http://kromann.info/php4.php) where you can download
php binaries based on the latest cvs version. There you can find php_gd.dll
with both GD1 and GD2. I have not tested it but I think these dll's can be
used with php 4.1.x.
>
> - Frank
>
> > You need to use GD2. GD1 dithers down to 8-bit colour. There should be
a
> > GD.DLL based on GD2 floating around out there somewhere.
> >
> > -Rasmus
> >
> > On Thu, 27 Dec 2001, Damiano Ferrari wrote:
> >
> > > I wrote a script that will create a thumbnail page for all the
pictures in a
> > > given directory. The thumbnails are created with the GD libraries and
while
> > > it all works, the result is.. well, very low quality, the .jpg images
> > > actually look like .gif. Is there any way I can use Image Magick on
Windows
> > > NT (and PHP 4.1.0)? If not, is there any other viable solution?
> > >
> > > Damiano
> > >
> > >
> > >
> > >
> >
> >
> > --
> > 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 ---
Grant,
I have never used Image Magick before. Honestly I just recently started
using PHP and I read somewhere that IM would work on *nix only, not on
Windows. When I find a binary for Windows I'll give it a try, but if you get
someone to write a php library for IM, I am willing to drive the 60 or so
miles that separate me from Austin to come and get it :)
Damiano
"Grant Babb" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> >Imagemagick does have some pretty dope features.
>
>
> You can always pipe input to and from IM using system or eval commands.
>
> I vote for a php library of functions for ImageMagick!!
>
>
> Grant Babb Email: [EMAIL PROTECTED]
> Data Junction Corporation Phone: (512) 459-1308
> 2201 Northland Dr. Fax: (512) 459-1309
> Austin, TX 78756-1117 Web: http://www.datajunction.com
>
>
>
--- End Message ---
--- Begin Message ---
I'm not sure about all that stuff that appeared in the log file. I dont have
any idea what those programs are for.
Has what Todd said helped?
The question about "GET /phpinfo.php HTTP/1.1" 200 33: GET means that the
browser told apache to GET /phpinfo.php. HTTP/1.1 is the way in which the
file was transferred and the 200 means everything was ok.I'm not sure about
the second number but i'm pretty sre it's not important.
If a file can't be found, you'd see 404 instead of 200.
"Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> don't remove the html extension!
>
> Do this, this is from the Install.txt file
>
> Edit your php.ini file:
>
> You will need to change the 'extension_dir' setting to
> point to your php-install-dir, or where you have placed
> your 'php_*.dll' files. ex: c:\php
>
> If you are using OmniHTTPd, do not follow the next step.
> Set the 'doc_root' to point to your webservers
> document_root. ex: c:\apache\htdocs or c:\webroot
>
> Choose which extensions you would like to load when PHP
> starts, noting that several extensions are already built
> into the Windows release, see the section about
> Windows extensions for details of the built in extensions.
> You can uncomment the: 'extension=php_*.dll' lines
> in php.ini to load these extensions.
> Some extensions require you to have additional libraries
> installed on your system for the module to work correctly.
> The PHP FAQ at www.php.net/FAQ.php has more information on
> where to get supporting libraries. You can also load a
> module dynamically in your script using dl. See the section
> about Windows extensions.
>
> Note that on a new installation it is advisable to first get
> PHP working and tested without any extensions before enabling
> them in php.ini.
> -----------------------------------------------------------------------
>
> Now do this:
>
> =======================
>
> Installing PHP on Windows with Apache 1.3.x
>
> There are two ways to set up PHP to work with Apache 1.3.x
> on Windows. One is to use the CGI binary (php.exe),
> the other is to use the Apache module dll. In either case
> you need to stop the Apache server, and edit your
> srm.conf or httpd.conf to configure Apache to work with PHP.
>
> Although there can be a few variations of configuring PHP
> under Apache, these are simple enough to be used by the
> newcomer. Please consult the Apache Docs for further
> configuration directives.
>
> If you unzipped the PHP package to C:\PHP\ as desribed
> above, you need to insert these lines to your Apache conf
> file to set up the CGI binary:
>
> ScriptAlias /php/ "c:/php/"
> AddType application/x-httpd-php .php
> Action application/x-httpd-php "/php/php.exe"
>
> Remember to restart the server, for example,
> NET STOP APACHE
> followed by
> NET START APACHE
>
> If you would like to use PHP as a module in Apache,
> you should move php4ts.dll to the windows/system (for Windows 9x/Me)
> or winnt/system32 (for Windows NT/2000) directory, overwriting any
> older file. Then you should add the following two lines to you Apache
> conf file:
>
> LoadModule php4_module c:/php/sapi/php4apache.dll
> AddType application/x-httpd-php .php
>
> Remember to restart the server, for example,
> NET STOP APACHE
> followed by
> NET START APACHE
>
> To use the source code highlighting feature, simply create a PHP
> script file and stick this code in:
> <?php show_source("original_php_script.php"); ?>
> Substitute original_php_script.php with the name of the
> file you wish to show the source of. (This is the only way of
> doing so).
>
> On Win-Apache all backslashes in a path statement such
> as: "c:\directory\file.ext", must be converted to
> forward slashes.
>
>
>
--- End Message ---