Upload New File

parent 21a5ad33
<html>
<?php
$servername = "localhost";
$username = "root";
$password = "Localhost";
$dbname = "projectbus1";
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
if ((isset($_POST['submit'])))
{
echo "HI";
$destination = $_POST['destination'];
$sql = "INSERT INTO destination (destination) VALUES('$destination')";
if ($conn->query($sql) === TRUE) {
header('Location: retrive.php');
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
}
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment