How can I call a jQuery function from within PHP?

Asked

Viewed 36 times

0

I created a little animation with jQuery like that alert("mensagem") that will show whether the registration worked or not. How can I call this function (animation) jQuery through PHP?

Here’s an example:

<?php
$cad = "INSERT INTO bla bla bla VALUES bla bla bla";
$sql = mysql_query($cad);
if($sql){
   chamar a função do jquery;
}else{
   chamar outra função do jquery;
}
?>
  • PHP runs on the server, jQuery on the client. What you can do is "manufacture" in PHP an HTML that only calls what you want, as the post indicated in the link above.

  • http://labs.abeautifulsite.net/archived/jquery-alerts/demo/

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.