madness69 Posted October 23, 2012 Share Posted October 23, 2012 Hello there, i have a table called "category" that haves 2 columns, that are "category" and "category_en" And im echo the list of data that i have, i can make the listins of columns "category appear but not the data of category_en . Take a look in my code please $qry=mysql_query("SELECT * FROM category", $con); if(!$qry) { die("Query Failed: ". mysql_error()); } <?php while($row=mysql_fetch_array($qry)) { echo "<option value='".$row['category']."'>".$row['category']."</option>"; } ?> <?php while($row=mysql_fetch_array($qry)) { echo "<option value='".$row['category_en']."'>".$row['category_en']."</option>"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/269806-query-problem-doesnt-bring-listings-other-column/ Share on other sites More sharing options...
madness69 Posted October 23, 2012 Author Share Posted October 23, 2012 (edited) im sorry, for better understanding herte it is full code <?php $qry=mysql_query("SELECT * FROM category", $con); if(!$qry) { die("Query Failed: ". mysql_error()); } ?> <form action="article_created.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <table align="center"> <tr valign="baseline"> <td nowrap align="right" valign="top"> </td> <td>Categoria Produto Espanish</td> </tr> <tr valign="baseline"> <td nowrap align="right" valign="top"> </td> <td><select name="category" id="category"> <?php while($row=mysql_fetch_array($qry)) { echo "<option value='".$row['category']."'>".$row['category']."</option>"; } ?> </select> </td> </tr> <tr valign="baseline"> <td nowrap align="right" valign="top"> </td> <td>Category Produtc Ingles</td> </tr> <tr valign="baseline"> <td nowrap align="right" valign="top"> </td> <td><select name="category_en" id="category_en"> <?php while($row=mysql_fetch_array($qry)) { echo "<option value='".$row['category_en']."'>".$row['category_en']."</option>"; } ?> </select></td> </tr> Edited October 23, 2012 by madness69 Quote Link to comment https://forums.phpfreaks.com/topic/269806-query-problem-doesnt-bring-listings-other-column/#findComment-1387139 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.