我是 PHP/CSS 的新手。我编写了一个 default.css 按钮样式和一个带有许多处理按钮的 php 页面。按钮样式在带有 url 链接的按钮上看起来很棒。请参阅下面的代码片段:
<form name="form" method="post">
<p class="button-style"><a href="importcsv.php">Import Sightings CSV</a></p>
<p class="button-style"><a href="logbookentry.html">Enter New Sightings</a></p>
<br>
<p class="button-style"><a href="logbookentry.php">View Pre-logged Sightings</a></p>
<br>
但是,当我对运行 sql 查询按钮使用相同的按钮样式时,样式并不统一。见链接http://conchslist.com/ziktest/logprocess.php
<p class="button-style"><input type="submit" name="button5" value="Run Makes 1" /></p>
<p class="button-style"><input type="submit" name="button6" value="Run Makes 2" /></p>
<br>
$q = mysql_query("UPDATE AVDMASTER p, SightingsEntrytmp pp
SET pp.MAKE = '1' WHERE pp.UNIQUEID = p.UNIQUEID AND p.MAKE = '0';")or die(mysql_error());
if($q) {
echo "successful";
}else {
echo "error";
}
} //if isset
if(isset($_POST['button6'])) {
$q = mysql_query("UPDATE SightingsEntrytmp p, AVDMASTER pp
SET pp.MAKE = '1' WHERE pp.UNIQUEID = p.UNIQUEID AND p.MAKE = '1';")or die(mysql_error());
if($q) {
echo "successful";
}else {
echo "error";
}
} //if isset'
这可能真的很简单。但是,如何调整代码以使按钮统一?
谢谢,
斯蒂芬