Php script for updating contacts
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.This would create a form to add data, when in The bottom part of the script actually pulls the data from the database, puts it into an array, and prints it out.Using the PHP_SELF function with actual database data, we are able to link to add mode, edit mode, and remove mode.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.
In this article we will try to give a practical, step by step web development example on how you can easily import google contacts to your web application, because even if google offers an api documentation, it’s always hard to find an example that is not out-dated, that fits in your app without having headaches and losing precious time.
As of this writing, Google Contacts API don't have support for PHP yet.
We will use the Google APIs Client Library for PHP as base code and we will use composer to get it.
Before you can do anything, you need to connect to the database.
We have also included an HTML title for the address book.