Webbserverprogrammering 1

Show sourcecode

The following files exists in this folder. Click to view.

webbsrvprg/exercises/ajax/extra1/

createtable.php
delete.php
extra1.php
select.php
service.php
signIn.php

createtable.php

27 lines ASCII Windows (CRLF)
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <?php 
  
try {
    
/** @var PDO $dbconn */
    
include "../../../dbconnection.php";

    
$sql "CREATE TABLE ajaxextra1 (
    id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(30) UNIQUE,
    password VARCHAR(30)
    )"
;

    
$dbconn->exec($sql);
  }
  catch (
PDOException $e) {
    echo 
$e;
  }
  
?>
</body>
</html>