0

I have a function where I enter data from a html form in a database. When i try and submit the function it doesn't enter the value. But when I hash my variable to md5 it does enter the value to the database? Does anyone know why this might be?

Here is my function:

 function damage()
{
    require 'mysql.php';
    $today = date("Y-m-d");
    $cost = $_POST["cost"];
    $damage = $_POST["damage"];
    $query = "INSERT INTO schade VALUES (NULL, '$cost', '$damage', '$today')";
    mysql_query($query, $db) or die ("Vul alle velden in!"); 
    echo("Gelukt");
}
damage();

Thanks!

thijs1095
  • 89
  • 2
  • 10

0 Answers0