drop down box Pblm
Posted 05 June 2006 - 05:10 AM
I am using PHP with MYSQL to develop a tool,I have to load my combo boxes with values from backend.I have no pblm in ADD screen,In my MODIFY screen while printing the values in the combo box i get the value displayed once in the box and twice in the drop down how can i avoid this?
Please let me know if u need any clarifications..
Posted 05 June 2006 - 05:28 AM
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community
Posted 05 June 2006 - 06:12 AM
I have a drop down box named sev-stands for severity,This code comes in the modify screen where i retieve severity from dt_defect table.I have a master table where i store all the severity dt_admin.
// The below query is to retireve the severity for the defect raised
$rs = mysql_query("select * from dt_defect where defect_id='$id'",$connection)or die ("q1");
<select style="border-style:none; FONT-SIZE: 10pt; WIDTH: 137px; COLOR: #222222; " name="sev" style="font-size: 10pt" >
<OPTION Readonly value="<?php echo $myrow["def_severity"]; ?>"><?php echo $myrow["def_severity"]; ?></OPTION>
// The below query is to display all the diff caterory of severity,so tht the user can change the severity.
$query=mysql_query("SELECT name FROM dt_admin where category='sev'",$connection )
or die ("cant do it");
echo '<option value="' . $result['name'] . '">' . $result['name'] . '</option>';
now my pblm is if the severity for eg for the defect is A,Then There is one A displayed in the combo box and
then when i click the combo box there are 2 A's displayed in the drop down.
How can i display only one A in the combo box?
Thanks for the reply,
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users