0

my code doesn't works ... it returns only a 500 error :(

function getfromdb($select, $tablenme, $wherewhat, $whereval) { 

  $msntps = $conn->query("SELECT $select FROM $tablenme WHERE $wherewhat = '$whereval'")->fetch_object()->$selectval; 
  return $msntps;
}

and then i would like get something with

echo getfromdb("email", "users", "username", "testusername");
John x3
  • 11
  • 2

0 Answers0