hi..i am trying to create a form having text field,checkboxes,radio buttons and submit reset buttons.
I need to search my database for the given word when the submit button is clicked.
I was able to create the form but i dont know how to pass the word the user entered in order to check the database.Nothing happens when submit is pressed.Here is the db_search.cgi code i used..
#!/usr/local/bin/perl
use CGI::Carp qw(fatalsToBrowser);
use CGI;
use DBI;
my $cgi=new CGI;
print $cgi->header('text/html'),$cgi->start_html(-title=>'students');
print $cgi->center("GENOMES");
$cgi->start_form($method='get',$action='/home/ma/503.01/masc0100/public_html/db_search.cgi');
print $cgi->p("enter the protein accession number");
print $cgi->textfield($name='querry');
print $cgi->p();
print $cgi->br();
print $cgi->p("select name");
print $cgi->popup_menu($name='popup',$values=['a','b','c','d'],$default='a');
print $cgi->p();
print $cgi->br();
print $cgi->p("enter strand");
print $cgi->radio_group($name='radio',$label=['-1','1','0']);
print $cgi->p();
print $cgi->br();
print $cgi->p("select fields to be retrieved");
print $cgi->checkbox($name='accesion number',$value='acc no');
print $cgi->checkbox($name='proteins in the sequence',$value='pacc nos');
print $cgi->checkbox($name='sequence length',$value='seq length');
print $cgi->checkbox($name='sequence',$value='seq');
print $cgi->checkbox($name='function',$value='fnc');
print $cgi->checkbox($name='aliases',$value='aliases');
print $cgi->p();
print $cgi->br();
print $cgi->submit($name='search',$value='submit');
print $cgi->reset();
$cgi->end_form();
$cgi->end_html();
I need to search my database for the given word when the submit button is clicked.
I was able to create the form but i dont know how to pass the word the user entered in order to check the database.Nothing happens when submit is pressed.Here is the db_search.cgi code i used..
#!/usr/local/bin/perl
use CGI::Carp qw(fatalsToBrowser);
use CGI;
use DBI;
my $cgi=new CGI;
print $cgi->header('text/html'),$cgi->start_html(-title=>'students');
print $cgi->center("GENOMES");
$cgi->start_form($method='get',$action='/home/ma/503.01/masc0100/public_html/db_search.cgi');
print $cgi->p("enter the protein accession number");
print $cgi->textfield($name='querry');
print $cgi->p();
print $cgi->br();
print $cgi->p("select name");
print $cgi->popup_menu($name='popup',$values=['a','b','c','d'],$default='a');
print $cgi->p();
print $cgi->br();
print $cgi->p("enter strand");
print $cgi->radio_group($name='radio',$label=['-1','1','0']);
print $cgi->p();
print $cgi->br();
print $cgi->p("select fields to be retrieved");
print $cgi->checkbox($name='accesion number',$value='acc no');
print $cgi->checkbox($name='proteins in the sequence',$value='pacc nos');
print $cgi->checkbox($name='sequence length',$value='seq length');
print $cgi->checkbox($name='sequence',$value='seq');
print $cgi->checkbox($name='function',$value='fnc');
print $cgi->checkbox($name='aliases',$value='aliases');
print $cgi->p();
print $cgi->br();
print $cgi->submit($name='search',$value='submit');
print $cgi->reset();
$cgi->end_form();
$cgi->end_html();