 |
|
พอดีผมก็เปิดหนังสือทำตามมันไปเรื่อยๆมันขึ้นเป็นแบบนี้อะคับพอ test
จากตัว regis.php กรอกข้อมูลครบแล้วกด register เพื่อส่งข้อมูลไปตรวจสอบที่ regis_db.php จึงนำเก้บลงฐานข้อมูล (น่าจะใช่) มันขึ้นแบบนี้คับ
Parse error: syntax error, unexpected ',' in C:\AppServ\www\testphp\regis_db.php on line 3
อยากให้ตรวจสอบให้หน่อยอะคับ ใครเก่งช่วยผมทีอยากทำเป้นคับ
อันนี้ regis_db.php
<?php
print "Member<br>";
print "ID Login :",$userid ,"<br>";
print "Passwd :",$userpw ,"<br>";
print "Re Passwd :",$userpw2 ,"<br>";
print "Sex :",$usex , "<br>";
print "Email :".$email;
$host ="127.0.0.1";
$user ="";
$passwd ="";
$dbname = "register";
mysql_connect($host,$user,$passwd) or die("ThisConnectHost");
mysql_select_db($dbname) or die("Thismysqlconnect");
$sql ="INSERT INTO userinfo
(userid,userpw,userpw2,usex,email)
VALUES
('$userid','$userpw','$userpw2','$usex','$email')";
$sqlqurey=mysql_db_query($dbname,$sql);
print"<br>Register Ok";
mysql_close();
?>
---------------------------------------------------------------------------------------------------------------------
อันนี้ regis.php
<form action="regis_db.php" method="post" name="regisform" onsubmit="return formCheck();">
<table width="304" align="center" border="0" cellpadding="0" cellspacing="0" height="261">
<tbody><tr>
<td bgcolor="#3399ff"><table width="300" align="center" border="0" cellpadding="0" cellspacing="0">
<tbody><tr bgcolor="#3399ff">
<td colspan="2" height="22"><div align="center"><font size="2" color="#ffffff" face="MS Sans Serif, Tahoma, sans-serif"><strong>Step
1: </strong></font></div></td>
</tr>
<tr>
<td width="141" bgcolor="#ffffff" height="24"><div align="right"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">ID
: </font></div></td>
<td width="159" bgcolor="#ffffff" height="24"><font size="2" face="MS Sans Serif, Tahoma, sans-serif"> </font><font size="2" color="#000000" face="MS Sans Serif, Tahoma, sans-serif">
<input name="userid" id="userid" size="15" maxlength="14" type="text">
</font></td>
</tr>
<tr>
<td bgcolor="#ffffff" height="22"><div align="right"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">Passwd
: </font></div></td>
<td bgcolor="#ffffff" height="22"><font size="2" face="MS Sans Serif, Tahoma, sans-serif"> </font><font size="2" color="#000000" face="MS Sans Serif, Tahoma, sans-serif">
<input name="userpw" id="userpw" size="15" maxlength="14" type="password">
</font></td>
</tr>
<tr>
<td bgcolor="#ffffff" height="22"><div align="right"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">Re passwd
: </font></div></td>
<td bgcolor="#ffffff" height="22"><font size="2" face="MS Sans Serif, Tahoma, sans-serif"> </font><font size="2" color="#000000" face="MS Sans Serif, Tahoma, sans-serif">
<input name="userpw2" id="userpw2" size="15" maxlength="14" type="password">
</font></td>
</tr>
<tr>
<td bgcolor="#ffffff" height="22"><div align="right"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">Sex
: </font></div></td>
<td bgcolor="#ffffff" height="22"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<select name="usex">
<option value="M" selected>Male</option>
<option value="F">Female</option>
</select>
</font></td>
</tr>
<tr>
<td bgcolor="#ffffff" height="22"><div align="right"><font size="2" color="#000000" face="MS Sans Serif, Tahoma, sans-serif">E-Mail
:</font></div></td>
<td bgcolor="#ffffff" height="22"><font size="2" color="#000000" face="MS Sans Serif, Tahoma, sans-serif">
<input name="email" id="email" size="15" maxlength="60" type="text">
</font></td>
</tr>
<tr bgcolor="#3399ff">
<td colspan="2" height="22"><div align="center"><font size="2" color="#ffffff" face="MS Sans Serif, Tahoma, sans-serif"><strong>Step
2 : <font color="#ffff00"> Enter !! Register </font></strong></font></div></td>
</tr>
<tr>
<td colspan="2" bgcolor="#ffffff" height="30"><div align="center"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<input name="submit" value="Register" type="submit">
<input type="reset" name="Reset" value="Reset">
</font></div></td>
</tr>
</tbody></table></td>
</tr>
</tbody></table>
</form>
Tag : - - - -
|
|
 |
 |
 |
 |
Date :
17 ต.ค. 2551 16:21:34 |
By :
yuklai |
View :
1201 |
Reply :
3 |
|
 |
 |
 |
 |
|
|
|
 |