|
|
|
ช่วยหน่อยคราบ การสมัครสมาชิก - คือผมอยากทำเว็บระบบสมัครสมาชิก (พร้อมชำระเงินนะครับ) |
|
|
|
|
|
|
|
ลองทำหน้าเพิ่มข้อมูลลงในฐานข้อมูลก่อนน่ะครับ ถ้าติดตรงไหนแล้วค่อยถามเป็นส่วน ๆ ไปน่ะครับ
PHP MySQL Add/Insert Record
|
|
|
|
|
Date :
2009-01-26 07:21:05 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td align="center" valign="top"> <font size="2" face="Tahoma">
<? include('connectdb.php'); ?>
<?
if($name!=""&&$subject!=""&&$note!=""){
$subject=addslashes($subject);
$lastneme=addslashes($lastneme);
$screenname=addslashes($screenname);
$email=addslashes($email);
$name=addslashes($name);
$month=addslashes($month);
$year=addslashes($year);
$address=addslashes($address);
$zipcode=addslashes($zipcode);
$cellphone=addslashes($cellphone);
$workphone=addslashes($workphone);
$referred=addslashes($referred);
$invite=addslashes($invite);
mysql_query("insert into members (board_type, name, email, subject, note, datetime, lastneme, screenname, month, day, year, address, zipcode, phone, cellphone, workphone, referred, invite) values('$board_type','$name','$email','$subject', '$note','$datetime','$lastneme','$screenname','$month', '$day','$year','$address','$zipcode','$phone','$cellphone', '$workphone','$referred','$invite',NOW())");
$lastid=mysql_insert_id();
if(!empty($file_size)){
$que_pic="que-".date("ymdhis");
$surname=substr($file_name,-3);
$file_name="$que_pic.$surname";
$path="member/$file_name";
copy($file,$path);
mysql_query("update members set pic='$file_name' where id='$lastid'");
}
echo '<b>Save Data OK </b><br><br>Pleass Check E-Mail <meta http-equiv="refresh" content="1;URL=../index.php">';
}
else{
?>
</font> <form action="<? echo $PHP_SELF; ?>" method="post" enctype="multipart/form-data" name="form" id="form">
<table>
<tr>
<td align="right" valign="top"><font size="2" face="Tahoma">First
name : </font></td>
<td><p><font size="2" face="Tahoma">
<input name="subject" type="text" id="name4">
<br>
</font><font size="2" face="Tahoma">1.
subject<br>
2. lastneme <br>
3. screenname <br>
4. email <br>
5. name <br>
6. confirm <br>
7. month <br>
8. day <br>
9. year <strong><font color="#FF0000" size="2" face="Tahoma"><br>
10. address <br>
11. zipcode <br>
12. phone <br>
13. cellphone <br>
14. workphone <br>
15. referred <br>
16. invite</font></strong></font></p></td>
</tr>
<tr>
<td width="120" align="right" valign="top"><font size="2" face="Tahoma">Last
name :</font></td>
<td width="517"><font size="2" face="Tahoma">
<input name="lastneme" type="text" id="lastneme" maxlength="80">
lastneme </font></td>
</tr>
<tr>
<td align="right" valign="top"><font size="2" face="Tahoma">Screen
Name :</font></td>
<td><input name="screenname" type="text" id="screenname" maxlength="20">
screenname</td>
</tr>
<tr>
<td align="right" valign="top"><font size="2" face="Tahoma">E-mail
: </font></td>
<td><font size="2" face="Tahoma">
<input name="email" type="text" id="email">
email </font></td>
</tr>
<tr>
<td align="right" valign="top"><font size="2" face="Tahoma">Password
:</font></td>
<td><font size="2" face="Tahoma">
<input name="name" type="text" id="name">
name </font></td>
</tr>
<tr>
<td align="right" valign="top"><font size="2" face="Tahoma">Confirm
Password :</font></td>
<td> <input name="confirm" type="text" id="confirm" maxlength="15">
confirm</td>
</tr>
<tr>
<td align="right" valign="top">
<font size="2" face="Tahoma">
<label for=birthdate>Birth date
:</label>
</font></td>
<td> </td>
</tr>
<tr>
<td align="right" valign="top"><font color="#000066" size="2" face="Tahoma">Address
:</font></td>
<td><strong><font color="#FF0000" size="2" face="Tahoma">
<textarea name="address" cols="35" rows="5" class="text" id="textarea6"></textarea>
address </font></strong></td>
</tr>
<tr>
<td align="right" valign="top"><font color="#000099" size="2" face="Tahoma">Zip
code :</font></td>
<td><strong><font color="#FF0000" size="2" face="Tahoma">
<input name="zipcode" class="text" id="zipcode" size="15" maxlength="5">
zipcode </font></strong></td>
</tr>
<tr>
<td align="right" valign="top"><font color="#000099" size="2" face="Tahoma">Home
Phone :</font></td>
<td><strong><font color="#FF0000" size="2" face="Tahoma">
<input name="phone" class="text" id="phone" size="25" maxlength="25">
phone </font></strong></td>
</tr>
<tr>
<td align="right" valign="top"><font color="#000099" size="2" face="Tahoma">Cell
Phone :</font></td>
<td><strong><font color="#FF0000" size="2" face="Tahoma">
<input name="cellphone" class="text" id="cellphone" size="25" maxlength="25">
cellphone </font></strong></td>
</tr>
<tr>
<td align="right" valign="top"><font color="#000099" size="2" face="Tahoma">Work
Phone :</font></td>
<td><strong><font color="#FF0000" size="2" face="Tahoma">
<input name="workphone" class="text" id="workphone" size="25" maxlength="25">
workphone </font></strong></td>
</tr>
<tr>
<td align="right" valign="top"><font size="2" face="Tahoma">Referred
By : </font></td>
<td><input name="referred" type="text" id="referred">
<font size="2" face="Tahoma">(your
friend's e-mail)</font> referred</td>
</tr>
<tr>
<td align="right" valign="top"><font size="2" face="Tahoma">Invite
Friends : </font> </td>
<td><input name="invite" type="text" id="invite3">
<font size="2" face="Tahoma">(your
friend's e-mail)</font> invite</td>
</tr>
<tr>
<td align="right" valign="top"><font size="2" face="Tahoma">About
Me : </font></td>
<td><font size="2" face="Tahoma">
<input name="note" type="text" id="note" size="60" maxlength="200">
<font color="#666666"> max 200
text note</font></font></td>
</tr>
<tr>
<td align="right" valign="top"> </td>
<td><input name="checkbox" type="checkbox" id="checkbox" value="3 month">
<font size="2" face="Tahoma">3
Month $ 29.85
<input type="checkbox" name="checkbox2" value="6 month">
6 Month $ 47.70
<input type="checkbox" name="checkbox3" value="1 year">
1 Year $ 69.00</font></td>
</tr>
<tr>
<td align="right" valign="top"> </td>
<td> </td>
</tr>
<tr>
<td align="right" valign="top"> </td>
<td><font size="2" face="Tahoma">
<input type="checkbox" name="checkbox" value="checkbox">
Send me email updates about
messages I've received on the
site, my friends' activities<br>
<label class=inline for=label4>and
the latest news from Dontworrymom</label>
</font></td>
</tr>
<tr>
<td align="right" valign="top"><font size="2" face="Tahoma">Picture
: </font></td>
<td><font size="2" face="Tahoma">
<input type="file" name="file">
.jpg, .gif or.png only</font></td>
</tr>
</table>
<font size="2" face="Tahoma"><br>
<input type="submit" name="Submit" value="Submit">
<input name="board_type" type="hidden" id="board_type2" value="<? echo $board_type; ?>">
</font>
</form>
<font size="2" face="Tahoma">
<? } ?>
</font></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="250" valign="top"> </td>
</tr>
</table>
|
|
|
|
|
Date :
2009-01-26 08:28:44 |
By :
เก่ง |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
แล้วไงต่ออะครับ
|
|
|
|
|
Date :
2010-03-09 22:46:30 |
By :
ธํญวุฒิ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|