欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

新手,轻拍. 大姐们帮小弟我看一上这段php代码有关问题出在哪

程序员文章站 2022-05-31 20:37:39
...
新手,轻拍. 各位大哥大姐们帮我看一下这段php代码问题出在哪
Html Code:






Rep Num:



Rep Num:
Last Name: First Name:
Street: City:
State: Zip:
Commission: Rate:



Rep Num:



Rep Num:
Last Name: First Name:
Street: City:
State: Zip:
Commission: Rate:







[/code]


PHP code:



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()
新手,轻拍. 大姐们帮小弟我看一上这段php代码有关问题出在哪

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频