problem while access value to other page
Posted: Thu Sep 15, 2005 2:54 am
feyd | Yar, start posting code in
plz help in this regard
feyd | Yar, start posting code in
Code: Select all
andCode: Select all
tags or not at all. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
here is a simple code, which retrieves size from database. Size is stored in string format which is "M-L-XL-XXL".
i use the explode function, and store all the sizes in combox like M, L , XL and XXL are seperatley.
i want that when i press the submit button, then it will transfer that values of combox, which i selected. kindly help me in this regard.
here is the codeCode: Select all
$query = mysql_query("Select * from newproductinfo where pid=$pageid",$db) or die ("Error");
while ($result = mysql_fetch_array($query))
{
$size=$result['size'];
}
echo"Size: <select name='select'>";
$sizes = explode("-",$size);
if($sizes[0]<>"")
{
echo"<option value='M'>$sizes[0]</option>";
}
if($sizes[1]<>"")
{
echo"<option value='L'>$sizes[1]</option>";
// echo"<input type='hidden' value='L' name='size'>";
}
if($sizes[2]<>"")
{
echo"<option value='XL'>$sizes[2]</option>";
}
if($sizes[3]<>"")
{
echo"<option value='XXL'>$sizes[3]</option>";
}
echo"</select>";feyd | Yar, start posting code in
Code: Select all
andCode: Select all
tags or not at all. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]