please help me to convert to xhtml

Started on the old forum in February 2010 · view the original in the archive · old links redirect here

2 replies · 373 views · started 16 years ago · 1 min read

2 participants
costy18 Junior · 12 posts #1

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

////////////////////////////////////////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>";
}
Loony Senior · 258 posts #2

Try This i havent tested it

<?
////////////////////////////////////////Inscriere
else if($action=="inscriere")
{
   addonline(getuid_sid($sid),"Joaca  $numesite","index.php?action=$action");
    echo "<title> $numesite</title>";
echo "<body>";
    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 "<form action=\"index.php?action=salveazareg&sid=$sid\" name=\"game\" method=\"post\">";
    echo "About:<br/><i>(maxim 40 caractere)</i><br/> </small><input name=\"descriere\" maxlength=\"40\"/>";
    echo "<br/><anchor><small>inscriere</small>";
echo "<input type=\"submit\" class=\"text\" name=\"Submit\" value=\"Submit\">";
    }
    
    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 "</body>";

	}
////////////////////////////////////////Inscriere
else if($action=="salveazareg")
{
   addonline(getuid_sid($sid),"Joaca  $numesite","index.php?action=$action");
    echo "<title>$numesite</title>";
echo "<body>";
    $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 "</body>";
}  

Creator of Epix.Mobi

Keep an Eye on us Big things coming soon!!!! Need something for your site hit me up here http://coding-talk.com/forum/main-forums/marketplace/153110-free-features-for-your-wapsite

costy18 Junior · 12 posts #3

thanks alot for helping me.. it works

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