• Skip to primary navigation
  • Skip to main content

WP Discuss

Wordpress Research & Analytic

  • Submit
  • Disclaimers
  • About
  • DMCA
  • Privacy Policy
  • Contact

Alturas de famosos

  • No categories
  • All

Ajax not working to insert, query and result data

June 22, 2016 by Leave a Comment

On my site, through a form I send/register same information in database, do a SELECT/query and return it! Return the last table saved in database, just that user just entered on the form (along with some more information coming from the database). How I want to display these values coming from databse in a modal bootstrap it's necessary that the page doesn't give the refresh. For this, I inserted the AJAX as follows: $(document).ready(function(){ $('#enviar').click(function(){ $.ajax({ //CAAL AJAX IN WORDPRESS url: 'wp-admin/admin-ajax.php', type: 'POST', //INSERT, QUERY AND DISPLAYS TO USER data: 'action=prancha', error: function(){ alert('ERRO!!!'); }, //IF OK, DISPLAYS TO USER IN DIV "RESULT" success: function(data){ $('#result').html(data); } }); }); }); MY FUNCTIONS.PHP: function prancha(){ header('Content-Type: text/html; charset=utf-8'); include "../../../wp-config.php"; /* DECLARING THE VARIABLES */ $nome = ""; $email = ""; $estilo = ""; $experiencia = ""; $altura = ""; … [Read more...] about Ajax not working to insert, query and result data

Learn More

query has no destination for result data, query has no destination for result data postgresql, 42601 query has no destination for result data, wp_insert_post_data not working

Copyright © 2021 WP Discuss. Power by Wordpress.