时间:2021-07-01 10:21:17 帮助过:18人阅读
Sales Rep Maintenance
// Address error handling
ini_set('display_errors',1);
error_reporting(E_ALL & ~E_NOTICE);
// Attempt to Connect
if ($connection = @mysql_connect ('localhost', '***', '***')){
print 'Successfully connected to MySQL.
';
//mysql_close(); // close the connection
}
else {
die('Could not connect to MySQL because: ' .mysql_error() .
');
'
}
if (@mysql_select_db("PREMIERE", $connection)){
print 'The PREMIERE database has been selected.
';
}
else {
die('Cound not select the PREMIERE database because: ' .mysql_error().'
');
}
if(!$_REQUEST['submit'])
{
generate_form();
}
else if($_REQUEST['submit'] == "Search")
{
search_rep();
}
else if($_REQUEST['submit'] == "Add")
{
add_rep();
}
else if($_REQUEST['submit'] == "Delete")
{
delete_rep();
}
else if($_REQUEST['submit'] == "Update")
{
update_rep();
}
function generate_form()