JohnLucania
Programmer
I have a form:
<form name="SearchSeq" method="post" action="SearchSeqResult.cgi">
<p><b>GENE NAME:</b>
<select name="GENE_NAME">
<option>BRC2_HUMAN</option>
bla.....
</select>
</p>
<p><b>ORGANISM NAME:</b>
<select name="ORGANISM_NAME">
<option>ARCHAEA</option>
bla.....
</select>
</p>
<p><b>EXPRESSION LEVEL:</b>
<select name="EXPRESSION_LEVEL">
<option>1</option>
bla.....
</select>
</p>
<p><b>TISSUE NAME:</b>
<select name="TISSUE_NAME">
<option>Class A</option>
bla.....
</select>
</p>
<input type="submit" name="Submit" value="Submit">
</form>
How do you pass the values from the dropdowns to the result.cgi?
#! /usr/bin/perl
use warnings;
use strict;
use CGI ( ':standard' );
my $title = 'Sequence Search';
my $seq = param( 'Seq' );
print header,
start_html( $title ),
h1( $title ),<<"PrintTag",end_html;
use DBI;
my $dbh = DBI->connect( "DBI:mysql:host=localhost;database=seqdb","seqdb" , "************",
{ PrintError => 0 , RaiseError => 1 } );
my $st = "SELECT GENE.GENE_NAME, ORGANISM.ORGANISM_NAME, MRNA.MRNA_EXPRESSION_LEVEL";
$st .= " FROM GENE, ORGANISM, MRNA";
$st .= " WHERE GENE.GENE_ID = MRNA.MRNA_GENE_NAME AND ORGANISM_ID = MRNA.MRNA_ORGANISM AND
GENE.GENE_NAME =???? AND ORGANISM.ORGANISM_NAME = ????
AND MRNA.MRNA_EXPRESSION_LEVEL =???? ";
my $sth = $dbh->prepare( $st );
$sth->execute();
while( my @row = $sth->fetchrow_array() ) {
print "Gene: '$row[0]', Organism: '$row[1]', Expression Level: '$row[2]'\n";
}
PrintTag
<form name="SearchSeq" method="post" action="SearchSeqResult.cgi">
<p><b>GENE NAME:</b>
<select name="GENE_NAME">
<option>BRC2_HUMAN</option>
bla.....
</select>
</p>
<p><b>ORGANISM NAME:</b>
<select name="ORGANISM_NAME">
<option>ARCHAEA</option>
bla.....
</select>
</p>
<p><b>EXPRESSION LEVEL:</b>
<select name="EXPRESSION_LEVEL">
<option>1</option>
bla.....
</select>
</p>
<p><b>TISSUE NAME:</b>
<select name="TISSUE_NAME">
<option>Class A</option>
bla.....
</select>
</p>
<input type="submit" name="Submit" value="Submit">
</form>
How do you pass the values from the dropdowns to the result.cgi?
#! /usr/bin/perl
use warnings;
use strict;
use CGI ( ':standard' );
my $title = 'Sequence Search';
my $seq = param( 'Seq' );
print header,
start_html( $title ),
h1( $title ),<<"PrintTag",end_html;
use DBI;
my $dbh = DBI->connect( "DBI:mysql:host=localhost;database=seqdb","seqdb" , "************",
{ PrintError => 0 , RaiseError => 1 } );
my $st = "SELECT GENE.GENE_NAME, ORGANISM.ORGANISM_NAME, MRNA.MRNA_EXPRESSION_LEVEL";
$st .= " FROM GENE, ORGANISM, MRNA";
$st .= " WHERE GENE.GENE_ID = MRNA.MRNA_GENE_NAME AND ORGANISM_ID = MRNA.MRNA_ORGANISM AND
GENE.GENE_NAME =???? AND ORGANISM.ORGANISM_NAME = ????
AND MRNA.MRNA_EXPRESSION_LEVEL =???? ";
my $sth = $dbh->prepare( $st );
$sth->execute();
while( my @row = $sth->fetchrow_array() ) {
print "Gene: '$row[0]', Organism: '$row[1]', Expression Level: '$row[2]'\n";
}
PrintTag