Hi i am new to php, can any of u help me,
I am storing details such as name , address, email id, phone no, fax no and all. and i am creating edit form to edit those details , i am returns almost all values except address and select location value, can any one tell me how to get those values,
Below is my code
$qry = "select * from tbl_customer where comp_id='$id'";
$rst = mysql_query($qry,$con);
if($rst){
$row = mysql_fetch_array($rst);
$customername = $row['comp_name'];
$customeradd = $row['comp_add'];
$customerpnum = $row['comp_pnum'];
$customeremail = $row['comp_email'];
$customerfnum = $row['comp_fnum'];
$customerloc = $row['select_loc'];
<td width="80">Username * </td><td><input type="text" name="comp_name" class="textbox" size="30" maxlength="50" title="Enter your name" value="<?php echo $customername; ?>"/></td>
<td width="80">Address * </td><td><TEXTAREA ROWS="6" COLS="23" name="comp_add" title="Enter Your Address" value="<?php echo $customeradd; ?>"></textarea></td>
<td width="80">Phone No * </td><td><input type="text" name="comp_pnum" class="textbox" size="30" maxlength="20" title="Enter Valid Phone No" value="<?php echo $customerpnum ; ?>" /></td>
<tr>
<td>Location * </td>
<td><?php
/*$link = mysql_connect('localhost', 'root', '');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("b2bassociates");*/
include 'dbcon.php';
$qry = "select * from tbl_location order by loc_name";
$result = mysql_query($qry,$con);
?>
<select name="sel_loc" title="Select Location" value="<?php echo $customerloc; ?>" >
<option value="">----Select Location----</option>
<?php
while($row=mysql_fetch_array($result))
{
?>
<option value="<?php echo $row['loc_code']; ?>"
>
<?php echo $row['loc_name']; ?>
</option>
<?php
}
?>
</select>
</td>
</tr>
HERE I RETURN ALL THE DETAILS FROM DATABASE EXCEPT THE ADDRESS AND SELECT LOCATION, CAN ANY ONE TELL ME , hOW IT IS SOLVED