in my php form on click of Edit link i have this script, and i am unable to fetch the default value of state in my form on click of "edit" link.
<div id="center-column">
<script type="text/javascript" src="countries.js"></script>
<script language="javascript">print_country("country"
; </script>
<div class="top-bar">
<h1>Edit Patients Details</h1>
</div><br />
<div class="select-bar"> </div>
<?php
@$p_id= $_GET['p_id'];
include("include/connection.php"
;
$select= "select * from p_registration where id='$p_id'";
$data= mysql_query($select);
$row= mysql_fetch_array($data);
@$fnm.='<td>'. '<input type="text" name="fname" value="'.$row['fname'].'"/>'.'</td>';
@$lnm.='<td>'.'<input type="text" name="fname" value="'.$row['lname'].'"/>'.'</td>';
@$country.='<td>'.'<select onchange="print_state('."state".',this.selectedIndex);" id="country" name ="country" style="width:57%;" required>
</select>'.'
<br />'.'</td>';
@$state.='<td>'.'<select name ="state" id ="state" style="width:57%;" required></select>'.'<script language="javascript">print_country("country"
; </script>'.'</td>';
echo '
<table style="font-size:14px; border: 5px solid #FF6600;" cellspacing="11px">
<tbody>
<tr>
<td><b>First Name</td>'.$fnm .'
</tr>
<tr>
<td><b>Last Name</td>'.$lnm .'
</tr>
<tr>
<td><b>Country</td>'.$country .'
</tr>
<tr>
<td><b>State</td>'.$state .'
</tr>
</tbody>
</table>';
?>
</div>