Update a database entry

[insert_php]
global $wpdb;

$Host = “localhost”;$User = “jewishle_gilmod”;$Password = “Rosina[B]erger”;$DBName = “jewishle_wp35”;error_reporting(0);

$Link = mysql_connect ($Host, $User, $Password) or die(“Couldn’t connect to the database!”);
mysql_select_db ($DBName, $Link) or die(mysql_error());
$indexcd = $_POST[‘indexcd’];
echo ‘$indexcd = ‘.$indexcd.’
‘;

$Query = “SELECT * from cemdata where indexcd = ‘$indexcd'”;
$myrows = $wpdb->get_results( $Query );

foreach ($myrows as $row)
$indexcd=$row->indexcd;
$firstname=$row->firstname;
$surname=$row->surname;
$gravenum=$row->gravenum;
$gravecol=$row->gravecol;
$graverow=$row->graverow;
$section=$row->section;
$datedied=$row->datedied;
$age=$row->age;
$theyear=$row->year;
$dateborn=$row->dateborn;
$hebrewyear=$row->hebrewyearD;
$hebrewmonth=$row->hebrewmonthD;
$themonth=$row->month;
$maiden=$row->maiden;
$nostone=$row->nostone;
$add1=$row->additional1;
$add2=$row->additional2;

echo ‘

‘;
echo ‘‘;
echo ‘Name:
‘;
echo ‘Firstname:
‘;
echo ‘Date died:
‘;
echo ‘Year died:
‘;
echo ‘gravenum:
‘;
echo ‘gravecol:
‘;
echo ‘graverow:
‘;
echo ‘section:
‘;
echo ‘age:
‘;
echo ‘nostone:
‘;
echo ‘Month died:
‘;
echo ‘Date born:
‘;
echo ‘Hebrew Year:
‘;
echo ‘Hebrew Month:
‘;
echo ‘Maiden name:
‘;
echo ‘Additional 1:
‘;
echo ‘Additional 2:
‘;

echo ‘
‘;
echo ‘

‘;

echo $indexcd.’
‘;

[/insert_php]