Child pages
  • Chapter 5 - Data modification - Updating a customer

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Preparation

Duplicate file list_the_clientscustomers.php from Chapter 3.3, rename it to U-CRUD.php, and put it at the root of your Web server.

...

Code Block
// Define the resource
$opt = array('resource' => 'customers');

// Define the resource id to modify
$opt['id'] = $_GET ['id'];

// Call the web service, recuperate the XML file
$xml = $webService->get( $opt );

// Retrieve resource elements in a variable (table)
$resources = $xml->children()->children();

// clientcustomer form

Here, the call is similar to data retrieval. It is this call that will enable us to create the form.

...

Check using R-CRUD.php that the information has been changed and then process the Client customer ID.

If you have trouble, look at the code in the 2-update.php sample file.