-
Notifications
You must be signed in to change notification settings - Fork 0
/
addAI.php
28 lines (21 loc) · 807 Bytes
/
addAI.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
$db = mysql_connect(“localhost”, “user”);
Mysql_select_db(“PA_Database”);
$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$db_selected = mysql_select_db(DB_NAME, $link);
if (!$db_selected) {
die('Can\'t use ' . DB_NAME . ': ' . mysql_error());
}
if (isset($_POST['Save'])) {
$loc = $_POST['location'];
$date = $_POST['date'];
$time = $_POST['time'];
$wState = $_POST['wState'];
$desc = $_POST['sDesc'];
$sql = "INSERT into accinfo (accidentNo, location, time, date, eyeWitnessDetails, sceneDescription) values ($aInfo, $loc, $time, $date, $wState, $desc)";
$result = mysql_query($sql);
}
?>