RE: Drop Down Menus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some body asked for it!

-----Original Message-----
From: chintan [mailto:chraso@xxxxxxxxx]
Sent: Jueves, 05 de Mayo de 2005 07:36 a.m.
To: php-db@xxxxxxxxxxxxx
Subject:  Drop Down Menus


hey guys i wrote this code from another code of zend.php
Can anyone tell me how do i update the value of second menu and third one?
can i do that without javascript?


<?php
session_start();
header("Cache-control: private");
$link = mysql_connect("localhost", "chintan","hellomysql")
     or die("Could not connect");
     mysql_select_db("chintan") or die("Could not select database");

$XX = "No data availabe!";
echo "<form  name=HingeType action=$PHP_SELF method=POST>";

$_SESSION['ItemType'] = $_REQUEST['ItemType'];
echo "<select name=ItemType tabindex=1>";
$aku = mysql_query("SELECT ItemType FROM Products WHERE 
ItemName='Hinges' group by ItemType");

while ($row  =  mysql_fetch_array($aku))
{
	$colom_name=$row["ItemType"];
	echo "<option value=$colom_name>$colom_name</option>";
}

if ($colom_name="")
{
print ("$XX");
}
echo "</select>";?>
<input type="Submit" value="Update" onclick="Call Test_Click()"><br>
<?php
echo $_SESSION['ItemType'];

$_SESSION['Thickness'] = $_REQUEST['Thickness'];
echo "<select name=Thickness tabindex=2>\n";
$ak = mysql_query("SELECT Thickness FROM Products WHERE 
ItemName='Hinges' and ItemType='$_SESSION[ItemType]'
group by Thickness");

while ($row  =  mysql_fetch_array($ak))
{
	$colom_name2=$row["Thickness"];
	echo "<option value=$colom_name2>$colom_name2</option>\n";
}

if ($colom_name2="")
{
print ("$XX");
}
echo "</select>";
echo "<input type=submit value='Update'><br>";
echo $_SESSION['Thickness'];

$_SESSION['SizeinMM'] = $_REQUEST['SizeinMM'];
echo "<select name=SizeinMM tabindex=3>\n";
$ak = mysql_query("SELECT SizeinMM FROM Products WHERE ItemName='Hinges' 
and ItemType='$_SESSION[ItemType]'
and Thickness='$_SESSION[Thickness]'");

while ($row  =  mysql_fetch_array($ak))
{
	$colom_name3=$row["SizeinMM"];
	echo "<option value=$colom_name3>$colom_name3</option>\n";
}

if ($colom_name3="")
{
print ("$XX");
}
echo "</select>\n";
echo "<input type=submit value='Update'><br>\n";
echo $_SESSION['SizeinMM'];
echo "</form>";

$ak = mysql_query("SELECT Rates,Ratesforsspin FROM Products WHERE 
ItemName='Hinges'
and ItemType='$_SESSION[ItemType]' and Thickness='$_SESSION[Thickness]' 
and SizeinMM='$_SESSION[SizeinMM]'");

while ($row  =  mysql_fetch_array($ak))
{
	$colom_name4=$row["Rates"];
	$colom_name5=$row["Ratesforsspin"];
}

	echo "<br><b>Rates for M.S.Pin:</b>\t$colom_name4<br>";
	echo "<b>Rates for S.S.Pin:</b>\t$colom_name5<br>";

?>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux