SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 82 | Next

Nirav Mehta

"Mobile Web Development"

This is normal for a web application,
but will be very difficult for a mobile user. Radio buttons, checkboxes, and text boxes
are preferred controls for mobile forms. Links that pass parameters via GET are even
easier. Make sure you pick the right controls for your forms!
Form Processing Does not Change!
If you are overwhelmed by this, here's something that can bring you peace! Once
the form is submitted to the server, you can process it the same way as you do it on
standard web applications. Let's see the code that actually does the authentication in
login.inc.php to prove this!
if (isset($_POST["username"]) && isset($_POST["password"]) )
{
$userObj = new User();
if($userObj->Login($_POST["username"], $_POST["password"]))
{
if ($_POST["remember"] == "1")
{
setcookie("potrUsername", $_POST["username"
], time()+(30*24*3600));
Chapter 3
[ 59 ]
setcookie("potrPassword", $_POST["password"
], time()+(30*24*3600));
}
$_SESSION["userId"] = $userObj->id;
if (isset($_REQUEST["return"]))
{
header("Location: ".$_REQUEST["return"]);
}
else
{
include("profile.inc.php");
return;
}
}
else
{
echo '

Sorry, login failed.


Pages:
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94

Free English grammar and study guid Russian bride druga wojna światowa counter strike 1.6 hotel jelenia góra