What I'm trying to do looks something like this simplified:
var ftgID = selection.options[selection.selectedIndex].value;
<?php $result2=mysql_query("SELECT * FROM FtgPerioder WHERE ftgID=ftgID");
The thing I want to do is:
replace ftgID in
mysql_query("SELECT * FROM FtgPerioder WHERE ID=ftgID");
Help Greatly needed!
Last edited by ds99jove; May 20th, 2001 at 06:42 PM.
Help needed bad!
I guess what I really want is to be able to access the Document Object Model from within PHP. If this is not possible, then someone please tell me how to:
Have 2 listboxes
Listbox nr 1 gets its values from a Database
Listbox nr 2 is dependent on Listbox nr 1 and gets its values from a database.
Hi, thanks for the reply!
About submitting the values, is there anyway of submitting a form without a submit button? Cause if the users have to click a submit button then I'm at the point that I'm specifically try to avoid
(ie. The user selects value 2 from Listbox 1, then clicks the submit button and selects value C from lisbox 2... then he goes back and changes listbox 1 to value 1 and saves. Problem here is that value 1 do not have the value C and voila! A bug is created!)
A simple solution would be something like:
but would that make the form values global values as submitting the form does? And is there a refresh() function?
Many Thanks Again!
You could can submit via (something like ) onchange="do_submit();"
my javcascript is not that hot but something like that should work.
Actually I only needed the:
statement, since all the values I need are inside the form and the form has "METHOD='Post'" they are made global HTML variables I can access with PHP when the form is submitted, my problem was how to submit the form without the use of a button Now I've learned you can do that 2 using the DOM =)
I'll check back later if (when there are any more troubles!