当前位置: 首页>>代码示例>>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;未经允许,请勿转载。