Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "xxx.xxx.x.xx";
- $username = "xxxxx";
- $password = "xxxxxxx";
- $dbname = "xxxxxxx";
- $conn = new mysqli($servername, $username, $password, $dbname);
- $conn->set_charset('utf8');
- $data = $_POST['DataEntrada'];
- $utente = $_POST['Utente'];
- $observacao = $_POST['Observacao'];
- $estado = $_POST['Estado'];
- $colaborador = $_POST['Colaborador']
- $sql = "INSERT INTO regOratorio (`DataEntrada`,`Utente`,`Observacao`,'Colaborador')
- VALUES ('$data','$utente','$observacao','$colaborador')";
- if ($conn->query($sql) === TRUE) {
- $last_id = $conn->insert_id;
- }
- $sql1 = "INSERT INTO EstadoOratorio (`IdOrat`,`Estado`)
- VALUES ('$last_id','$estado')";
- if ($conn->query($sql1) === TRUE);
- $rowCount = $query->num_rows;
- $conn->close();
- ?>
Add Comment
Please, Sign In to add comment