-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinsert_cloth.php
More file actions
39 lines (32 loc) · 799 Bytes
/
insert_cloth.php
File metadata and controls
39 lines (32 loc) · 799 Bytes
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
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* Created by PhpStorm.
* User: Mahan
* Date: 7/30/2018
* Time: 8:06 AM
*/
include_once 'database.php';
if(isset($_POST['submit'])) {
header('Location: '. 'cloth_table.php');
exit;
}
$code= $_POST['code'];
$title= $_POST['title'];
$description= $_POST['description'];
$type= $_POST['type'];
$size= $_POST['size'];
print_r($_POST);
$stmt =$conn->prepare(
" insert into cloth (code, title, description, type , size ) VALUES ( ? , ? , ? , ? , ? ) "
);
$stmt->bind_param(
"ssssd",$code, $title, $description, $type , $size );
echo "here";
$stmt->execute();
$stmt->close();
$conn->close();
?>
<html><form action="cloth_table.php" method="post" >
<input type='submit' name='Go to page' value='Go to page' />
</form>
</html>