How to put this code in my registration code in my program that if the registration is successful this will pop-up?? I'm new with jquery so i dont know how to do this stuff...help me guys please.

```
<script>
$(document).ready(function() {
    // show a dialog box when clicking on a link
    $("#success").on('click', function(e) {
        e.preventDefault();
    $.Zebra_Dialog('<strong>Congratulations </strong>' + 
    'You are now successfully registered!');
    });
 });
</script>

```

here is my php code:

```
<?php
    if(isset($_POST['save'])) {
        $fname = $_POST['fname'];
        $lname = $_POST['lname'];
        $position = $_POST['position'];
        $username = $_POST['username'];
        $password = $_POST['password'];
        $dateregistered = date("Y-m-d H:i:s");
        if (!$_POST['fname'] || !$_POST['lname'] || !$_POST['position'] || !$_POST['username'] || !$_POST['password'] ) {
            echo "You did not complete all of the required fields!";
        } else {
            $query="INSERT INTO users (position, fname, lname, username,password,dateregistered) VALUES ('$position','$fname','$lname','$username','$password',CURRENT_TIMESTAMP) ";
            mysql_query($query);
            if($query)
            echo "You Successfully Created an Account!";
        }
    }
?>

```

i want to replace the echo thing into jquery code...anyone know how???