>即時新聞-熱門

2008年3月28日星期五

php會員管理全部 - 加入會員

以下是會員管理全部 可以COPY 但是要自己轉半型
加入會員.HTML

<form id="form1" name="form1" method="post" action="檢查重複程式.PHP">
  <table width="400" height="400" border="0" align="center" cellpadding="0" cellspacing="0" background="image/dbtadd01.jpg" >
  <tr ><td height="20"></td></tr>
  <tr><td>
  <table width="317" align="center">
    <tr>
      <td width="110">
        會員名稱</td>
            <td width="229"><input name="mem_name" id="mem_name" size="20" /></td>
          </tr>
    <tr>
      <td height="22">會員帳號</td>
            <td><label>
              <input name="mem_account" type="text" id="mem_account" size="20" />
              </label></td>
          </tr>
    <tr>
      <td height="20">會員密碼</td>
            <td><input name="mem_pass" type="password" id="mem_pass" size="20" /></td>
          </tr>
    <tr>
      <td height="19">確認密碼</td>
            <td><input name="check_pass" type="password" id="check_pass" onBlur="check()" size="20"/></td>
          </tr>
    <tr>
      <td height="40">電子郵件</td>
            <td colspan="3"><input id="mem_mail" size="30" name="mem_mail" /></td>
          </tr>
    <tr>
      <td> </td>
            <td colspan="3"><label>
              <a href="JavaScript:document.form1.submit()"><img src="image/dbtm03.jpg" width="106" height="34" border="0" /></a><a href="JavaScript:document.form1.reset()"><img src="image/dbtm04.jpg" width="104" height="34" border="0" /></a>
              <div align="center"></div>
              </label></td>
          </tr>
    </table>
        </td>
        </tr>
    </table>
    </form>

檢查重複程式.PHP
<?
$mem_account=$_REQUEST["mem_account"];   

$link=mysql_connect("localhost","帳號","密碼");
mysql_select_db("robin_data",$link);
 $str="select * from member WHERE mem_account= '$mem_account'";
 $list =mysql_query($str,$link);
 $num = mysql_fetch_row($list);
if ($num>0){
        header("location:mem_again.php"); 
  }
  else{

$stra="insert into member(mem_name,mem_account,mem_pass,mem_mail,mem_date) values ( '$mem_name', '$mem_account', '$mem_pass', '$mem_mail',now())";
mysql_query($stra);
 header("Location:mem_addok.php?shop_account=".$_REQUEST[mem_account]."&mem_account=".$_REQUEST[mem_account]);
   }
?>

0 评论:

 
妹咕數位學園歡迎網友們來信指教 妹咕信箱