Jump to content

gristoi

Members
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by gristoi

  1. Are you serious? If you intend to code like this then you might as well quit now. Read up on SQL injection, and this snippet is the mother of them all. Im not going to help you any further on this as it could have dire consequences for anyone using this script.

     

     

    $query = $_REQUEST['SQLinput']; //You don't need a ; like you do in SQL
    $result = mysql_query($query);

  2. $(document).ready(function(){
    $(function(){
    $(".btn-details").on('click', function(){

    var idproduto = $(this).data('idproduto');

    $.ajax({
    type: "POST",
    url: "descProduto.php",
    async: false,
    dataType: "html",
    data: {'idproduto': idproduto},
    success: function(result){
    console.log("success");
    console.log(idproduto);
    },
    error: function(){
    console.log("error");
    }
    });
    return false;
    });
    });
    });
  3. Sorry, is there a problem? ok i will drop everything i am doing and look through the script you found on the  internet. Oh no wait, just realised I don't work for you!!!!

     

    This forum is for helping people the LEARN php and solve any issues they have with code that they are working on. Not sorting through random crap they found on the internet. You want someone to blindly fix something for you then post on freelance section and expect to dig into your wallet

  4. @jazzman1, you are talking a load of bollocks. I went back to uni at 26 years old to study programming after deciding I wanted a career change, and have been a professional developer in the industry now for over a decade. It does not matter what age you are, and from your comment I would guess you are only young. life doesn't end at 30 mate. I put myself through uni holding down a full time job and with two young children to bring up.

    • Like 1
  5. I would say you shouldnt bother submitting it directly in php. use ajax in the

    $(".submit").click(function(){

    $.ajax({
       type:'POST',
       data: $('#joinform').serialize(),
      url: 'url to your backend php script / controller''
    });

    }) 

     

    then in the backend just pull out the form vars

    $username = $_POST['username'];
    $pass = $_POST['pass'];
    
    //do your data santizing .....
    
    //build a string and sent using curl / guzzle / http client
    
    $url = 'http://gatewayaddress?username='.$username.'&password='.$pass ........ etc
    
×
×
  • 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.