Jump to content

gristoi

Members
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by gristoi

  1. if your using ajax to submit the form then you need to prevent the forms native submission, otherwise the page will reload:

    $("#sub").click( function() {
     $.post( $("#myForm").attr("action"),
    

    should be 

    $("#sub").click( function(e) {
    //stop the click event from bubbling
     e.preventDefault();
     $.post( $("#myForm").attr("action"),.....);
    ..............
    return false; // at end 
    }
    
  2. you say you have a pretty good php knowledge. Well I would advise you to stop thinking about which 'application' to choose but expand your core PHP knowledge. And not by trying to jump into frameworks. you will end up a semi decent developer with a knowledge of some frameworks. What you really need to focus on is the fundementals : OOP, design patterns, coding standards, version control, TDD ( unit and integration and acceptance testing ) and  methodologies such as AGILE. Once you have these then frameworks are just tools that you can use to fit the project. Learn correctly and the money comes naturally.

  3. as a test, what happens if you go to delpage.php?id=1 ( make sure this is a real row id in the database) ? you need to make sure that the php isnt crapping out on the deletion. because its ajax ou could be getting an error back, but the success method triggers. giving you a false-positive,

     

    Also, have you looked at the response being sent back from the server in your browser console?

  4. you are doing no check at all that the values being passed in for start and end dates are in the expected format. You need to make sure that the dates are in the Y-m-d format. So 5th jan 2013 would be 2013-01-05. If you dont pass a correctly formatted date into the query it will not insert


  5. if (isset($_POST['action']) && $_POST['action'] == 'login')
    {
    if (!isset($_POST['email']) || $_POST['email'] == '' ||
    !isset($_POST['password']) || $_POST['password'] == '')
    }
    $GLOBALS['loginError'] = 'Please fill in borh field';
    return false;
    }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.