jenson
03-24-2009, 05:30 PM
1) Script Title: Chained Select Menue
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/chainedmenu/index.htm
3) Describe problem:
Hey people...
Maybe (hopefully) someone of u can help me with simple problem/question.
I included the Chained Select Menue successfully in my form, BUT i can't
insert the Value of the Chained Select into my mysql database.
<?php
if(
!empty($_POST['FIL'] ) )
{
$sql01 = "INSERT INTO `art_anlage`.`anlage`
(`ID`, `DATUM` , `ZEIT` , `FIL` , `WGR` )
VALUES
(NULL, '".$_POST['DATE']."','".$_POST['TIME']."', '".$_POST['FIL']."' , '".$_POST['WGR']."' );";
echo $sql01;
mysql_query($sql01);
?>
The strange thing is, in a function where i query the value ...
if (document.Formular.WGR.selectedIndex == "" ) {
alert("Bitte definieren Sie die Warengruppe !");
document.Formular.WGR.focus();
return false;
}
it works.
So why it works to query the value if empty "" then alert..., but the insert self doesn't work ?
I need to say my english is not the best, but i hope u understand the problem i used to discribe.
Best Regards from Germany ...
jenson
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/chainedmenu/index.htm
3) Describe problem:
Hey people...
Maybe (hopefully) someone of u can help me with simple problem/question.
I included the Chained Select Menue successfully in my form, BUT i can't
insert the Value of the Chained Select into my mysql database.
<?php
if(
!empty($_POST['FIL'] ) )
{
$sql01 = "INSERT INTO `art_anlage`.`anlage`
(`ID`, `DATUM` , `ZEIT` , `FIL` , `WGR` )
VALUES
(NULL, '".$_POST['DATE']."','".$_POST['TIME']."', '".$_POST['FIL']."' , '".$_POST['WGR']."' );";
echo $sql01;
mysql_query($sql01);
?>
The strange thing is, in a function where i query the value ...
if (document.Formular.WGR.selectedIndex == "" ) {
alert("Bitte definieren Sie die Warengruppe !");
document.Formular.WGR.focus();
return false;
}
it works.
So why it works to query the value if empty "" then alert..., but the insert self doesn't work ?
I need to say my english is not the best, but i hope u understand the problem i used to discribe.
Best Regards from Germany ...
jenson