Can Anyone Help me PLZ ????

Started on the old forum in June 2011 · view the original in the archive · old links redirect here

#lavalair

3 replies · 442 views · started 15 years ago · 1 min read

Guest #1

Hi dudez ! Here is da Registation page of my Lava Site! i 've tried many ways to make this page html, but i cant ! 🙁 .. coz, i m a n00b ..

Can anyone make this page html plz ??

Here is my page >>>

<?php
header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-store, no-cache, must-revalidate");
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
?>
<wml>
<card id="Mobile Forum" title="Register Form">
<p align="left">
<?php
include ("config.php");
include ("core.php");
connectdb();
$sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
$sitename = $sitename[0];
$brws = explode("/",$HTTP_USER_AGENT);
$ubr = $brws[0];
$ipr = getip();
$uip = explode(".",$ipr);

$isipbanned = mysql_fetch_assoc(mysql_query("SELECT * FROM ibwf_users ORDER BY regdate DESC LIMIT 0,1"));
$bantime = $isipbanned['regdate'] + 300;

$time = time();

if((!canreg())||(isipbanned($ipr,$ubr)))
{
echo "Registration is disabled at the moment, please check later";
}
elseif($bantime > $time)
{
echo "<p>";
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Registration limit for this IP is exceeded. Please try again after sometime.";
echo "</p>";
}
else
{
if (!empty($_REQUEST['act']) && $_REQUEST['act'] == $_REQUEST['code'] && $_REQUEST['uid'] !== '' ) {
$uid = $_REQUEST['uid'];
$pwd = $_REQUEST['pwd'];
$cpw = $_REQUEST['cpw'];
$email = $_REQUEST['email'];

if(trim($uid)=="")
{
    echo "Username Empty. Please Type Your Name.<br/><a href=\"register.php\">Back</a>";
}else if(trim($pwd)=="")
{
    echo "Please Type Your Password.<br/><a href=\"register.php\">Back</a>";
}else if(trim($cpw)=="")
{
    echo "Please Type Your Password Again.<br/><a href=\"register.php\">Back</a>";
}else if(spacesin($uid)||scharin($uid))
{
    echo "Username is not valid!<br/><a href=\"register.php\">Back</a>";
}else if(spacesin($pwd)||scharin($pwd))
{
    echo "Password is not valid!<br/><a href=\"register.php\">Back</a>";
}else if($pwd!=$cpw)
{
    echo "Passwords doesn't match.<br/><a href=\"register.php\">Back</a>";
}else if(strlen($uid)<4)
{
    echo "Username must be 4 characters or more.<br/><a href=\"register.php\">Back</a>";
}else if(strlen($pwd)<4)
{
    echo "Password must be 4 characters or more.<br/><a href=\"register.php\">Back</a>";
}else if(isdigitf($uid))
{
    echo "Username must start with a letter from a-z.<br/><a href=\"register.php\">Back</a>";
}else if(checknick($uid)==1)
{
    echo "Username is reserved for Admins of the site.<br/><a href=\"register.php\">Back</a>";

}else if(checknick($uid)==2)
{
    echo "Please choose an appropriate username.<br/><a href=\"register.php\">Back</a>";

}else if(trim($email)=="")
{
    echo "You must enter a valid email address.<br/><a href=\"register.php\">Back</a>";

}else if(register($uid,$pwd,$usx,$day,$month,$year,$ulc,$email,$info, $ubr)==1)
{
    echo "Username already in use, choose a different one.<br/><a href=\"register.php\">Back</a>";
}else if(register($uid,$pwd,$usx,$day,$month,$year,$ulc,$email,$info, $ubr)==2)
{
    echo "Unknown mysql error try registering later.<br/><a href=\"register.php\">Back</a>";
}else{
  echo "Registration completed successfully!<br/>";
  echo "<br/><b>Username: </b>$uid<br/>";
  echo "<b>Password: </b>$pwd<br/>";
  
  
  if(validation())
  {
  echo "Please give us up to an hour to validate you (normally it be done within 10 minutes) If you have not been after this period of time u can email the owner<br/>";
echo '<p align="center">';
echo '<a href="index.php">Home</a>';
echo '</p>';
  }else{
  echo "<a href=\"login.php?loguid=$uid&logpwd=$pwd\"><img src=\"../images/home.gif\" alt=\"*\"/>";
  echo "Login</a>";
  }
}
}
else{
?>
<small>
[»] 
Allowed characters in userid and password are a-z, 0-9, and -_ only<br/>
[»] 
No vulgar words are accepted in Username<br/>
[»] 
Username and Password must contain at least 4 characters<br/>
[»] 
Username must begin with a letter and cannot contain capitals<br/>
[»] 
Password will be case sensitive<br/>
[»] 
All The Fields Are Necessary!<br/><br/>
</small>
<?php
$code = substr(md5(time()),0,5);

echo 'Username:<br/> <input name="tfuid" format="*x" maxlength="15"/><br/>';

echo 'Password:<br/> <input type="password" name="tfpwd" format="*x" maxlength="30"/><br/>';

echo "Repeat Password:<br/> <input type=\"password\" name=\"tfcpw\" format=\"*x\" maxlength=\"30\"/><br/>";

echo "I am:<br/>";

echo "<select name=\"opsex\" value=\"M\">";

echo "<option value=\"M\">Male</option>";

echo "<option value=\"F\">Female</option>";

echo "</select><br/>";

echo "Country:<br/> <input name=\"tfloc\"  maxlength=\"100\"/><br/>";

echo "Email:<br/> <input name=\"email\" maxlength=\"50\"/><br/>";

echo "More Info:<br/> <input name=\"info\" maxlength=\"100\"/><br/>";
  
echo "<b><u>Verification:</u></b><br/>Type the following code in the box below:<br/>";
  
echo "<b>Code: </b> $code<br/>";

echo "<input name=\"code\" type=\"text\" /><br/>";
  
echo "<anchor>Register";

echo "<go href=\"register.php\" method=\"post\">";

echo "<postfield name=\"uid\" value=\"$(tfuid)\"/>";

echo "<postfield name=\"pwd\" value=\"$(tfpwd)\"/>";

echo "<postfield name=\"cpw\" value=\"$(tfcpw)\"/>";

echo "<postfield name=\"day\" value=\"$(day)\"/>";

echo "<postfield name=\"month\" value=\"$(month)\"/>";

echo "<postfield name=\"year\" value=\"$(year)\"/>";

echo "<postfield name=\"usx\" value=\"$(opsex)\"/>";

echo "<postfield name=\"ulc\" value=\"$(tfloc)\"/>";

echo "<postfield name=\"email\" value=\"$(email)\"/>";

echo "<postfield name=\"info\" value=\"$(info)\"/>";
  
echo "<postfield name=\"code\" value=\"$(code)\"/>";

echo "<postfield name=\"act\" value=\"$code\"/>";

echo "</go></anchor><br/><br/><br/>";
echo '</p><p align="center">';
echo '<a href="index.php">Home</a>';
}}
?>
</p>
</card>
</wml>

