First of all, please indent your code.
$epic = $_REQUEST['epic'];
$sql = "UPDATE std_id SET epic_no='$epic'' WHERE v_fname='$name' AND v_lname='$lname' AND gen='$gen' AND age= '$age' AND as_id='$as_id'";
First problem: you are not escaping variables ($epic and the others). Use addslashes()
at least.
Second problem: you have two single apis near $epic
, so correct your query as this:
UPDATE std_id SET epic_no='$epic' WHERE v_fname='$name' AND v_lname='$lname' AND gen='$gen' AND age= '$age' AND as_id='$as_id'
Third problem: please don't use $_REQUEST
. It's so generic. Use $_GET
or $_POST
.
Fourth problem: table and columns names. It's not a really problem, but they are so weird and confusing.