views:

35

answers:

1
    <script type="text/javascript">
    $(function() {
  $("#continue").click(function () {
    $.ajax({
       type: "POST",
       url: "dbc.php?check=First",
    data: {full_name : $('#full_name').val(),
         usr_email : $('#usr_email').val()},

       success: function(msg){
            if(msg==1){
              $("#First_1").hide();
              $("#Next_2").toggle(); 
           }else{
              alert(msg);
           }         
        }
     });
     return false;
  });
}); 
    </script>

Here's dbc.php?check=First phpbin.net/x/249121011

if it´s receiving echo 1; from dbc.php?check=First, then hide & toggle, else then alert the output error.

Please check the link for the php, what is wrong here?

Right now i just get an empty alert.

A: 

$_POST['check'] is never set, thus your code isn't being called, thus nothing is output. Either remove the check for $_POST['check'] in your PHP script, add check: 'First' to the data property to the $.ajax call, or change $_POST to $_GET.

strager
Now i get a alert message that says "Array"
Karem
@Karem, Nothing in your code indicates that anything except `1` or nothing (or a PHP notice/warning/error) can be printed. If you post more of your code, maybe we can find the source of your other problem.
strager
@Strager please check this new question, http://stackoverflow.com/questions/3382473/php-why-do-it-echo-array there's my new updated code also
Karem