 |
|
หน้า php ครับ
Code (PHP)
<?
ob_start();
?>
<?
include_once 'config.php';
$email=$_POST['email'];
$name=$_POST['name'];
$text=$_POST['text'];
$city=$_POST['city'];
$age=$_POST['age'];
$sex=$_POST['sex'];
$webcame=$_POST['webcam'];
if(trim($_POST["email"]) == "")
{
echo "กรุณากรอกข้อมูลให้ครบ.!!";
exit();
}
if(trim($_POST["name"]) == "")
{
echo "กรุณากรอกข้อมูลให้ครบ.!!";
exit();
}
if(trim($_POST["text"]) == "")
{
echo "กรุณากรอกข้อมูลให้ครบ.!!";
exit();
}
if(isset($_POST['webcam'] ) && $_POST['webcam'] != "" && $_POST['webcam'] ="haveit")
{
}
$sql="INSERT INTO member (email,name,text,city,age,sex,webcam) VALUES ('$email','$name','$text','$city','$age','$sex','$webcam')";
if(mysql_query($sql)){
header("location:index.php");
} else {
echo mysql_error();
}
?>
หน้า html ครับ
<input name="webcam" id="webcam" type="checkbox" value="haveit" /> มีกล้อง
|
 |
 |
 |
 |
Date :
2012-10-01 18:22:18 |
By :
kuzaa516 |
|
 |
 |
 |
 |
|
|
 |