Hi i m creating a small web application that allows a user to select multiple options from a list box.The problem is i cannot write that information to the database.
I have two forms: one to get information from the user and another to write that info to the database.The code that i use to extract info from the user and write to the database is below:
$app = $_POST ['app'];
$appname = clean_it($_POST ['appname']);
$appdesc = $_POST ['appdesc'];
$year = $_POST ['year'];
$Ecomments = $_POST ['Ecomments'];
$comments = $_POST ['comments'];
$db = $_POST ['db'];
$AppOwner = $_POST ['AppOwner'];
$devlanguage=$_POST['devlanguage'];
if ($devlanguage)
{
foreach ($devlanguage as $lang)
{
$d[] = $lang ;
}
}
// build query to insert data into the job table
$qry = "INSERT INTO Application VALUES (".
"'$app','$appname','$appdesc','$year','$d',".
"'$Ecomments','$comments','$AppOwner','$db')";
// execute query
$added = execute_query($qry);
Please tel me wat i have done wrong...Please help me some1
Thanks in advance