How it works...

In this program, we first ask the user to enter the email address they want to update. Then, we search the users table to see if there is any row with the matching email address. If we find it, we display the current information of the user; that is, the current email address, password, and address of delivery. Thereafter, we ask the user to enter a new password and new address of delivery. The new password and address of deliver will replace the old password and address of delivery, thereby updating the users table.

We will start by invoking the mysql_init function to initialize a MYSQL object by the name conn. Then, we will pass the MYSQL object conn to the mysql_real_connect function that we invoked to establish a connection ...

Get Practical C Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.