$query = "update admin set username = $username and password = $password where id = 1;
Any alternative to use this code with php?
$query = "update admin set username = $username and password = $password where id = 1;
Any alternative to use this code with php?
You need to use quotes around the variables.
Try this:
$query = "UPDATE admin SET username = '".$username."', password = '".$password."' WHERE id = 1";
Hope this helps.
Peace! xD