<?php

$hostname_arka = "localhost";
$database_arka = "easwari_eswarilibrary";
$username_arka = "root";
$password_arka = "";
$arka = mysql_connect($hostname_arka, $username_arka, $password_arka) or trigger_error(mysql_error(),E_USER_ERROR);
$db_select=mysql_select_db('easwari_eswarilibrary',$arka);

function getmember_id($member_code,$id)
{
$ret=mysql_fetch_row(mysql_query("select id,membership_scheme,member_type,member_name,emailid,member_code,contact_number,branch from members where id='".$member_code."'"));
if($id==1)
return $ret[0];
if($id==2)
return $ret[1];
if($id==3)
return $ret[2];
if($id==4)
return $ret[3];
if($id==5)
return $ret[4];
if($id==6)
return $ret[5];
if($id==7)
return $ret[6];
if($id==8)
return $ret[7];
}

function getmember_due($member_code)
{
$ret=mysql_fetch_row(mysql_query("select due_amount from members where member_code='".$member_code."'"));
return $ret[0];
}
function getbranch_id($bname)
{
$ret=mysql_fetch_row(mysql_query("select id from branches where name='".$bname."'"));
return $ret[0];

}

$adds=$_GET['ads'];
//echo $adds;
$add=$_GET['id'];
//echo $add;

//echo "UPDATE `members` SET address='".$adds."' WHERE  `id` = '".$add."' ";
mysql_query("UPDATE `members` SET address='".$adds."' WHERE  `id` = '".$add."' ");

mysql_close($arka);
?>