fork download
  1. <?php
  2.  
  3. if (isset($_POST['editor'])) {
  4. $title = $_POST['title'];
  5. $mini_title = $_POST['mini_title'];
  6. $discreption = $_POST['discreption'];
  7.  
  8. if (empty($_POST['title'])) {
  9. echo json_encode(['status'=> false, 'message'=> ["title" =>"Ingrese datos uno"]]);
  10. }
  11.  
  12. if (empty($_POST['mini_title'])) {
  13. echo json_encode(['status'=> false, 'message'=> ["mini_title" =>"Ingrese datos dos"]]);
  14. }
  15.  
  16. if (empty($_POST['discreption'])) {
  17. echo json_encode(['status'=> false, 'message'=> ["discreption" =>"ingrese datos tres"]]);
  18. }
  19.  
  20. // Si todos los datos son llenados correctamente
  21. // Insertar los datos en la tabla
  22. //$stmt = $c->prepare("INSERT INTO articulos (title, mini_title, discreption) VALUES (?, ?, ?)");
  23. }
Success #stdin #stdout 0.04s 23348KB
stdin
Standard input is empty
stdout
Standard output is empty