Jump to content

gristoi

Members
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by gristoi

  1. Andrew12313413, you're not going to get any help with that attitude, gerkintrigg is right, you cant just post random code on the forum and expect people to drop everything and fix it for you.

     

    If you do want that then you need to post it in the freelance section and be willing to pay for it, otherwise describe what you have attempted to do to get it to work, and what errors you are getting or what debugging you have done. Spitting your dummy out of your pram helps no one, especially you.

     

    This forum is to help people to learn php, not fix scripts for people that they 'found' on the internet

  2. firstly you have to realise that you are sending the data using ajax / javascript, and as this is client side you can never make that aspect of it completely secure. What you need to focus on is ensuring that the php side is escaping and validating all of the data being passed to it. looking at the code you have you are going in the right direction by using prepared statements.

  3. you're not posting jobId anywhere in that code. if you want job id to be posted then you need to specify it:

    $.ajax({
    type: "POST",
    dataType: "json",
        url: "actions/ApplyData.php",
        data: {
               jobid:  ID
               },
        cache: false,
                success: function(data)
                {
    console.log(JSON.stringify(data));
    $('#ApplyModal').modal('show');
     	}
     });
    
  4. for a start you are using xmlhhtp request directly. where there is nothing wrong with this, it is 2014 and you should use jquery ajax for all of your requests. have a google for jquery ajax chat room..

    plus, you're never calling the function you have made

    <a href="#" onclick="">send</a>  the onlick handler is empty. I am going to presume you have copied this script from a veeeeeeery old site. Like i stated before, in modern javacript you dont put event handlers direct into the html, you use event listeners

  5. i think you need to read up a little more on your mysql and php. these are server side languages, which means that by the tie your page is rendered all proccesing in the php and mysql has completed. What you 'need' to do is fire off an ajax request to a php script on the backend to process your request

×
×
  • 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.