用戶輸入值(VARCHAR)通過贊助商ID頁面(簡單形式),那麼如果ID匹配,然後移動到註冊頁面,註冊。
驗證頁:
<form action="verify_check.php" method="post" class="basic-grey">
<label>
<span>Sponser ID :</span>
<input type="text" name="token" value="" />
</label>
<label>
<span> </span>
<input type="submit" class="button" value="SignUp" name="submit"/>
</label>
</form>
Verify_check頁:
<?php
if (isset($_POST['submit']))
{
$token=$_POST['token'];
$conn=mysqli_connect("localhost","root","", "gold_99") ;
if(!$conn)
{
die("connection failed: ".mysqli_connect_error());
}
$sql = "SELECT * FROM personal_deatils WHERE userid = '$token'";
$row = mysql_fetch_array($sql)
if (mysqli_query($conn, $sql))
{
if($row =="$token"){
echo "Data Select Succefully";
}
else
echo "Wrong Connection";
}
else {
echo "Error: " . $sql . "<br>" . mysqli_error($conn);
}
}
mysqli_close($conn);
?>
數據庫體系結構:
標題(VARCHAR),姓名(VARCHAR),用戶ID(VARCHAR,主),mobileno( varchar),email(varchar),country(varchar)
您是否至少知道如何從PHP連接到DB並執行查詢? – David162795 2014-11-06 09:40:28
什麼樣的數據庫? – sergio0983 2014-11-06 09:40:59
@ Smriti-Techno-Logics什麼? 'header(「Location:/ mlm project/signup.php。」);'沒有先生,你沒有。我很抱歉,但你最好先學習一些基礎知識。 – David162795 2014-11-06 09:55:31