php-windows Digest 20 May 2002 00:24:58 -0000 Issue 1152

Topics (messages 13860 through 13865):

A new GUI client for mySQL
        13860 by: Ritesh Nadhani

Re: How to get all combinations
        13861 by: Hugh Bothwell

Re: $PHP_SELF generating an error
        13862 by: Steve Yates

Apache 2.0.35 & IIS 5.1 > PHP 4.20 (Module Problems.)
        13863 by: Johan Ekström
        13865 by: Alan Popow

Need help with frames
        13864 by: Bob Sears

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 ---
greetings...
Webyog has released mySQLyog, a win32 based Query
analyzer. Its FREE and gives all the features that a
mysql developer can ask for by a query analyzer.
please visit www.webyog.com
you can execute query of results of more than 100000
records, supports multiple query execution and you can
export your data into XML, HTML and CSV and can also
import form a text file.
It also allows you to excute last query and lets you
add your favourite query in a personal folder with one
click of mouse. So you dont have to save it and open
it.
Please take a look at it and feel free to send your
suggestions to [EMAIL PROTECTED]
Ritesh


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
--- End Message ---
--- Begin Message ---

"Steen Rabol" <[EMAIL PROTECTED]> wrote in message
000501c1fe7d$e8c7f470$[EMAIL PROTECTED]">news:000501c1fe7d$e8c7f470$[EMAIL PROTECTED]...
> Hi
>
> I have 6 arrays with data and would like to have all possible
> combinations
> Eg.
>
> $a1 = array(1,2);
> $a2 = array(3,4);
> $a3 = array(5,6);
> $a4 = array(7,8);
> $a5 = array(9,10);
> $a6 = array(11,12);
>
> the result should then be a new array like this:
>
> [0] = 1,3,5,7,9,11
> [1] = 1,4,5,7,9,11
> [2] = 1,6,5,7,9,11

I'm not sure I follow here... you want
all possible combinations of one value
from each array?  ie one of (1,2) and
one of (3,4) and one of (5,6) etc (64
combinations), or all combinations of
6 values from anywhere - six of (1,2,
3,4,5,6,...) (924 combinations)?

I would assume the first except for [2].
The solution depends heavily on this
question.

Also, rather than 'returning all possible
combinations' I would really strongly
suggest testing each combination as
it is generated, and only keep candidates
which match whatever criteria you
are looking for, ie "combinations which
sum to a multiple of 3" or whatever.

... in fact, if you tell us more about what
problem you are trying to solve by generating
combinations, we might be able to
suggest a better way of going about it.


--- End Message ---
--- Begin Message ---
"R.S. Herhuth" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Undefined variable PHP_SELF in...

Do you have PHP 4.1.2?  Try this syntax:

echo $_SERVER["PHP_SELF"];

4.1 no longer automatically creates variables by default.

 - Steve Yates
 - I was just stopped by the LAPD and boy am I beat!

/ Taglines by Taglinator - www.srtware.com /




--- End Message ---
--- Begin Message ---
Okey...
Apache Installed, PHP 4.20 unzipped.

"c:\program files\other applications\internet\apache group\apache\"
"c:\program files\other applications\internet\php\"

I've added...

LoadModule php4_module "c:/program files/other 
applications/internet/php/sapi/php4apache.dll"
AddType application/x-httpd-php .php
AddModule mod_php4.c

...in http.conf

and I use Windows XP Pro, and apache as a service, but when I start. It just say's 

"The Requested Operation has faild."

Now, I've tried moving the three lines around in the config, and I've tried using PHP 
in c:\php\
instead of where I have it now.
It just don't want to work.

I've tried it on IIS 5.1 in Windows XP Pro, and I got it working there, by using it as 
a module.
The trouble there, was that after some "updates" of the same page, the server just 
couldn't
load php-files anymore, it just searched, but nothing happend.
To get it to work agine, I was forced to reboot the system completly.

Anyone care to correct my mistakes and help a poor&angry fellow out?


--------------------------------------------------------------------------------

Raven
--- End Message ---
--- Begin Message ---
On Sun, 19 May 2002 20:57:11 +0200, you wrote:

>LoadModule php4_module "c:/program files/other 
>applications/internet/php/sapi/php4apache.dll"

Don't use sapi/php4apache.dll

use experimental/apache2filter.dll instead

Alan

--- End Message ---
--- Begin Message ---
I am putting the final touches on a section of my e-commerce site and am 
having some problems with forms.

Picture this ... this section is comprised of several php scripts, one of 
which is the forms module. The first module is the
splash page, which queries the shopper how to display the merchandise: 
category or vendor. This is a snippet of the
appropriate code:

//<BODY BGCOLOR="#F0FFF0">

//<H1 STYLE="position: absolute; top: 10; left: 540">
//<applet code=lake width=375 height=510>
//<param name=image value="images/bs-pond6.jpg">
//<param name=horizon value="300">
//</applet>
//</H1>

// <H2 CLASS=linea2>1 Main Street</H2>
// <H2 CLASS=linea3>Sarasota,&nbsp;FL&nbsp;&nbsp;11111&nbsp;</H2>
// <!--
//<H2 CLASS=linea4>111-222-3333</H2>
//-->
// <script language="javascript">
// if (MYSTATUS == TEST){
// document.write ("<form name=criteria 
action=\"http://localhost/fp_frame.php\"; method=get enctype=\"plain/text\">");
// } else {
// document.write ("<form name=criteria action=\"fp_frame.php\" method=get 
enctype=\"plain/text\">");
// }
// </script>

