I am newbie for iPhone application. I have followed this tutorial for login from iPhone.
I have php file as below.
CODE
index.php
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<?php
$user = $_POST['uname'];
if ($user == 'user') {
echo "Welcome to my site...";
} else {
echo "Invalid User";
}
?>
</body>
</html>
When I run application and enter username as user and password as some text, I get output in iPhone as below
OUTPUT
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
Welcome to my site...
</body>
</html>
The output that I was expecting is only text Welcome to my site…, however I get full HTML code.
Any idea why I get like this? What changes do I have to need to do in PHP file?
as per the iphone application development tutorial they are using standard sdk for creating buttons and text boxes it is not html, if you want to create your login form using html in iphone use webView, as you are printing full html code it is showing your that only, put only following code in your index.php file