if(isset($_GET['Id'])){
$Id=$_GET['Id'];
$query = mysql_query("SELECT * FROM page WHERE ID='$Id'");
$row = mysql_fetch_array($query);
$PageId=$row['PageId'];
$MenuName=$row['MenuName'];
$ParentMenuId=$row['ParentMenuId'];
$LinkWidth=$row['LinkWidth'];
$OtherUrl=$row['OtherUrl'];
$Status1=$row['Status'];
$OnMainMenu=$row['OnMainMenu'];
$FooterMenu=$row['FooterMenu'];
}
?>
<form style="width:100%" action="" method="post" id="form1">
<table class="viewjob" align="center" >
<tr class="tableheader">
<td align="center" colspan="4"> Update </td>
</tr>
<tr class="tablerow">
<td>Page Id</td>
<td><select name='PageId' class="select">
<option value='0' >select any page</option>
<?php
$sql10 = "SELECT Id,Title FROM abc";
$val=$row['PageId']?:'';
$rs = mysql_query($sql10) or die(mysql_error());
while($row = mysql_fetch_array($rs)){
$selected = ($val == $row['Id'] ? 'selected="selected"' : '');
echo '<option value ="' . $row['Id'] . '" '. $selected .'>' . $row['Title'] . '</option>';
}
mysql_free_result($rs);
?>
</select>
</td>
i am insert and update on the same php page
this code is run in update but the error of Illegal string offset 'PageId' is on insert