php and html
Homework Please give us a sequence in fasta format:
"){ $locus = str_replace('>','',trim($lines[$i])); $description[]=$locus; $j++; }else { $linked_seq[$j]=$linked_seq[$j].trim($lines[$i]); } } //-coonnect to database---------------------------------------- @ $db=new mysqli('localhost', 'hw', '123456', 'HW'); if( mysqli_connect_errno()){ echo 'Error: Could not connect to database. Please try again later.'; exit; } //-----table----------------------------------------------------- $query = "DROP TABLE IF EXISTS query;"; $result=$db->query($query); $query = "create table query ( id int unsigned not null auto_increment primary key, `desc` text, seq text);"; $result=$db->query($query); //-----table----------------------------------------------------- $tables=array('query','dbseq'); for ($i=0;$iquery($query); } } //--------select and display------------------------------------------------- echo "
"; $query="select * from query"; $result=$db->query($query); echo "Sequences in table query
"; while ($row=$result->fetch_row()){ echo $row[0].' | '.$row[1].' | '.$row[2].''; } $db->close(); ?>
1.修改完html之后,先刷新再调用。
2.