// <h2 class=title1a style="left: 50; font-size: 11pt">//
// How do you want to view my selections? </h2>
// <h2 class=title2a style="left: 50">
// <select size=1 onChange="setRedirectToPHP(0);" name=category>
//<?
//$db_name = "frogpond";
//$table_name = "offering";
//$connection = mysql_connect ($HOST,$USERID,$PASSWORD) or
// die ("Bummer! (offering - 1) Couldn't connect to host: [$HOST] [$USERID] 
[$PASSWORD]");
//$db = mysql_select_db ($db_name, $connection) or
// die ("Bummer! (offering - 1) Couldn't connect to data base: [$db_name]");
//$sql_statement = "select Description
// from $table_name
// where Division='category' and Active = 1
// order by Description;";
//$result = mysql_query ($sql_statement, $connection) or
// die ("Damn! (offering - 1) Couldn't execute msql_query: [$sql_statement]");

//-------------------------------------------
//---------------- Format the option document
//-------------------------------------------

//print ("<option selected>By category?</option>");
//while ($row = mysql_fetch_array($result)){
// $storedDescription = $row['Description'];
// print ("<option>".$storedDescription."</option>");
//}
//?>
// </select>
// </h2>
// <br>
// <input type=hidden size=50 value="testCat" name=testCat><br>
// <input type=hidden size=2 value="inDex" name=inDex><br>
// <input type=hidden size=8 value=<? echo "$trackingnumber" ?> 
name=trackingnumber>
// <h2 class=title4a style="left: 50">
// <select size=1 onChange="setRedirectToPHP(1);" name=supplier>

<?
//$db_name = "frogpond";
//$table_name = "offering";
//$connection = mysql_connect ($HOST,$USERID,$PASSWORD) or
// die ("Bummer! (offering - 2) Couldn't connect to host: [$HOST] [$USERID] 
[$PASSWORD]");
//$db = mysql_select_db ($db_name, $connection) or
// die ("Bummer! (offering - 2) Couldn't connect to data base: [$db_name]");
//$sql_statement = "select Description
// from $table_name
// where Division='vendor' and Active = 1
// order by Description;";
//$result = mysql_query ($sql_statement, $connection) or
// die ("Damn. (offering - 2) Couldn't execute msql_query: [$sql_statement]");
//-------------------------------------------
//---------------- Format the option document
//-------------------------------------------
//print ("<option selected>By supplier?</option>");
//while ($row = mysql_fetch_array($result)){
// $storedDescription = $row['Description'];
// print ("<option>".$storedDescription."</option>");
//}
//?>
// </select>
// </h2>
// <h2 class=title6a style="left: 50">
// <input type=submit value="Show items" onClick="goSomewhere();"></h2>
// </form>

This properly transitions to the forms module. This connection works 
perfectly; all variables are passed, etc. Here is the code for that
module:

//<?
// $text = "<html>";
// $test .= "<title>";
// $text .= "</title>";
// $text .= "<frameset rows=\"13%, 75%, *\" frameborder=1 framespacing=1>";
// $text .= " <frameset cols=\"50%,*\" frameborder=1 framespacing=1>";
// $text .= " <frame src=\"fp_hdr.php\" noresize scrolling=no 
name=\"topleft\">";
// $text .= " <frame src=\"fp_nav.php?type=R\" noresize scrolling=no 
name=\"navtopright\">";
// $text .= " </frameset>";

// $text .= " <frame src=\"anewgen.php?category=$category&supplier=$supplier";
// $text .= "&trackingnumber=$trackingnumber\" noresize scrolling=auto 
name=\"middlepanel\">";
// $text .= " <frame src=\"fp_nav.php?type=B\" noresize scrolling=no 
name=\"navbottom\">";
// $text .= " </frameset>";

// $text = "<h3 style=\"position: absolute; top: 1; left: 1\">";
// $text .= "Category passed: $category<br>";
// $text .= "Supplier passed: $supplier<br>";
// $text .= "Tracking number: $trackingnumber<br></h3>";
// $text .= "</html>";
// print ($text);/
//?>

This displays the screen properly. The top left has the logo; top right the 
nav buttons; the middlepane has the correct offering; and, the
bottom duplicates the navigation from from the top right of the window. I 
wish to keep the shopper in this window. Therefore, in
the navigation panels I have new selection criteria. The navigation frames 
are within the fp_frame.php module. I want the shopper
to reselect the display type; have the upper right panel to revert to it's 
original state, and have the middle panel, which is scrollable,
to contain the new product display. The module doing the MySQL product 
access has a "target = middle" in the <head> section.
The nav logic points to the anewgen.php module to display the products in 
the middlepane window. However, no matter how I
reconstruct the code, the display always appears in the upper right nav, 
completely wiping it out. With selective displays, I
know the proper variables are being transmitted to the correct module; but, 
the resulting display does not appear in the middle
panel.

Am I asking too much of PHP? I have 6 textbooks, which do not have anything 
approaching this type of logic.

Sorry this description is long but I believe it gives one a good idea of 
what I'm trying to accomplish. I know I'll get some good
pointers from this group. Previous suggestions have been excellent.

Thanks,

Bob


--- End Message ---

Reply via email to