selectbox+database connection retrive problem
Posted on
16th Feb 2014 07:03 pm by
admin
Code: [Select]
<tr>
<th align="left" scope="col"><span class="style2 style8">Features </span></th>
<th colspan="2" align="left" scope="col"><span class="style8">
Did you know?Explore Trending and Topic pages for more stories like this.
<textarea name="features" cols="30%" rows="6"></textarea>
</span></th>
<th scope="col"><span class="style8">
<select name="select">
<?php
$query="select ID, CODE from features order by ID asc";
$result=mysql_query($query);
while(list($id, $name)=mysql_fetch_row($result)) {
echo "<option value="".$id."">".$name."</option>";
}
?>
</select>
</span></th>
</tr>
hi frds...
am using same select box in 20 different place in same php page.for these i creating database connection,executing query and value display in select box.my question is ,i want write same set of code for 20 selectbox in my php page ?if it so means,my php form load very slowly because php is creating 20 different database conection on loading page.how to solve these problem??i need to creat one connection,using that one connection i should diaplay same values,20 select box in my php page any suggestion pls..
or
query="select ID, CODE from features order by ID asc";
$result=mysql_query($query);
can i store $result in any array variable.. then i can dispaly value in select box..?? suggest pls..thanks
No comments posted yet
Your Answer:
Login to answer
310
18
Other forums
php or sql?
Sorry not sure if this is a sql problem or php the following code is supposed to delete data from th
array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I h
Redistributing dependent dlls
Hai all ,
I have created an application in VC++ using VS2008 in a development machine which r
fire away
i launched about 4 months ago as a lagit co. i have 2 paying clients, 1probono, 1 side progect, and
Legal Issues for SAP ERP o ERP in general
Hi experts,
Can someone please help me finding some documentation about legal issues tha
Scrolling news bar and MySQL
I am not sure if this is the correct forum to post this on. If not, I apologize. I am still pretty
getting Vars to pass to next page.
Hello all,
I have a confusing situation on my hands, i am a member of a gaming community and we
Saving data from a form into a file
Hey everybody,
Sorry, I am really new to PHP coding and such but a project kind of got thrust
Table sorting
Hi,
I'm trying to modify the following in order to make the output table sorted alphabeticall
Asset Transfer from One plant to another within same company code
Hi,
Please advise how to transfer one asset from one plant to another plant within same c