Merge branch 'master' of git.2li.ch:ibz/web_AI-3

This commit is contained in:
Andreas Zweili 2017-01-14 11:22:47 +01:00
commit 3d9f238ae8
6 changed files with 64 additions and 7 deletions

View File

@ -14,16 +14,26 @@
<div>
<div>
<header>
<!-- The title begins here -->
<h1>Board</h1>
<!--The Title ends here -->
<!-- The sidebar naviagtion begins here -->
<nav>
<?php
include 'navigation.php';
?>
</nav>
<!-- The sidebar naviagtion ends here -->
<!-- The sidebar naviagtion ends here -->
</header>
</div>
<!-- The Picture upload Button begins here -->
<div>
<form action="upload.php" method="POST" enctype="multipart/form-data">
<input type="file" name="file">
<button type="submit" name="submit">UPLOAD</</button>
</div>
<!-- The Picture upload Button ends here -->
</div>
<p>Board</p>
</body>
</html>

View File

@ -1,11 +1,11 @@
body {
body {
font-family:sans-serif;
width:50%;
margin-left:auto;
margin-right:auto;
}
p {
p {
font-size:medium;
font-family:sans-serif;
font-weight:normal;

12
dbh.php Normal file
View File

@ -0,0 +1,12 @@
<!-- dbh file for the login -->
<?php
<!-- Connection to the Server -->
$conn = mysqli_connect("localhost:4022", "root", "password", "login");
<!-- Connection to the Server end -->
if (!$conn){
die("Connection failed:".mysqli_connect_error());
}
?>
<!-- dbh file for the login end -->

View File

@ -14,16 +14,30 @@
<div>
<div>
<header>
<!-- The title begins here -->
<h1>Home</h1>
<!-- The title begins here -->
<!-- The sidebar naviagtion begins here -->
<nav>
<?php
<?php
include 'navigation.php';
?>
<!--Login-->
<form action="signup.php" method="post">
<input type="text" name="first" placeholder="Firstname"><br>
<input type="text" name="last" placeholder="Laststname"><br>
<input type="text" name="uid" placeholder="Username"><br>
<input type="password" name="pwd" placeholder="Password"><br>
<button type="submit">SIGN UP</button>
</form>
<!--Login end-->
</nav>
<!-- The sidebar naviagtion ends here -->
</header>
</div>
</div>
<p>Home</p>
</body>
</html>

18
signup.php Normal file
View File

@ -0,0 +1,18 @@
<!-- Sign up for the login -->
<?php
INCLUDE 'dbh.php';
$first = $_POST['first'];
$last = $_POST ['last'];
$uid = $_POST['uid'];
$pwd = $_POST['pwd'];
$sql = "Insert into user (first, last, uid, pwd)
VALUES ('$first', '$last' )";
$result = $mysqli_query($conn, $sql);
header("Location: index.php");
?>
<!-- Sign up for the login end -->

View File

@ -14,6 +14,10 @@
<div>
<div>
<header>
<!-- The title begins here -->
<h1>Ticket</h1>
<!-- The title ends here -->
<!-- The sidebar naviagtion begins here -->
<nav>
<?php
@ -24,6 +28,5 @@
</header>
</div>
</div>
<p>Ticket</p>
</body>
</html>