-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinsertData.php
More file actions
29 lines (24 loc) · 855 Bytes
/
insertData.php
File metadata and controls
29 lines (24 loc) · 855 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
<?php
require('conectDB.php');
$data['title'] = $_POST['Titulo'];
$data['details'] = $_POST['Detalles'];
$data['req_one'] = $_POST['RequisitoUno'];
$data['req_two'] = $_POST['RequisitoDos'];
$data['req_three'] = $_POST['RequisitoTres'];
$data['req_four'] = $_POST['RequisitoCuatro'];
$data['req_five'] = $_POST['RequisitoCinco'];
$data['footer'] = $_POST['Footer'];
$data['fecha'] = date("d/m/Y");
$con = new ConectorBD('localhost', 'mundocue_userapp', '%Ucp_/MkT#');
$response['conexion'] = $con->initConexion('mundocue_apps');
if($response['conexion']=='OK') {
if($con->insertData('reg_busquedas', $data)){
$response['msg']="Exito en la insercion";
}else {
$response['msg'] = "Ocurrio un error en la insercion";
}
}else {
$response['msg'] = "No se pudo conectar a la base de datos";
}
echo json_encode($response);
?>