Hi,
I'm creating at the moment a wap application in php for our mobile module at the university. The application exist of a normal website and a mobile wap site.
Both sites need a logon. Because I want to reuse my code as much as possible, I created one .php script that checks if the user is registered or not. Depending on the result, the user will be redirected to the home page or an error page.
This works fine for the website, but the wap gives errors while redirecting.
this is what I get on my Nokia 40 SDK 3rd Edition emulator.
"Data you are sending will be redirected to another server. Continue?" -> OK
"No server access"
This is the code in my php script
try{
login($user,$passwd);
if($pagetype=="HTML")
header("Location: ../home.php");
else {
header("Location: ../wap/home.wml");
header("Content-type: text/vnd.wap.wml");
exit;
}
catch (Exeption $e){
// redirection to error page
}
The header("Content-type: text/vnd.wap.wml"); is something that I found on another website that explains why the Location is not working on Wap, but this is still not working for me.
I did found on this forum a solution which works and allows me to continue my project.
else {
require('../wap/home.wml');
exit;
}
But I'm not very sure if this is a good way of doing so.
Is there anyone who can tell my why my Location is not working and how it should work?
Thanks