Results 1 to 4 of 4

Thread: Chained Select Menu value into database

  1. #1
    Join Date
    Mar 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Chained Select Menu value into database

    1) Script Title: Chained Select Menue

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...menu/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.

    Code:
    <?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 ...
    Code:
    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
    Last edited by Snookerman; 04-22-2009 at 09:04 AM. Reason: added “Resolved” prefix

  2. #2
    Join Date
    Mar 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No One ???

    I just need to know which way i can put the selected value of a chained select menue into a database.

    I use the "POST" Method.

    Any helpful suggestions ??????
    Please ...

    Best regards from germany

    jenson
    Last edited by jenson; 03-25-2009 at 05:20 PM.

  3. #3
    Join Date
    Mar 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    prob is fixed !


    thread could be closed !

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Glad to see you solved it!
    It seems your topic is solved... Please set the status to resolved.. To do this:
    Go to your first post ->
    Edit your first post ->
    Click "Go Advanced" ->
    Then in the drop down next to the title, select "RESOLVED"
    Jeremy | jfein.net

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •