Advice with php script to verificate how does it work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SergioPerez
    New Member
    • Feb 2014
    • 1

    #1

    Advice with php script to verificate how does it work

    I have to be sure, becouse i don't know php, just android and i have to do project and i have to know on which side is error. Is this php script is correct ?

    Code:
    `$Zam_suma = $_POST['Zam_suma'];`
    `$Kli_imie = $_POST['Kli_imie'];`
    `$Kli_adres = $_POST['Kli_adres'];`
    `$Kli_nr_telefonu = $_POST['Kli_nr_telefonu'];`
    
    `$sql="INSERT INTO Klient (Kli_imie, Kli_adres, Kli_nr_telefonu)`
    `VALUES`
    `('$_POST['Kli_imie']','$_POST['Kli_adres']','$_POST['Kli_nr_telefonu']')";`
    
    
    `mysql_query($sql);`
    Last edited by Rabbit; Feb 12 '14, 05:18 AM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    no.

    you’re highly susceptible to SQL Injection.

    you use deprecated functions.

    and you have lots of syntax errors.

    Comment

    Working...