hi! this has made me learn alot, am still new to php and sql!
but am trying to convert this script to work on wap (wml)
i have got it all working apart from the register page, i just cant it to work! when the wap register page is filled in and the submit button is pressed it just reloads the signup.php page, so what i need to know is where should the info form the from on the signup.php page be sent??
the html part is:
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> New User Registration </title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1
</head>
<body>
<h3>New User Registration Form</h3>
<p><font color="orangered" size="+1"><tt><b>*</b></tt></font>
indicates a required field</p>
<form method="post" action="<?=$_SERVER['PHP_SELF']?>">
<table border="0" cellpadding="0" cellspacing="5">
<tr>
<td align="right">
<p>User ID</p>
</td>
<td>
<input name="newid" type="text" maxlength="100" size="25" />
<font color="orangered" size="+1"><tt><b>*</b></tt></font>
</td>
</tr>
<tr>
<td align="right">
<p>Full Name</p>
</td>
<td>
<input name="newname" type="text" maxlength="100" size="25" />
<font color="orangered" size="+1"><tt><b>*</b></tt></font>
</td>
</tr>
<tr>
<td align="right">
<p>E-Mail Address</p>
</td>
<td>
<input name="newemail" type="text" maxlength="100" size="25" />
<font color="orangered" size="+1"><tt><b>*</b></tt></font>
</td>
</tr>
<td align="right">
<p>Password</p>
</td>
<td>
<input name="newpass" type="text" maxlength="100" size="25" />
<font color="orangered" size="+1"><tt><b>*</b></tt></font>
</td>
</tr>
<tr valign="top">
<td align="right">
<p>Other Notes</p>
</td>
<td>
<textarea wrap="soft" name="newnotes" rows="5" cols="30"></textarea>
</td>
</tr>
<tr>
<td align="right" colspan="2">
<hr noshade="noshade" />
<input type="reset" value="Reset Form" />
<input type="submit" name="submitok" value=" OK " />
</td>
</tr>
</table>
</form>
</body>
</html>
which works fine and sends the info back to signup.php
so my wap (wml) version would be some thing like this:
PHP Code:
<?php
header("Content-type: text/vnd.wap.wml");
include("headerwml.php");
echo "<wml>";
echo "<card id=\"WAPchat\" title=\"RelaxWap\">";
echo "<p align=\"center\">";
echo "<strong>wap3</strong><br/>";
echo "New User Registration <br/>";
echo "User ID:<br/>";
echo "<input name=\"newid\" type=\"text\" maxlength=\"7\"/><br/>";
echo "Full Name:<br/>";
echo "<input name=\"newname\" type=\"text\" maxlength=\"15\"/><br/>";
echo "E-Mail address:<br/>";
echo "<input name=\"newemail\" type=\"text\" maxlength=\"30\"/><br/>";
echo "password:<br/>";
echo "<input name=\"newpass\" type=\"password\" maxlength=\"15\"/><br/>";
echo "other notes::<br/>";
echo "<input name=\"newnotes\" type=\"text\" maxlength=\"30\"/><br/>";
echo "<do type=\"accept\">";
echo "<go href=\"{$_SERVER['PHP_SELF']}\" name=\"submitok\" sendreferer=\"true\" method=\"post\">";
echo "<postfield name=\"newid\" value=\"$(newid)\"/>";
echo "<postfield name=\"newname\" value=\"$(newname)\"/>";
echo "<postfield name=\"newemail\" value=\"$(newemail)\"/>";
echo "<postfield name=\"newpass\" value=\"$(newpass)\"/>";
echo "<postfield name=\"newnotes\" value=\"$newnotes\"/>";
echo "</go>";
echo "</do>";
echo "</p>";
echo "</card>";
echo "</wml>";
?>
which just doesnt do the job of registering the person!!! which is strange because the login script works:
PHP Code:
<?php
header("Content-type: text/vnd.wap.wml");
include("headerwml.php");
echo "<wml>";
echo "<card id=\"WAPchat\" title=\"RelaxWap\">";
echo "<p align=\"center\">";
echo "<strong>wap1</strong><br/>";
echo "Login Required<br/>";
echo "You must log in to access this site.<br/>";
echo "If you are not a registered user<br/>";
echo "<a title=\"Enter\" href=\"signup.php\">click here</a><br/>\n";
echo "User ID:<br/>";
echo "<input type=\"text\" name=\"uid\" size=\"8\"/>";
echo "<br/>";
echo "Password:<br/>";
echo "<input type=\"password\" name=\"pwd\" size=\"8\"/>";
echo "<br/>";
echo "<anchor title=\"Log in\">Log in";
echo "<go href=\"index.php\" method=\"post\">";
echo "<postfield name=\"uid\" value=\"$(uid)\"/>";
echo "<postfield name=\"pwd\" value=\"$(pwd)\"/>";
echo "</go>";
echo "</anchor>";
echo "</p>";
echo "</card>";
echo "</wml>";
?>
please can some one tell me why the register part doesnt work purely on a php side if thats the case...
thanx in advance (and sorry for the mass of code!)
-gavin
Bookmarks