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, FL 11111 </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