title: Ajax cant find php file.. Why?
body: <p>I am trying to create a ajax-login-form, but my jquery-script cant find the php file. they are in the same directory (!), but it doesn't work.</p>
  
  <p><strong>my php-file (logreg.php)</strong></p>
  
  <pre><code>&lt;?php
      echo 'true';
  ?&gt;
  </code></pre>
  
  <p><strong>my script-file (logreg.js)</strong></p>
  
  <pre><code>$("button[action=\"register\"]").click(function(){
      var username = $("#login-username").val();
      var password = $("#login-password").val();
      var repassword = $("#login-repassword").val();
      $.ajax({
          type: "POST",
          url: "logreg.php",
          data: "name="+username+"&amp;pass="+password+"&amp;repass="+repassword,
          success:function(html){
              if(html=='true'){
  
              }
          },
          beforeSend:function(){
              $("button[action=\"register\"]").text("Sendet ...");
          },
          error: function(ts) { $("div#content").html(ts.responseText); }
      });
  });
  </code></pre>
  
  <p>why isnt this working? i am getting everytime "Error 404" (not found).</p>