PHP²åÈëÊý¾Ý¿â´úÂ룬±à¼£¬É¾³ý
²åÈë´úÂë
<?
$action=$_GET['action'];
switch($action){
//Ìí¼Ó¼Ç¼
case"add";
$mail = trim(htmlspecialchars($_POST["mail"]));
$username = trim(htmlspecialchars($_POST["username"]));
$tel = trim(htmlspecialchars($_POST["tel"]));
$fax = trim(htmlspecialchars($_POST["fax"]));
$company = trim(htmlspecialchars($_POST["company"]));
$address = trim(htmlspecialchars($_POST["address"]));
$sql="insert into crm_company (mail,username,tel,fax,company,address,addtime) values ('$mail','$username','$tel','$fax','$company','$address','$addtime')";
//echo $sql;
mysql_query($sql,$conn);
print "<mce:script type="text/javascript"><!--
location.href='c_companylist.php';
// --></mce:script>";//*/
}?>
±à¼´úÂë
<?
$action=$_GET['action'];
switch($action){
//Ìí¼Ó¼Ç¼
case"edit";
$uid = trim(htmlspecialchars($_POST["uid"]));
$regtime = trim(htmlspecialchars($_POST["regtime"]));
$deadline = trim(htmlspecialchars($_POST["deadline"]));
$item = trim(htmlspecialchars($_POST["item2"]));
$price = trim(htmlspecialchars($_POST["price"]));
$product = trim(htmlspecialchars($_POST["product"]));
$content = trim(htmlspecialchars($_POST["content"]));
$sql="update crm_info set uid='$uid',regtime='$regtime',deadline='$deadline',item='$item',price='$price',product='$product',content='$content' where id='$id'";
//echo $sql;
mysql_query($sql,$conn);
print "<mce:script type="text/javascript"><!--
location.href='c_infolist.php';
// --></mce:script>";//*/
}?>
<form id="form1" name="form1" method="post" action="?action=edit&id=<?php echo $rs['id'];?>" onSubmit="return checkadd()">
</form>
ɾ³ý´úÂë
<a href="?action=del&id=<? echo $rs['id'];?>" onclick="return confirm('È·¶¨É¾³ý?')">ɾ³ý</a>
<?
$action=$_GET['action'];
switch($action){
//ɾ³ý¼Ç¼
case"del";
$id=$_GET['id'];
$sql="delete from crm_info where id='$id'";
mysql_query($sql,$co
Ïà¹ØÎĵµ£º
¾²âÊÔ Ã»ÓÐÎÊÌâ
<?
class smtp
{
/* Public Variables */
var $smtp_port;
var $time_out;
var $host_name;
var $log_file;
var $relay_host;
var $debug;
var $auth;
var $user;
var $pass;
/* Private Variables */
var $sock;
/* Constractor */
function smtp($relay_host = " ......
1¡¢mysql_connect()-½¨Á¢Êý¾Ý¿âÁ¬½Ó
¸ñʽ£º
resource mysql_connect([string hostname [:port] [:/path/to/socket] [, string username] [, string password]])
Àý£º
$conn = @mysql_connect(”localhost”, “username”, “password”) or dir(”²»ÄÜÁ¬½Óµ½Mysql Server” ......
˼·:SQLÀᄀ¿ÉÄܵIJÉÓÃÁ½¸öÒýºÅ±ÕºÏ±äÁ¿;¶Ô±äÁ¿ÖеÄÒýºÅתÒå;¶Ô²»ÄܲÉÓÃ2¸öÒýºÅ±ÕºÏµÄ±äÁ¿,ÏÈÔ¤ÏÈÅжϱäÁ¿ÀàÐÍ;
·½°¸:
1 ËùÓзÇÊýÖµÔËËã(Èç×Ö·û,¼òµ¥ÊýÖµÐ͵ȵÈ)µÄSQL±äÁ¿¶¼¼ÓÒýºÅ;
2 ËùÓзÇÊýÖµÔËËãµÄSQL±äÁ¿µÄÖµ¶¼²ÉÓÃmagic_quotes_gpc» ......
Ä¿Ç°£¬×î³£ÓõÄÈýÖÖ¶¯Ì¬ÍøÒ³ÓïÑÔÓÐASP(Active Server Pages),JSP(Java Server Pages),
PHP (Hypertext Preprocessor)¡£
¼ò ½é
¡¡¡¡ASPÈ«ÃûActive Server & ......
֮ǰPHPʵÏÖ¶àÓïÑÔ¹ú¼Ê»¯£¬´ó²¿·Ö¶¼»á²ÉÓðÑÓïÑÔÖ±½ÓÌá³öÀ´×÷ΪÊý×éÀ´µ÷Óã¬ÀýÈç±È½ÏÓÐÃûphpMyadmin£¬discuzµÈÖªÃû¿ªÔ´ÏµÍ³£¬²»¹ý£¬ÕâÀï½éÉÜÈçºÎͨ¹ýgettext£¬¼´ÓÃ×ÊÔ´ÎļþÀ´ÊµÏÖ¡£µäÐ͵ÄCMS°¸Àý-wordpressÒ²ÊÇͨ¹ýËüʵÏÖµÄÓïÑÔ¹ú¼Ê»¯£¬ÏÂÃæÀ´ËµÏÂphpÖÐÈçºÎÀ´ÀûÓÃÅäÖÃÎļþʵÏÖ¹ú¼Ê»¯µÄ¡£
Ê×ÏȽéÉÜÏÂ.MOÎļþ£¬ÔÚPHPÖÐÊÇÀûÓà ......