hi, someone can help me to convert this script to html, i am making a xhtml version of waptribe game, and i'm stuck with this script. i am interested in that form action and get... if someone can make it, i only need to see how it works on this code, from now on i can handle it if i see how it works . i tried on google, but i cannot make it work
PHP Code:
////////////////////////////////////////Inscriere
else if($action=="inscriere")
{
addonline(getuid_sid($sid),"Joaca $numesite","index.php?action=$action");
echo "<card id=\"main\" title=\" $numesite\">";
echo "<p align=\"center\">";
if(getplusses(getuid_sid($sid))<0)
{
echo "you need 25 plusses to play this game.<br/>";
}else if(ispwar(getuid_sid($sid)))
{
echo "you are already in the game!<br/>";
}else{
echo "<small>";
echo "Complete with your description<br/><br/>";
echo "About:<br/><i>(maxim 40 caractere)</i><br/> </small><input name=\"descriere\" maxlength=\"40\"/>";
echo "<br/><anchor><small>inscriere</small>";
echo "<go href=\"index.php?action=salveazareg&sid=$sid\" method=\"post\">";
echo "<postfield name=\"descriere\" value=\"$(descriere)\"/>";
echo "</go></anchor>";
}
echo "</p>";
echo "<p align=\"center\">";
echo "<small><a href=\"index.php?action=main&sid=$sid\">Meniu joc</a></small><br/>";
include("footer.php");
echo "</p>";
echo "</card>";
}
////////////////////////////////////////Inscriere
else if($action=="salveazareg")
{
addonline(getuid_sid($sid),"Joaca $numesite","index.php?action=$action");
echo "<card id=\"main\" title=\" $numesite\">";
$uid = getuid_sid($sid);
$descriere = $_POST["descriere"];
echo "<p align=\"center\">";
if(ispwar(getuid_sid($sid)))
{
echo "you are already in the game!<br/>";
}else{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM triburile_trib WHERE id='".$uid."'"));
if ($noi[0]>0)
{
$trib = $uid;
}else{
$trib = 0;
}
$numesat = getnick_uid($uid);
$data = time();
$res = mysql_query("INSERT INTO triburile SET uid='".$uid."', sat='Satul lui ".$numesat."', trib='".$trib."', descriere='".$descriere."', ultresurse='".$data."', data='".$data."'");
if($res)
{
echo "<small>Ok, now you are in the game!</small><br/>";
}else{
echo "Error<br/>";
}
}
echo "</p>";
echo "<p align=\"center\">";
echo "<small><a href=\"index.php?action=main&sid=$sid\">Game menu</a></small><br/>";
include("footer.php");
echo "</p>";
echo "</card>";
}
Comment