Thanks Sidney,
That helped with the extra quote.
I am still having frame issues, i know I am close though.
I have 3 pages.
mg_frameset.php
mg_frame2.php (Where it gets the list of items and displays them for you to choose)
mg_frame3.php (Which displays the chosen item from mg_frame2.php)
Here is the code for the frameset.php:
<?
$hostname = "localhost";
$database = "xxx";
$username = "xxx";
$password = "xxx";
$connpt = mysql_pconnect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db($database, $connpt);
$sql = "SELECT * FROM megaproducts";
session_start();
$productsID= $GET['producstID'];
$SESSION['productsID'] = $productsID;
?>
Here is the code for mg_frame2.php (Where the dynamic menu is listed):
<?
$hostname = "localhost";
$database = "xxx";
$username = "xxx";
$password = "xxx";
$connpt = mysql_pconnect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db($database, $connpt);
$sql = "SELECT * FROM megaproducts";
$result = mysql_query($sql, $connpt) or die(mysql_error());
if (mysql_num_rows($result) < 1) {
print "There are no items to display.";
} else {
for ($i=0;$row = mysql_fetch_array($result, MYSQL_ASSOC);$i++) {
$Name = $row['productsName'];
$productsID = $row['productsID'];
print "<a href=\"http://www.x.com/dev/printtech/mg_frame3.php?productsID=$productsID\" target=\"mainframe\">$Name</a><br>";
}
}
?>
Here is the code for the last frame mg_frame3.php (Which is where the infor is displayed once you choose it from mg_frame2.php):
<?
$hostname = "localhost";
$database = "xxx";
$username = "xxx";
$password = "xxx";
$connpt = mysql_pconnect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR);
$hold = $_REQUEST['productsID'];
$query = "SELECT * from megaproducts WHERE productsIDLIKE '$hold'";
$Name = mysql_query($query, $connpt) or die(mysql_error());
$row = mysql_fetch_array($Name, MYSQL_ASSOC);
$productsName = $row['productsName'];
print $productsName;
?>
I have 2 questions that someone will probably point out, if I don't
1) the mg_frame3.php page is displayed with the frameset and I will need to have the first item in the list from mg_frame2.php displayed as default on the page. Since when you first go to this section, you have not made a choice from mg_frame2.php yet.
2) and a session may be needed (which is what I attempted to do in mg_frameset.php) to have all 3 pages talking to each other correctly.
Am I on the correct track here?
I really appreciate everyones help.
Thanks,
Don