예제 #1
0
<?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";
}
예제 #2
0
<?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 = "*****@*****.**";
$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";
// }
예제 #3
0
							</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>