Jump to content

Search the Community

Showing results for tags 'mysqli function'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi I'm trying to call this following php function from a ajax call but i can't get it to work class EBSPMA { function visitaValidacaoByUserAdmin($userid) { if(isset($_POST['action']) && !empty($_POST['action'])) { $id_visita = filter_input(INPUT_POST, 'id_visita'); $plano =filter_input(INPUT_POST, 'plano '); $valido = filter_input(INPUT_POST, 'valido'); $sql = "UPDATE `new_visitas` SET `plano`= ?,`valido`= ? WHERE `id_visita` = ?"; $stmt = $this->connection->prepare($sql); if ($stmt === false) { trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $mysqli->error, E_USER_ERROR); } $stmt->bind_param('ssi',$plano, $valido, $id_visita); if (!$stmt->execute()) { echo json_encode(array('status' => 'error', 'message' => 'Opppss...A visita ainda não foi validada')); } else { echo json_encode(array('status' => 'success', 'message' => 'A visita já foi validada...Obrigado')); } $this->connection->close(); } } } and this is my ajax call function submitForm2(formId){ var id_visita = $('input[id="id_visita"]').val(); var plano = $('input[id="plano"]').val(); var valido = $('input[id="valido"]').val(); $.ajax({ url: 'include/fg_membersite.php', type: 'POST', data : {action: 'visitaValidacaoByUserAdmin()', 'id_visita': id_visita, 'plano': plano, 'valido': valido}, dataType: 'json', success:function(response){ alert(response.message); $("#myModal2").modal('hide'); window.location.reload(true); } }); } Nothing happens....any help please??
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.