-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtable_maintenance3.php
64 lines (46 loc) · 1.38 KB
/
table_maintenance3.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/*
CREATE TABLE `proveedores` (
`prvid` BIGINT(8) NOT NULL AUTO_INCREMENT,
`prvdsc` VARCHAR(45) NOT NULL,
`prvemail` VARCHAR(120) NULL,
`prvtel` VARCHAR(20) NULL,
`prvcont` VARCHAR(60) NULL,
`prvdir` VARCHAR(120) NULL,
`prvest` CHAR(3) NULL,
PRIMARY KEY (`prvid`));
*/
$txtprvdsc = "";
$txtprvemail = "";
$txtprvtel = "";
$txtprvcont = "";
$txtprvdir = "";
$txtprvest = "";
$conn = new mysqli("127.0.0.1","root",
"root","");
if($conn->errno){
die($conn->error);
if(isset($_POST["btnSave"])){
$txtprvdsc = $_POST["txtprvdsc"];
$txtprvemail = $_POST["txtprvemail"];
$txtprvtel = $_POST["txtprvtel"];
$txtprvcont = $_POST["txtprvcont"];
$txtprvdir = $_POST["txtprvdir"];
$txtprvest = $_POST["txtprvest"];
$insertSQL = "Insert into categorias (txtprvdsc, txtprvemail, txtprvtel, txtprvcont, txtprvdir, txtprvest) ";
$insertSQL .= "value ('".$txtprvdsc."','".$txtprvemail."','".$txtprvtel."','".$txtprvcont."','".$txtprvdir."','".$txtprvest."');";
$inserted = $conn->query($insertSQL);
$last = $conn->insert_id;}
$str = "SELECT * from proveedores;";
$cursor = $conn->query($str);
$categorias = array();
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>" "</title>
</head>
<body>
</body>
</html>