當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DB_Functions::insertUser方法代碼示例

本文整理匯總了PHP中DB_Functions::insertUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP DB_Functions::insertUser方法的具體用法?PHP DB_Functions::insertUser怎麽用?PHP DB_Functions::insertUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DB_Functions的用法示例。


在下文中一共展示了DB_Functions::insertUser方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

<?php

include_once './db_functions.php';
//Create Object for DB_Functions clas
$db = new DB_Functions();
$emailID = $_POST["name"];
$regId = $_POST["regId"];
$res = $db->insertUser($emailID, $regId);
echo "Email Id " . $emailID . " RegId " . $regId;
if ($res) {
    echo "GCM Reg Id bas been shared successfully with Server";
} else {
    echo "Error occured while sharing GCM Reg Id with Server web app";
}
開發者ID:Bhavya390,項目名稱:CampusCom,代碼行數:14,代碼來源:insertuser.php

示例2: mysql_insert_id

<?php

include_once './db_functions.php';
//Create Object for DB_Functions clas
$db = new DB_Functions();
$emailID = $_POST["emailId"];
$passwordID = $_POST["passwordId"];
$nameID = $_POST["nameId"];
$regId = $_POST["regId"];
$type = "android";
$res = $db->insertUser($emailID, $passwordID, $nameID, $regId, $type);
echo mysql_insert_id();
/*
$emailID = "name@email.com";
$passwordID = "password";
$nameID = "Name McName";
$regId = "aBcd345";
$res = $db->insertUser($emailID, $passwordID, $nameID, $regId);
*/
// echo "Email Id ".$emailID." RegId ".$regId ;
// if ($res) {
//     echo "GCM Reg Id bas been shared successfully with Server";
// } else {
//     echo "Error occured while sharing GCM Reg Id with Server web app";
// }
開發者ID:abcsofcode,項目名稱:Android,代碼行數:25,代碼來源:insertuser.php

示例3: header

							</div>

							

							<div class="form-group">
								<div class="col-md-6 col-md-offset-4">
									<button type="submit" class="btn btn-success">
										Register
									</button>
								</div>
							</div>
						</form>
						<?php 
if (isset($_POST["Name"])) {
    if (strtolower($_POST["Name"]) !== "admin") {
        $result = $db->insertUser($_POST);
        if (!$result) {
            echo '<span style="color:red">Email or Name Already Registered<span>';
        } else {
            header("location: users.php");
        }
    } else {
        echo '<span style="color:red">Name admin is not allowed<span>';
    }
}
?>
					</div>
				</div>
			</div>
		</div>
	</div>
開發者ID:ameerhamza26,項目名稱:audit,代碼行數:31,代碼來源:register.php


注:本文中的DB_Functions::insertUser方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。