Thanks In Advance 🙂

kei_ki7 Senior · 431 posts #2
<?php
header("Content-type: text/html");
echo '<?xml version="1.0" encoding="UTF-8" ?>';
echo '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"';
echo '"http://www.wapforum.org/DTD/xhtml-mobile10.dtd">';
echo '<html xmlns="http://www.w3.org/1999/xhtml">';
?>
<title>Register Form</title>
<body>
<p align="left">
<?php
include ("config.php");
include ("core.php");
connectdb();
$sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
$sitename = $sitename[0];
$brws = explode("/",$HTTP_USER_AGENT);
$ubr = $brws[0];
$ipr = getip();
$uip = explode(".",$ipr);

$isipbanned = mysql_fetch_assoc(mysql_query("SELECT * FROM ibwf_users ORDER BY regdate DESC LIMIT 0,1"));
$bantime = $isipbanned['regdate'] + 300;

$time = time();

if((!canreg())||(isipbanned($ipr,$ubr)))
{
echo "Registration is disabled at the moment, please check later";
}
elseif($bantime > $time)
{
echo "<p>";
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Registration limit for this IP is exceeded. Please try again after sometime.";
echo "</p>";
}
else
{
if (!empty($_REQUEST['act']) && $_REQUEST['act'] == $_REQUEST['code'] && $_REQUEST['uid'] !== '' ) {
$uid = $_REQUEST['uid'];
$pwd = $_REQUEST['pwd'];
$cpw = $_REQUEST['cpw'];
$email = $_REQUEST['email'];

if(trim($uid)=="")
{
    echo "Username Empty. Please Type Your Name.<br/><a href=\"register.php\">Back</a>";
}else if(trim($pwd)=="")
{
    echo "Please Type Your Password.<br/><a href=\"register.php\">Back</a>";
}else if(trim($cpw)=="")
{
    echo "Please Type Your Password Again.<br/><a href=\"register.php\">Back</a>";
}else if(spacesin($uid)||scharin($uid))
{
    echo "Username is not valid!<br/><a href=\"register.php\">Back</a>";
}else if(spacesin($pwd)||scharin($pwd))
{
    echo "Password is not valid!<br/><a href=\"register.php\">Back</a>";
}else if($pwd!=$cpw)
{
    echo "Passwords doesn't match.<br/><a href=\"register.php\">Back</a>";
}else if(strlen($uid)<4)
{
    echo "Username must be 4 characters or more.<br/><a href=\"register.php\">Back</a>";
}else if(strlen($pwd)<4)
{
    echo "Password must be 4 characters or more.<br/><a href=\"register.php\">Back</a>";
}else if(isdigitf($uid))
{
    echo "Username must start with a letter from a-z.<br/><a href=\"register.php\">Back</a>";
}else if(checknick($uid)==1)
{
    echo "Username is reserved for Admins of the site.<br/><a href=\"register.php\">Back</a>";

}else if(checknick($uid)==2)
{
    echo "Please choose an appropriate username.<br/><a href=\"register.php\">Back</a>";

}else if(trim($email)=="")
{
    echo "You must enter a valid email address.<br/><a href=\"register.php\">Back</a>";

}else if(register($uid,$pwd,$usx,$day,$month,$year,$ulc,$email,$info, $ubr)==1)
{
    echo "Username already in use, choose a different one.<br/><a href=\"register.php\">Back</a>";
}else if(register($uid,$pwd,$usx,$day,$month,$year,$ulc,$email,$info, $ubr)==2)
{
    echo "Unknown mysql error try registering later.<br/><a href=\"register.php\">Back</a>";
}else{
  echo "Registration completed successfully!<br/>";
  echo "<br/><b>Username: </b>$uid<br/>";
  echo "<b>Password: </b>$pwd<br/>";
  
  
  if(validation())
  {
  echo "Please give us up to an hour to validate you (normally it be done within 10 minutes) If you have not been after this period of time u can email the owner<br/>";
echo '<p align="center">';
echo '<a href="index.php">Home</a>';
echo '</p>';
  }else{
  echo "<a href=\"login.php?loguid=$uid&logpwd=$pwd\"><img src=\"../images/home.gif\" alt=\"*\"/>";
  echo "Login</a>";
  }
}
}
else{
?>
<small>
[»] 
Allowed characters in userid and password are a-z, 0-9, and -_ only<br/>
[»] 
No vulgar words are accepted in Username<br/>
[»] 
Username and Password must contain at least 4 characters<br/>
[»] 
Username must begin with a letter and cannot contain capitals<br/>
[»] 
Password will be case sensitive<br/>
[»] 
All The Fields Are Necessary!<br/><br/>
</small>
<?php
$code = substr(md5(time()),0,5);

echo "<form action=\"register.php\" method=\"post\">";
echo 'Username:<br/> <input name="tfuid" format="*x" maxlength="15"/><br/>';
echo 'Password:<br/> <input type="password" name="tfpwd" format="*x" maxlength="30"/><br/>';
echo "Repeat Password:<br/> <input type=\"password\" name=\"tfcpw\" format=\"*x\" maxlength=\"30\"/><br/>";
echo "I am:<br/>";
echo "<select name=\"opsex\" value=\"M\">";
echo "<option value=\"M\">Male</option>";
echo "<option value=\"F\">Female</option>";
echo "</select><br/>";
echo "Country:<br/> <input name=\"tfloc\"  maxlength=\"100\"/><br/>";
echo "Email:<br/> <input name=\"email\" maxlength=\"50\"/><br/>";
echo "More Info:<br/> <input name=\"info\" maxlength=\"100\"/><br/>";  
echo "<b><u>Verification:</u></b><br/>Type the following code in the box below:<br/>";
echo "<b>Code: </b> $code<br/>";
echo "<input name=\"code\" type=\"text\" /><br/>";
echo "<input type=\"hidden\" name=\"act\" value=\"$code\"/>";
echo "<input type=\"submit\" value=\"send\"/>";
echo "</form>";

echo '</p><p align="center">';
echo '<a href="index.php">Home</a>';
}}
?>
</p>
</body>
</html>

