Help with Medoo framework, mysql and php

0
require_once 'medo/medoo.php';

   $database = new medoo([
    'database_type' => 'mysql',
    'database_name' => '#',
    'server' => 'localhost',
    'username' => '#',
    'password' => '#',
    'charset' => 'utf8',
    'port' => #
   ]);

   if ($database->has("BECAWEB",[
    "AND" => [
        "edoUdp" => "0"
    ]
]))
{
    echo '<script type="text/javascript" charset="utf-8">';
    echo 'setTimeout(function () { swal("¡Actualiza tus datos!","Para comenzar el proceso de Reinscripción y becas en linea, es necesario que actualices tus datos, ya que apartir de este ciclo se te hará llegar a tu correo personal el número de referencia de pago de reinscripción","warning");';
    echo '}, 1000); </script>';
}
else
{
    header('Location: alumno-fase2.php');

I have this query "has" using the medoo framework ( link ). My goal is that if there is a certain value in the database, that is, a whole number of a digit (1,2,3, etc) shows you an alert (using sweet alert) otherwise it is not that digit and it is greater than the one indicated by redirecting me to another page, in the which applies the same process, so far I have not had progress, does not redirect me or do anything, also I also want that when a form is completed, that field of the DB table is increased by one, so far I have only achieved it do in the first form, in the other 2 I can not do it, it does not save it or it increases in the DB.

    
asked by madaviela 13.06.2016 в 18:49
source

0 answers