if (isset($_POST['submit'])) {
$sql = "UPDATE users SET paid='1', WHERE email = '".$email."'";
}
CREATE TABLE `users` (
`user_id` int(5) NOT NULL,
`first_name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`username` varchar(25) NOT NULL,
`password` varchar(255) NOT NULL,
`Last_name` varchar(255) NOT NULL,
`City` varchar(255) NOT NULL,
`Phone` varchar(255) NOT NULL,
`paid` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
First you need to make a connection to the database.
Then using that connection, you execute the query you stored in the variable.
But because the query contains a variable(which I don’t see being set anywhere) you should really prepare the query first, substituting the variable ($email`) for a parameter.
Then execute it, passing in the value for the parameter.
I’m sure I have seen you do this before in other topics already, you know this.