<?php
require_once('../scripts/db.php');
$link = mysql_connect($db_host, $db_user, $db_pass);
if (!$link) {
    die('Could not connect: ' . mysql_error());
}

$db_selected = mysql_select_db($db_name, $link);
if (!$db_selected) {
    die ('Can\'t use ' . $db_name . ': ' . mysql_error());
}
$id = $_POST['id'];
$email = $_POST['email'];

$q = "UPDATE `newcustomers` SET `confirmed` = 1 WHERE `id` = $id";

if ($res = mysql_query($q, $link)) {
  header('Location: http://salonspa-mail.com/tools/confirmations/newcustomer-confirmation/thankyou.php?email='.$email.'');
}
else {
  // customer verification failed... now what?
}

?>