Welcome to the Harry's Auto Center

Registering user from and the following services:

    Click here to have your service request registered in our database


    <?php  // thanks.php
    // Exemplo de controle de sessão que permite cookies desabilitados pelo browser do cliente
    // Modificado para só exibir o id da sessão no link "here" se cookies desabilitados
    session_start();
    $head=<<<HEAD
    <html>
    <head>
    <title>Save Session Information</title>
    </head>
    <body>
    <h2>Welcome to the Harry's Auto Center</h2>
    HEAD;
    echo 
    $head;
    $username$_POST[username];
    $location$_POST[location];
    $services$_POST[services];    // $services is an array! (multiple select)
    $_SESSION['username']= $username
    $_SESSION['location']= $location
    $_SESSION['services']= $services;
    print 
    "Registering user <b> $username</b> from <b>$location</b>
    and the following services:<ol>"
    ;
     foreach(
    $services as $value){
         print 
    "<li>$value</li>";
     }
    if (!isset(
    $_COOKIE['PHPSESSID']))
       
    // debug only: foreach ($_COOKIE as $name =>$val) print ("<br>name: $name  value: $val"); 
       
    $sid"?PHPSESSID=" session_id();  
    else 
    $sid="";  // o link a seguir passa o id da sessão na URL, se necessário 
    print "<p>Click <a href=\"regform.php$sid\">here</a> to have your service request
    registered in our database"
    ;
    print 
    "<hr />";
    show_source("thanks.php");
    print 
    "</body></html>";
    ?>