WAP Coder
07-18-2005, 06:50 AM
Hi. I'm creating a small web page for my mobile phone (Motorola A630) designed to turn on a small LED controlled by the parallel port. The code for normal HTML works great and easily controls the light. The working example can be found at the following address:
http://216.196.131.235/index.php
I'm not that good at working with XHTML, so I'd like some help on getting the code to with my mobile phone. When the page is accessed with the phone, it displays the following...
______________________
| Light Control .|
| .|
| " method="POST"> .|
| [On button] [Off button] .|
| .|
|_____________________.|
It appears as if the "POST" method is displaying as normal text, and when you try to use the buttons, they are not functional.
Here is the code being used in the perfectly working http://216.196.131.235/index.php page.....
<?php
{
if (isset($_POST['On']))
system("lptout 255");
system("lptout 255");
}
if (isset($_POST['right']))
{
system("lptout 128");
system("lptout 128");
}
if (isset($_POST['down']))
{
system("lptout 64");
system("lptout 64");
}
if (isset($_POST['Off']))
{
system("lptout 0");
system("lptout 0");
}
?>
<HTML>
<HEAD><TITLE>Light controls</TITLE></HEAD>
<BODY>
<h2>Light Control</h2><br>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST">
<INPUT type='submit' name='On' value="On">
<INPUT type='submit' name='Off' value='Off'>
Here is the code being used for the non-functioning XHTML version...
<?php
{
if (isset($_POST['On']))
system("lptout 255");
system("lptout 255");
}
if (isset($_POST['right']))
{
system("lptout 128");
system("lptout 128");
}
if (isset($_POST['down']))
{
system("lptout 64");
system("lptout 64");
}
if (isset($_POST['Off']))
{
system("lptout 0");
system("lptout 0");
}
?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<HEAD><TITLE>webcam controls</TITLE></HEAD>
<BODY>
<h2>Light Control</h2><br>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST">
<INPUT type='submit' name='On' value="On">
<INPUT type='submit' name='Off' value='Off'>
</html>
I don't see why it wouldn't be working. It is being hosted on my Apache server, just to let you know.
Any help would be greatly appreciate as I've been up all night trying to get this working and I'd really like to get it done by tomorrow.
Thanks!
http://216.196.131.235/index.php
I'm not that good at working with XHTML, so I'd like some help on getting the code to with my mobile phone. When the page is accessed with the phone, it displays the following...
______________________
| Light Control .|
| .|
| " method="POST"> .|
| [On button] [Off button] .|
| .|
|_____________________.|
It appears as if the "POST" method is displaying as normal text, and when you try to use the buttons, they are not functional.
Here is the code being used in the perfectly working http://216.196.131.235/index.php page.....
<?php
{
if (isset($_POST['On']))
system("lptout 255");
system("lptout 255");
}
if (isset($_POST['right']))
{
system("lptout 128");
system("lptout 128");
}
if (isset($_POST['down']))
{
system("lptout 64");
system("lptout 64");
}
if (isset($_POST['Off']))
{
system("lptout 0");
system("lptout 0");
}
?>
<HTML>
<HEAD><TITLE>Light controls</TITLE></HEAD>
<BODY>
<h2>Light Control</h2><br>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST">
<INPUT type='submit' name='On' value="On">
<INPUT type='submit' name='Off' value='Off'>
Here is the code being used for the non-functioning XHTML version...
<?php
{
if (isset($_POST['On']))
system("lptout 255");
system("lptout 255");
}
if (isset($_POST['right']))
{
system("lptout 128");
system("lptout 128");
}
if (isset($_POST['down']))
{
system("lptout 64");
system("lptout 64");
}
if (isset($_POST['Off']))
{
system("lptout 0");
system("lptout 0");
}
?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<HEAD><TITLE>webcam controls</TITLE></HEAD>
<BODY>
<h2>Light Control</h2><br>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST">
<INPUT type='submit' name='On' value="On">
<INPUT type='submit' name='Off' value='Off'>
</html>
I don't see why it wouldn't be working. It is being hosted on my Apache server, just to let you know.
Any help would be greatly appreciate as I've been up all night trying to get this working and I'd really like to get it done by tomorrow.
Thanks!