hey guys
how ru
would you kindly tell me how do i save the value of an updated combo box in a cookie
as i have 3 combos on the page which must be updated and stored the values of them so that i can reuse it too.
i found a java script for defining the value for the combos also
but
how do i populate their values from php?
other wise i have the very long and simple code which doesn't works very well
can u give me the hint or the mistakes which i had made.


<?php
$link = mysql_connect("localhost", "chintan","hellomysql")
    or die("Could not connect");
    mysql_select_db("chintan") or die("Could not select database");


echo "<form action=index.php method=POST>"; echo "<select name=ItemType tabindex=1>"; $XX = "No data availabe!";

$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=ItemType>$colom_name</option>";
}

if ($colom_name="")
{
print ("$XX");
}
echo "</select>";
echo "<input type=submit value='Update'><br>";
echo "<select name=Thickness tabindex=1>";
$ak = mysql_query("SELECT Thickness FROM Products WHERE ItemName='Hinges' and ItemType=$_REQUEST[ItemType] group by Thickness");


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

if ($colom_name2="")
{
print ("$XX");
}
echo "</select>";
echo "<input type=submit value='Update'><br>";
echo "<select name=SizeinMM tabindex=1>";

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

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

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

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

while ($row  =  mysql_fetch_array($ak))
{
        $colom_name4=$row["Rates"];
        $colom_name5=$row["Ratesforsspin"];
}
        echo "<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



Reply via email to