Did I help you? You can help me too Your donations will help me finance my studies.

Guest #3

@ Kei_ki7 :

Thanks For Reply .... But its cant get username, pass, e-mail, sex from register Form ! 🙁

Than i Add this Code >>

echo "<input type=\"hidden\" name=\"uid\" value=\"$tfuid\"/>";
echo "<input type=\"hidden\" name=\"pwd\" value=\"$tfpwd\"/>";
echo "<input type=\"hidden\" name=\"cpw\" value=\"$tfcpw\"/>";
echo "<input type=\"hidden\" name=\"usx\" value=\"$opsex\"/>";
echo "<input type=\"hidden\" name=\"email\" value=\"$email\"/>";

But No Improve ! 🙁 ... Now The Page got Refreshed when i click in register Button ! PLZ Help meh !

kei_ki7 Senior · 431 posts #4

This method is post right?

echo "<input type="hidden" name="uid" value="$tfuid"/>"; echo "<input type="hidden" name="pwd" value="$tfpwd"/>"; echo "<input type="hidden" name="cpw" value="$tfcpw"/>"; echo "<input type="hidden" name="usx" value="$opsex"/>"; echo "<input type="hidden" name="email" value="$email"/>";

Do you mean you added this code? If yes, then you really don't get the value, because you declare a value for those names

Did I help you? You can help me too Your donations will help me finance my studies.

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close