Large commit, multiple projects/labs
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Lab 7 Levi McLean</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>
|
||||
<form>
|
||||
<label for="fname">First Name</label>
|
||||
<input type="text" name="fname"><br>
|
||||
<label for="lname">Last Name</label>
|
||||
<input type="text" name="lname"><br>
|
||||
<label for="email">Email</label>
|
||||
<input type="email" name="email"><br>
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password"><br>
|
||||
<label for="address">Address</label>
|
||||
<input type="text" name="address"><br>
|
||||
<label for="city">City</label>
|
||||
<input type="text" name="city"><br>
|
||||
<label for="country">Country</label>
|
||||
<input type="text" name="country"><br>
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
@@ -0,0 +1,58 @@
|
||||
CREATE DATABASE IF NOT EXISTS `lab7` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */;
|
||||
USE `lab7`;
|
||||
-- MySQL dump 10.13 Distrib 8.0.44, for Win64 (x86_64)
|
||||
--
|
||||
-- Host: 127.0.0.1 Database: lab7
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 5.5.5-10.4.32-MariaDB
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!50503 SET NAMES utf8 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Table structure for table `registration`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `registration`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `registration` (
|
||||
`reg_id` int(11) NOT NULL,
|
||||
`fname` varchar(30) NOT NULL,
|
||||
`lname` varchar(30) NOT NULL,
|
||||
`email` varchar(100) NOT NULL,
|
||||
`password` varchar(255) NOT NULL,
|
||||
`address` varchar(255) NOT NULL,
|
||||
`city` varchar(30) NOT NULL,
|
||||
`country` varchar(30) NOT NULL,
|
||||
PRIMARY KEY (`reg_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `registration`
|
||||
--
|
||||
|
||||
LOCK TABLES `registration` WRITE;
|
||||
/*!40000 ALTER TABLE `registration` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `registration` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2026-04-01 19:11:27
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$databaseHost = 'localhost'; // localhost
|
||||
$databaseName = 'lab7'; // your db_name
|
||||
$databaseUsername = 'root'; // root by default for localhost
|
||||
$mysqli = mysqli_connect($databaseHost, $databaseUsername, $databaseName);
|
||||
?>
|
||||
<?php
|
||||
if(isset($_POST['submit']))
|
||||
{
|
||||
$fname = $_POST['fname'];
|
||||
$lname = $_POST['lname'];
|
||||
$email = $_POST['email'];
|
||||
$password = $_POST['password'];
|
||||
$address = $_POST['address'];
|
||||
$city = $_POST['city'];
|
||||
$country = $_POST['country'];
|
||||
$result = mysqli_query($mysqli,"insert into user values('','$fname','$lname','$email','$password','$address','$city','$country')");
|
||||
if($result) {
|
||||
echo "Registration Successfully";
|
||||
}
|
||||
else {
|
||||
echo "failed:";
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Lab 7 Levi McLean</title>
|
||||
<link rel="stylesheet" href="./style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>
|
||||
<form method="post" action="action.php">
|
||||
<label for="fname">First Name</label>
|
||||
<input type="text" name="fname"><br>
|
||||
<label for="lname">Last Name</label>
|
||||
<input type="text" name="lname"><br>
|
||||
<label for="email">Email</label>
|
||||
<input type="email" name="email"><br>
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password"><br>
|
||||
<label for="address">Address</label>
|
||||
<input type="text" name="address"><br>
|
||||
<label for="city">City</label>
|
||||
<input type="text" name="city"><br>
|
||||
<label for="country">Country</label>
|
||||
<input type="text" name="country"><br>
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
background-color: darkred;
|
||||
}
|
||||
Reference in New Issue
Block a user