The page now loads but now i put that extra code in the Login option doesn't appear on my phone. Can you think of anyway for me to be able to login.
2 2004-06-23 14:13
Re: I need help with WAP code (18 replies, posted in Programming)
i did that extra code and the page loaded, but now i don't have a login option on my phone. Would it be easier to put in a 'next' button.
3 2004-06-23 12:10
Re: I need help with WAP code (18 replies, posted in Programming)
do i place that code you gave me before <?php command
4 2004-06-23 12:09
Re: I need help with WAP code (18 replies, posted in Programming)
I now get this error.
Parse error. parse error, unexpected T_DNUMBER expecting ',' or '.' in line 4
5 2004-06-23 09:21
Re: I need help with WAP code (18 replies, posted in Programming)
I think it's correct, what else could it be to work with mobile phones.
6 2004-06-22 08:35
Re: I need help with WAP code (18 replies, posted in Programming)
don't even bother using an emulator through the PC cause i'll tried and it works. But it doesn't work on real handsets
7 2004-06-22 08:34
Re: I need help with WAP code (18 replies, posted in Programming)
Depending on the mobile phone on some i get a mime error on most i get a wrong data error. On my Sharp GX-20 the page will load but when i submit the form it just refreshes the page.
8 2004-06-21 12:26
Topic: I need help with WAP code (18 replies, posted in Programming)
I have a wap site which obtains data from a mysql database. It doesn' work properly and i don't know why, here is the code:
<?php
// output correct HTTP content type
header( 'Content-type: text/vnd.wap.wml' );
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
// load vbulletin stuff
require_once( '../vbulletin/includes/config.php3' );
// validate user
mysql_connect( $servername, $dbusername, $dbpassword );
mysql_select_db( $dbname );
$sql = <<<eos
select user_id from wap_users where username='$_POST[username]' and password='$_POST[password]' LIMIT 1
eos;
$result = mysql_query( $sql );
if ( mysql_num_rows( $result ) ) {
$row = mysql_fetch_row( $result );
$sql = <<<eos
UPDATE wap_users SET login_count=login_count+1,last_login=NOW()
eos;
mysql_query( $sql );
session_name( 'wap' );
session_start();
$_SESSION['wap'] = true;
header( "Location: http://$_SERVER[HTTP_HOST]" . dirname( $_SERVER['PHP_SELF'] ) .
'/wap.php' );
exit;
}
}
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head>
<META name="generator" CONTENT="BBEdit 6.5" />
</head>
<card id="servers" title="machineguard login">
<do label="Login" TYPE="accept">
<go HREF="#card2" METHOD="post">
<postfield name="username" VALUE="$(username)" />
<postfield name="password" VALUE="$(password)" />
</go>
</do>
Username:<BR /><INPUT TYPE="text" name="username" /><BR />
Password:<BR /><INPUT TYPE="password" name="password" /><BR />
</card>
</wml>