33 lines
600 B
PHP
33 lines
600 B
PHP
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<title>Snuffler</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<form>
|
||
|
<textarea name="text" rows="5" placeholder="Whatcha snuffin' about?"></textarea><br />
|
||
|
<select id="user" name="user">
|
||
|
<option value=0>SYSTEM</option>
|
||
|
<option value=1>User</option>
|
||
|
</select>
|
||
|
<input type="submit" id="submit" name="submit" value="Snuff!" />
|
||
|
<h1>Snuffs</h1>
|
||
|
</body>
|
||
|
</html>
|
||
|
|
||
|
|
||
|
<?php
|
||
|
require_once "inc/database.php";
|
||
|
|
||
|
$database = new DataBase();
|
||
|
|
||
|
if(!$database) {
|
||
|
echo $database->lastErrorMsg();
|
||
|
} else {
|
||
|
echo "Opened database successfully\n";
|
||
|
}
|
||
|
|
||
|
$database->close();
|
||
|
|
||
|
?>
|