Hello,
I've got a little problem with inserting in mysql. I created a form and a formhandler. I'm sure the form passes al the variables to the handler. But i ain't able to insert in my mysql table 😕
This is the formhandler.
<?php
/*Creating connection and choosing DB*/
mysql_connect("localhost","","")or die("An error accured while conecting to the server.");
mysql_select_db("Taakplanning");
/*Writing to DB*/
$query= "INSERT INTO taken ( Onderwerp, ProjectGrId, ProjectId, SoordId, Verantw, StatusId, PriorId) VALUES ( '$onderwerp', '$ProjectGr', '$Project', '$Taaktype', '$Verantw', '$Status', '$Prioriteit')";
if(mysql_query($query))
print("Data saved");
else
print("Something went wrong.")
?>
Now i'm always getting the "Something went wrong" and nothing is insert in the DB.
I know you should grant browsers permission to insert data and i tried this command: grant select, insert, update, delete to nobody@localhost;
Was that wrong? I read browser usually connect as nobody.
I'm running a localhost on a apache server and use IE and Netscape as browsers.
Tia