hello.. this should be trivial but.. i am new.. and i'm having a brain cramp over this.. so please help anyone if you've got a minute or two to spare
i'm trying to create a very simple single drop-down box that lets me choose which database i want to use for my query
i want the page to reload itself once the selection is made.. since this is all part of the same php file
and what i'm having trouble with also is getting the value from the js form to be sent over to my php code
here's what i got so far.. but it ain't much
<select name="my_select_box">
<OPTION SELECTED>Select a Database
<OPTION Value="database_1">1
<OPTION Value="database_2">2
<OPTION Value="database_3">3
</SELECT>
<input type="button" Value="GO" onClick="window.location.reload()">
and my query looks like this
$sql = "SELECT * FROM ".$_POST[my_select_box].$orderByQuery.$limitQuery;
i'm now trying to get this to work with the $_POST.. at first I was trying to just get the value from my dropdown to be inserted into a standard php variable.. but either way.. nothing is working.. when i click on the GO button well... nothing happens
how would i set one of the values as a default value also? so my page doesn't show errors when loading it for the first time since the sql query is missing the database name