hi can someone help me with this, before i had
addonline(getuid_sid($sid),"Playing Word Scramble","");
echo head_tag(getnick_sid($sid)."@Word Scramble",1,getnick_sid($sid));
$title="<b><i>Word Scramble</i></b>";
$answer=$_POST["answer"];
if(empty($_POST["answer"])){
srand((float)microtime()*10000000);
$input=mysql_fetch_array(mysql_query("SELECT word1, word2, word3, word4, word5, word6, word7, word8, word9, word10, word11, word12, word13, word14, word15, word16, word17, word18, word19, word20 FROM games WHERE category='wordscramble'"));
/*
$input=array(
"dictionary",
"recognize",
"example",
"entertainment",
"experiment",
"appreciation",
"information",
"pronunciation",
"language",
"government",
"psychic",
"blueberry",
"selection",
"automatic",
"strawberry",
"bakery",
"shopping",
"eggplant",
"chicken",
"organic ",
"angel",
"season",
"market",
"information",
"complete",
"sunset",
"unique",
"customer"
);
*/
$rand_keys=array_rand($input,2);
$word=$input[$rand_keys[0]];
$Sword=str_shuffle($word);
$main="<p align=".align().">
$Sword
</p>
<p align=".align().">
In the text box below type the correct word that is scrambled above.</p>
<div class=".align().">
<form method=\"post\" action=\"./wordscramble.php?sid=$sid\">
<input type=\"text\" name=\"answer\" size=\"20\"/>
<input type=\"hidden\" name=\"correct\" value=\"$word\"/>
<input type=\"submit\" value=\"GO!\" name=\"B1\"/>
</form>
</div>\n";
}else{
$answer=strtolower($answer);
if($answer==$correct)
{
$result="Correct! <b>$answer</b>";
$uid=getuid_sid($sid);
$sqlfetch=mysql_query("SELECT points FROM profiles WHERE uid='".$uid."'");
$sqlfet=mysql_fetch_array($sqlfetch);
$gplusnew=$sqlfet[0]+"25";
$sql="UPDATE profiles SET points='".$gplusnew."' WHERE uid='".$uid."'";
$res=mysql_query($sql);
$main="<p align=".align().">
$result<br/>
You Have Had 25 game Plusses Added For Winning.
</p>
<p align=".align().">
<a href=\"./wordscramble.php?sid=$sid\">Try Another Word?</a>
</p>\n";
}else{
$result="Sorry! The Correct Answer Was <b>$correct</b>.";
$uid=getuid_sid($sid);
$sqlfetch=mysql_query("SELECT points FROM profiles WHERE uid='".$uid."'");
$sqlfet=mysql_fetch_array($sqlfetch);
$gplusnew=$sqlfet[0]-"25";
$sql="UPDATE profiles SET points='".$gplusnew."' WHERE uid='".$uid."'";
$res=mysql_query($sql);
$main="<p align=".align().">
$result<br/>
You Have Had 25 game Plusses Deducted For Losing.
</p>
<p align=".align().">
<a href=\"./wordscramble.php?sid=$sid\">Try Another Word?</a>
</p>\n";
}
}
$main.="<p align=".align().">
<a href=\"./games.php?sid=$sid\">Back</a>
</p>\n";
$L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";
$L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
$L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";
$L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";
$L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$mai n);
echo foot_tag();
exit;
?>
that came up without any words to unscramble with a error so i tried
/////////////////////////////////
else if($action == "scramble")
{
$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
addonline(getuid_sid($sid),"playing word scramble ($mmsg)","");
echo "<head>";
echo "<title>Word Scramble</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$answer = $_POST["answer"];
if (empty($_POST["answer"])) {
srand((float) microtime() * 10000000);
$input = array(
"dictionary",
"recognize",
"example",
"entertainment",
"experiment",
"appreciation",
"information",
"pronunciation",
"language",
"government",
"psychic",
"blueberry",
"selection",
"automatic",
"strawberry",
"bakery",
"shopping",
"eggplant",
"chicken",
"organic ",
"angel",
"season",
"market",
"information",
"complete",
"sunset",
"unique",
"customer"
);
$rand_keys = array_rand($input, 2);
$word = $input[$rand_keys[0]];
$Sword = str_shuffle($word);
echo "<p align=\"center\">$Sword</p>
<p align=\"center\">In the
text box below type the correct word that is scrambled above.</p>
<form method=\"POST\" action=\"games.php?action=scramble&sid=$sid\">
<center><input type=\"text\" name=\"answer\" size=\"20\">
<input type=\"hidden\" name=\"correct\" value=\"$word\">
<input type=\"submit\" value=\"GO!\" name=\"B1\"></center>
</form>
<p align=\"center\"><b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>
</body>";
}
else {
$answer = strtolower($answer);
if($answer == $correct){
$result = "Correct! <b>$answer</b>";
$uid = getuid_sid($sid);
$ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));
$ugpl = "25" + $ugpl[0];
mysql_query("UPDATE ibwf_users SET gplus='".$ugpl."' WHERE id='".$uid."'");
echo "<p align=\"center\">$result<br/>You Have Had 25 game Plusses Added For Winning.
</p>
<p align=\"center\"><a href=\"games.php?action=scramble&sid=$sid\">Tr y Another Word?</a><br/>
<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>
</body>";}
else { $result = "Sorry! The Correct Answer Was <b>$correct</b>.";
$uid = getuid_sid($sid);
$ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));
$ugpl = $ugpl[0] - "25";
mysql_query("UPDATE ibwf_users SET gplus='".$ugpl."' WHERE id='".$uid."'");
echo "<p align=\"center\">$result<br/>You Have Had 25 game Plusses Deducted For Losing.
</p>
<p align=\"center\"><a href=\"games.php?action=scramble&sid=$sid\">Tr y Another Word?</a><br/>
<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>
</body>";
}
}
}
that shows the word to unscramble but when i press go it takes me bk to games page
please help
Added after 4 minutes:
im using database with ibwf on one and without ibwf on the other sites database one is wapdesire script one is lavalair
addonline(getuid_sid($sid),"Playing Word Scramble","");
echo head_tag(getnick_sid($sid)."@Word Scramble",1,getnick_sid($sid));
$title="<b><i>Word Scramble</i></b>";
$answer=$_POST["answer"];
if(empty($_POST["answer"])){
srand((float)microtime()*10000000);
$input=mysql_fetch_array(mysql_query("SELECT word1, word2, word3, word4, word5, word6, word7, word8, word9, word10, word11, word12, word13, word14, word15, word16, word17, word18, word19, word20 FROM games WHERE category='wordscramble'"));
/*
$input=array(
"dictionary",
"recognize",
"example",
"entertainment",
"experiment",
"appreciation",
"information",
"pronunciation",
"language",
"government",
"psychic",
"blueberry",
"selection",
"automatic",
"strawberry",
"bakery",
"shopping",
"eggplant",
"chicken",
"organic ",
"angel",
"season",
"market",
"information",
"complete",
"sunset",
"unique",
"customer"
);
*/
$rand_keys=array_rand($input,2);
$word=$input[$rand_keys[0]];
$Sword=str_shuffle($word);
$main="<p align=".align().">
$Sword
</p>
<p align=".align().">
In the text box below type the correct word that is scrambled above.</p>
<div class=".align().">
<form method=\"post\" action=\"./wordscramble.php?sid=$sid\">
<input type=\"text\" name=\"answer\" size=\"20\"/>
<input type=\"hidden\" name=\"correct\" value=\"$word\"/>
<input type=\"submit\" value=\"GO!\" name=\"B1\"/>
</form>
</div>\n";
}else{
$answer=strtolower($answer);
if($answer==$correct)
{
$result="Correct! <b>$answer</b>";
$uid=getuid_sid($sid);
$sqlfetch=mysql_query("SELECT points FROM profiles WHERE uid='".$uid."'");
$sqlfet=mysql_fetch_array($sqlfetch);
$gplusnew=$sqlfet[0]+"25";
$sql="UPDATE profiles SET points='".$gplusnew."' WHERE uid='".$uid."'";
$res=mysql_query($sql);
$main="<p align=".align().">
$result<br/>
You Have Had 25 game Plusses Added For Winning.
</p>
<p align=".align().">
<a href=\"./wordscramble.php?sid=$sid\">Try Another Word?</a>
</p>\n";
}else{
$result="Sorry! The Correct Answer Was <b>$correct</b>.";
$uid=getuid_sid($sid);
$sqlfetch=mysql_query("SELECT points FROM profiles WHERE uid='".$uid."'");
$sqlfet=mysql_fetch_array($sqlfetch);
$gplusnew=$sqlfet[0]-"25";
$sql="UPDATE profiles SET points='".$gplusnew."' WHERE uid='".$uid."'";
$res=mysql_query($sql);
$main="<p align=".align().">
$result<br/>
You Have Had 25 game Plusses Deducted For Losing.
</p>
<p align=".align().">
<a href=\"./wordscramble.php?sid=$sid\">Try Another Word?</a>
</p>\n";
}
}
$main.="<p align=".align().">
<a href=\"./games.php?sid=$sid\">Back</a>
</p>\n";
$L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";
$L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
$L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";
$L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";
$L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$mai n);
echo foot_tag();
exit;
?>
that came up without any words to unscramble with a error so i tried
/////////////////////////////////
else if($action == "scramble")
{
$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
addonline(getuid_sid($sid),"playing word scramble ($mmsg)","");
echo "<head>";
echo "<title>Word Scramble</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$answer = $_POST["answer"];
if (empty($_POST["answer"])) {
srand((float) microtime() * 10000000);
$input = array(
"dictionary",
"recognize",
"example",
"entertainment",
"experiment",
"appreciation",
"information",
"pronunciation",
"language",
"government",
"psychic",
"blueberry",
"selection",
"automatic",
"strawberry",
"bakery",
"shopping",
"eggplant",
"chicken",
"organic ",
"angel",
"season",
"market",
"information",
"complete",
"sunset",
"unique",
"customer"
);
$rand_keys = array_rand($input, 2);
$word = $input[$rand_keys[0]];
$Sword = str_shuffle($word);
echo "<p align=\"center\">$Sword</p>
<p align=\"center\">In the
text box below type the correct word that is scrambled above.</p>
<form method=\"POST\" action=\"games.php?action=scramble&sid=$sid\">
<center><input type=\"text\" name=\"answer\" size=\"20\">
<input type=\"hidden\" name=\"correct\" value=\"$word\">
<input type=\"submit\" value=\"GO!\" name=\"B1\"></center>
</form>
<p align=\"center\"><b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>
</body>";
}
else {
$answer = strtolower($answer);
if($answer == $correct){
$result = "Correct! <b>$answer</b>";
$uid = getuid_sid($sid);
$ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));
$ugpl = "25" + $ugpl[0];
mysql_query("UPDATE ibwf_users SET gplus='".$ugpl."' WHERE id='".$uid."'");
echo "<p align=\"center\">$result<br/>You Have Had 25 game Plusses Added For Winning.
</p>
<p align=\"center\"><a href=\"games.php?action=scramble&sid=$sid\">Tr y Another Word?</a><br/>
<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>
</body>";}
else { $result = "Sorry! The Correct Answer Was <b>$correct</b>.";
$uid = getuid_sid($sid);
$ugpl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));
$ugpl = $ugpl[0] - "25";
mysql_query("UPDATE ibwf_users SET gplus='".$ugpl."' WHERE id='".$uid."'");
echo "<p align=\"center\">$result<br/>You Have Had 25 game Plusses Deducted For Losing.
</p>
<p align=\"center\"><a href=\"games.php?action=scramble&sid=$sid\">Tr y Another Word?</a><br/>
<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>
</body>";
}
}
}
that shows the word to unscramble but when i press go it takes me bk to games page
please help
Added after 4 minutes:
im using database with ibwf on one and without ibwf on the other sites database one is wapdesire script one is lavalair
Comment