Home >Backend Development >PHP Tutorial > 新手,轻拍. 大姐们帮小弟我看一上这段php代码有关问题出在哪
新手,轻拍. 各位大哥大姐们帮我看一下这段php代码问题出在哪
Html Code:
<br> <br> <br> <title>Sales Rep Maintenance</title><br> <br> <?php <br /> // Address error handling<br> <br> ini_set('display_errors',1);<br> error_reporting(E_ALL & ~E_NOTICE);<br> <br> // Attempt to Connect<br> <br> if ($connection = @mysql_connect ('localhost', '***', '***')){<br> print '<p>Successfully connected to MySQL.</p>';<br> //mysql_close(); // close the connection<br> }<br> else {<br> die('<p>Could not connect to MySQL because: <b>' .mysql_error() .<br> '</b></p>');<br> }<br> if (@mysql_select_db("PREMIERE", $connection)){<br> print '<p>The PREMIERE database has been selected.</p>';<br> }<br> else {<br> die('<p>Cound not select the PREMIERE database because: <b>' .mysql_error().'</b></p>');<br> }<br> <br> if(!$_REQUEST['submit'])<br> {<br> generate_form();<br> }<br> else if($_REQUEST['submit'] == "Search")<br> {<br> search_rep();<br> }<br> else if($_REQUEST['submit'] == "Add")<br> {<br> add_rep();<br> }<br> else if($_REQUEST['submit'] == "Delete")<br> {<br> delete_rep();<br> }<br> else if($_REQUEST['submit'] == "Update")<br> {<br> update_rep();<br> }<br> <br> function generate_form() <div class="clear"> </div>