Hi there…
I’m doing my project but i’m new to html and PHP. I’ve to extract the array of records form data and i am using xampp local host server. Below is the code that i am using for record extraction.
[php]<?php
$con = mysql_connect(“localhost”, “root”,"");
mysql_select_db(“shoppingmall”, $con);
$qry = mysql_query(“SELECT * FROM Category”);
$qry1 = mysql_query(“SELECT * FROM Category EQUI JOIN Subcategory”);
$qry2 = mysql_query(“SELECT * FROM Category”);
$qry3 = mysql_query(“SELECT * FROM Category EQUI JOIN Subcategory”);
</table>
<table width="50%" align="center">
<tr>
<td width="19%"><div align="center" class="style2"></div>
<select>
<?php while($r = mysql_fetch_array($qry))
{
echo"<option><center>".$r["Catid"]."-".$r["Cattitle"]."</center></option>";
}?>
</select>
</td>
<td width="29%"><div align="center" class="style2"></div>
<select>
<?php while($r1 = mysql_fetch_array($qry1))
{
echo"<option><center>".$r1["Scatid"]."-".$r1["Scattitle"]."</center></option>";
}?>
</select>
</td>
<form method="POST" action="productentry.php">
<td width="22%"><div align="center" class="style2"></div><input type="text" name="pid1"></td>
<td width="30%"><div align="center" class="style2"></div><input type="text" name="pname1"></td>
</tr>
?>[/php]
Its a dropdown list of records actually. What i want to do is to select any record from the list and send that selected record to another page where this will be inserted into another table in database. Please help me out. I would be thankful you you.