Php script for updating contacts

05-Mar-2019 23:24

Somehow, Google invalidate the use of "g Contact" node name in Contact creation.

If your Contact creation XML protocol format contains "g Contact" node name, it returns "Invalid XML Document." and Google prevents the creation of Contact request.

Since you are using the same PHP page to do everything, you will make it so that different 'modes' show different options.

You would place this code directly under that in our last step.

CREATE TABLE address (id INT(4) NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(30), phone VARCHAR(30), email VARCHAR(30)); INSERT INTO address (name, phone, email) VALUES ( "Alexa", "430-555-2252", "[email protected]"), ( "Devie", "658-555-5985", "[email protected]" ) This creates our database fields and puts in a couple of temporary entries for you to work with. The first is a ​self incrementing number, then name, phone and email.

You will use the number as a unique ID for each entry when editing or deleting.

Before you can do anything, you need to connect to the database.

We have also included an HTML title for the address book.

When parsing the contacts in the php foreach, we will retrieve also the image for each contact.Google documentation about retrieving a contact’s photo.