how can i update the record from database?
$query = "UPDATE studentinfo SET firstname= '".$student['fname']."' and lastname='".$student['faname']."' and gender = 'Male' WHERE id = '".$student['id']."'"; $query = "UPDATE studentinfo SET firstname= '".$student['fname']."', lastname='".$student['faname']."', gender = 'Male' WHERE id = '".$student['id']."'";
UPDATEstatement seems like a reasonable way to start. Is something not working? Can you maybe provide some information about the problem? (Also, be aware that this code is wide open to SQL injection attacks.)bob'; DROP TABLE studentinfo; --.