Hi
I am trying to create a user interface for my MySQL database. I got some
help earlier for my questions from some of the Php users on this site. I am
now stuck at a point from where I have no idea how to proceed.
I created a form with 5-6 options some of them uses mysql results based on
the previous options. I am using _GET and javascript to dynamically show the
options as one may be dependent upon the other. I put the submit button at
last. I want to go to a new page only after pressing the submit button.
Since I am using autoSubmit in javaScript it directs to the new page after I
select any of the option.
I know that this is possible but just dont know how to do it. I am
attaching the full code.
How to reset all the options by pressing the reset button once???.
Thanks a lot .
Php code:
[php]
$conn = mysql_connect('localhost', 'root', 'fahim');
$db = mysql_select_db('rugit',$conn);
if (!$db) die("Unable to connect to MySQL: " . mysql_error());
?>
Re: Where to put submit button with multiple _GET or _POST??
am 23.05.2011 03:43:54 von Karl DeSaulniers
You can do it in javascript with..
document.form['yourformname'].reset();
or
onclick="this.form.reset();">
HTH,
Best,
Karl
On May 22, 2011, at 7:56 PM, Fahim Mohammad wrote:
> Hi
> I am trying to create a user interface for my MySQL database. I got
> some
> help earlier for my questions from some of the Php users on this
> site. I am
> now stuck at a point from where I have no idea how to proceed.
>
> I created a form with 5-6 options some of them uses mysql results
> based on
> the previous options. I am using _GET and javascript to dynamically
> show the
> options as one may be dependent upon the other. I put the submit
> button at
> last. I want to go to a new page only after pressing the submit
> button.
> Since I am using autoSubmit in javaScript it directs to the new
> page after I
> select any of the option.
>
> I know that this is possible but just dont know how to do it. I am
> attaching the full code.
>
> How to reset all the options by pressing the reset button once???.
>
> Thanks a lot .
>
> Php code:
> [php]
>
> $conn = mysql_connect('localhost', 'root', 'fahim');
> $db = mysql_select_db('rugit',$conn);
> if (!$db) die("Unable to connect to MySQL: " . mysql_error());
> ?>
>
>
> $organism = $genomeVer = $queryType = $arrType = $arrTypeTarget =
> null;
> //declare vars
> if(isset($_GET["organism"]) && is_string($_GET["organism"]))
> {
> $organism = $_GET["organism"];
> }
> if(isset($_GET["genomeVer"]) && is_string($_GET["genomeVer"]))
> {
> $genomeVer = $_GET["genomeVer"];
> }
> if(isset($_GET["queryType"]) && is_string($_GET["queryType"]))
> {
> $queryType = $_GET["queryType"];
> }
> if(isset($_GET["arrType"]) && is_string($_GET["arrType"]))
> {
> $arrType = $_GET["arrType"];
> }
> if(isset($_GET["arrTypeTarget"]) && is_string($_GET["arrTypeTarget"]))
> {
> $arrTypeTarget = $_GET["arrTypeTarget"];
> }
> ?>
>
>
>
>
>
>