Hi to all coders, i have problem to this script, pls. Tell me what's wrong? I try to put this code at index.Php and it works,
if($action=="convert")
{
addonline(getuid_sid($sid),"xhtml - Converting Chatpost to Plusses","convert.php?action=$action");
echo "<title>C2P Converter</title>";
echo "<div align=\"center\">";
$tnick = getnick_uid($uid);
echo "Convert your Chatpost to Plusses here.<br/>";
echo "Exchange rate:<br/>";
echo "10 Chatpost = 2Plusses<br/><br/>";
echo "You Currently Have:<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
echo "<b>$nopl[0] Chat Posts</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
echo "<b>$nopl[0] Plusses</b><br/><br/>";
echo "<form action=\"convert.php?action=conv&sid=$sid\" method=\"post\">";
//echo "<br/>Convertion Type:<br/><select name=\"cur\">";
//echo "<option value=\"1\">Plusses-GP</option>";
//echo "<option value=\"2\">BP-GP</option>";
//echo "</select><br/>";
echo "Enter amount of chatpost to convert into plusses:<br/><input name=\"hmany\" size=\"5\" maxlength=\"4\" format=\"*N\"/>";
echo "<input type=\"submit\" value=\"Convert\"/>";
echo "</form>";
//echo "<a href=\"chat.php?rid=23&sid=$sid\">RPG ChatRoom</a><br/>";
echo "<a href=\"index.php?action=chat&sid=$sid\">Chatro om Menu</a><br/>----<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Main menu</a>";
echo "</div>";
foot();
echo "</body>";
}
if($action=="convert")
{
addonline(getuid_sid($sid),"xhtml - Converting Chatpost to Plusses","convert.php?action=$action");
echo "<title>C2P Converter</title>";
echo "<div align=\"center\">";
$tnick = getnick_uid($uid);
echo "Convert your Chatpost to Plusses here.<br/>";
echo "Exchange rate:<br/>";
echo "10 Chatpost = 2Plusses<br/><br/>";
echo "You Currently Have:<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
echo "<b>$nopl[0] Chat Posts</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
echo "<b>$nopl[0] Plusses</b><br/><br/>";
echo "<form action=\"convert.php?action=conv&sid=$sid\" method=\"post\">";
//echo "<br/>Convertion Type:<br/><select name=\"cur\">";
//echo "<option value=\"1\">Plusses-GP</option>";
//echo "<option value=\"2\">BP-GP</option>";
//echo "</select><br/>";
echo "Enter amount of chatpost to convert into plusses:<br/><input name=\"hmany\" size=\"5\" maxlength=\"4\" format=\"*N\"/>";
echo "<input type=\"submit\" value=\"Convert\"/>";
echo "</form>";
//echo "<a href=\"chat.php?rid=23&sid=$sid\">RPG ChatRoom</a><br/>";
echo "<a href=\"index.php?action=chat&sid=$sid\">Chatro om Menu</a><br/>----<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Main menu</a>";
echo "</div>";
foot();
echo "</body>";
}
Comment