Hi everyone. Does any1 know if theres a lottery script about for lava in html. members choose there 6 numbers. Then once they have choosen there numbers. All 6 numbers show in there profile. Any help wud be grateful
Lottery
Collapse
X
-
GuestTags: None
-
Guest
-
Guest
-
Guest
Ive put the 6 boxes in update profile and done the sql for it but im stuck with the updating code in genoc.php to show numbers in profile any ideas
Comment
-
add this to veiwprofile
Code:$lott = mysql_fetch_array(mysql_query("SELECT one , two , three , four , five , six FROM ibwf_users WHERE id='".$who."'")); $lotto1 = parsepm($lott[0], $sid); $lotto2 = parsepm($lott[1], $sid); $lotto3 = parsepm($lott[2], $sid); $lotto4 = parsepm($lott[3], $sid); $lotto5 = parsepm($lott[4], $sid); $lotto6 = parsepm($lott[5], $sid); echo "[b]Lottery:[/b] $lotto1 / $lotto2 / $lotto3 / $lotto4 / $lotto5 / $lotto6 ";
Code:///////////////////////////////////Settings else if($action=="uset") { addonline(getuid_sid($sid),"User Settings ",""); echo "<head>"; echo "<title>User Settings</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "</head>"; echo "<body>"; $uid = getuid_sid($sid); $avat = getavatar($uid); $email = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$uid."'")); $bdy = mysql_fetch_array(mysql_query("SELECT birthday FROM ibwf_users WHERE id='".$uid."'")); $uloc = mysql_fetch_array(mysql_query("SELECT location FROM ibwf_users WHERE id='".$uid."'")); $usig = mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$uid."'")); $sx = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'")); $one = mysql_fetch_array(mysql_query("SELECT one FROM ibwf_users WHERE id='".$uid."'")); $two = mysql_fetch_array(mysql_query("SELECT two FROM ibwf_users WHERE id='".$uid."'")); $three = mysql_fetch_array(mysql_query("SELECT three FROM ibwf_users WHERE id='".$uid."'")); $four = mysql_fetch_array(mysql_query("SELECT four FROM ibwf_users WHERE id='".$uid."'")); $five = mysql_fetch_array(mysql_query("SELECT five FROM ibwf_users WHERE id='".$uid."'")); $six = mysql_fetch_array(mysql_query("SELECT six FROM ibwf_users WHERE id='".$uid."'")); $uloc[0] = htmlspecialchars($uloc[0]); echo "<p align=\"center\">"; echo "[b]Settings[/b]"; echo "</p>"; echo " "; echo "<form action=\"genproc.php?action=uprof&sid=$sid\" method=\"post\">"; echo "Profile Pic: <input name=\"savat\" maxlength=\"100\" value=\"$avat\"/> "; echo "E-Mail: <input name=\"semail\" maxlength=\"100\" value=\"$email[0]\"/> "; echo "Birthday(YYYY-MM-DD): <input name=\"ubday\" maxlength=\"50\" value=\"$bdy[0]\"/> "; echo "Location: <input name=\"uloc\" maxlength=\"50\" value=\"$uloc[0]\"/> "; echo "Info: <input name=\"usig\" maxlength=\"100\" value=\"$usig[0]\"/> "; echo "Sex: <select name=\"usex\" value=\"$sx[0]\">"; echo "<option value=\"M\">Male</option>"; echo "<option value=\"F\">Female</option>"; echo "</select> "; echo "lottery numbers: <input name=\"one\" maxlength=\"2\" value=\"$one[0]\"/> "; echo "<input name=\"two\" maxlength=\"2\" value=\"$two[0]\"/> "; echo "<input name=\"three\" maxlength=\"2\" value=\"$three[0]\"/> "; echo "<input name=\"four\" maxlength=\"2\" value=\"$four[0]\"/> "; echo "<input name=\"five\" maxlength=\"2\" value=\"$five[0]\"/> "; echo "<input name=\"six\" maxlength=\"2\" value=\"$six[0]\"/> "; echo "<input type=\"submit\" value=\"Update\"/>"; echo "</form>"; echo "</p>"; echo "<p align=\"center\">"; echo "<a href=\"index.php?action=cpanel&sid=$sid\">Settings</a> "; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Home</a>"; echo "</p>"; echo "</body>"; }
Code://////////////////////////////////////////Update profile else if($action=="uprof") { addonline(getuid_sid($sid),"Updating Settings",""); $savat = $_POST["savat"]; $semail = $_POST["semail"]; $ubday = $_POST["ubday"]; $uloc = $_POST["uloc"]; $usig = $_POST["usig"]; $usex = $_POST["usex"]; $one = $_POST["one"]; $two = $_POST["two"]; $three = $_POST["three"]; $four = $_POST["four"]; $five = $_POST["five"]; $six = $_POST["six"]; echo "<head>"; echo "<title>$sitename</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "</head>"; echo "<body>"; echo "<p align=\"center\">"; //$uid = getuid_sid($sid); $res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', one='".$one."', two='".$two."', three='".$three."', four='".$four."', five='".$five."', six='".$six."', sex='".$usex."' WHERE id='".$uid."'"); if($res) { echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Your profile was updated successfully "; }else{ echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Error updating your profile "; } echo " <a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; echo "</p></body>"; }
Comment
-
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
PHP Code:///////////////////////////////////Settings
else if($action=="uset")
{
addonline(getuid_sid($sid),"User Settings ","");
echo "<head>";
echo "<title>User Settings</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$uid = getuid_sid($sid);
$avat = getavatar($uid);
$email = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$uid."'"));
$bdy = mysql_fetch_array(mysql_query("SELECT birthday FROM ibwf_users WHERE id='".$uid."'"));
$uloc = mysql_fetch_array(mysql_query("SELECT location FROM ibwf_users WHERE id='".$uid."'"));
$usig = mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$uid."'"));
$sx = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'"));
$one = mysql_fetch_array(mysql_query("SELECT one FROM ibwf_users WHERE id='".$uid."'"));
$two = mysql_fetch_array(mysql_query("SELECT two FROM ibwf_users WHERE id='".$uid."'"));
$three = mysql_fetch_array(mysql_query("SELECT three FROM ibwf_users WHERE id='".$uid."'"));
$four = mysql_fetch_array(mysql_query("SELECT four FROM ibwf_users WHERE id='".$uid."'"));
$five = mysql_fetch_array(mysql_query("SELECT five FROM ibwf_users WHERE id='".$uid."'"));
$six = mysql_fetch_array(mysql_query("SELECT six FROM ibwf_users WHERE id='".$uid."'"));
$uloc[0] = htmlspecialchars($uloc[0]);
echo "<p align=\"center\">";
echo "Settings";
echo "</p>";
echo "
";
echo "<form action=\"genproc.php?action=uprof&sid=$sid\" method=\"post\">";
echo "Profile Pic: <input name=\"savat\" maxlength=\"100\" value=\"$avat\"/>
";
echo "E-Mail: <input name=\"semail\" maxlength=\"100\" value=\"$email[0]\"/>
";
echo "Birthday(YYYY-MM-DD): <input name=\"ubday\" maxlength=\"50\" value=\"$bdy[0]\"/>
";
echo "Location: <input name=\"uloc\" maxlength=\"50\" value=\"$uloc[0]\"/>
";
echo "Info: <input name=\"usig\" maxlength=\"100\" value=\"$usig[0]\"/>
";
echo "Sex: <select name=\"usex\" value=\"$sx[0]\">";
echo "<option value=\"M\">Male</option>";
echo "<option value=\"F\">Female</option>";
echo "</select>
";
echo "lottery numbers: <input name=\"one\" maxlength=\"2\" value=\"$one[0]\"/>
";
echo "<input name=\"two\" size=\"3\" maxlength=\"2\" value=\"$two[0]\"/>
";
echo "<input name=\"three\" size=\"3\" maxlength=\"2\" value=\"$three[0]\"/>
";
echo "<input name=\"four\" size=\"3\" maxlength=\"2\" value=\"$four[0]\"/>
";
echo "<input name=\"five\" size=\"3\" maxlength=\"2\" value=\"$five[0]\"/>
";
echo "<input name=\"six\" size=\"3\" maxlength=\"2\" value=\"$six[0]\"/>
";
echo "<input type=\"submit\" value=\"Update\"/>";
echo "</form>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=cpanel&sid=$sid\">Settings</a>
";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}
</div>
Last edited by metulj; 24.04.09, 09:32.
Comment
-
Originally posted by nclemale36 View Postadd this to veiwprofile
Code:$lott = mysql_fetch_array(mysql_query("SELECT one , two , three , four , five , six**FROM ibwf_users WHERE id='".$who."'")); **$lotto1 = parsepm($lott[0], $sid); $lotto2 = parsepm($lott[1], $sid); $lotto3 = parsepm($lott[2], $sid); $lotto4 = parsepm($lott[3], $sid); $lotto5 = parsepm($lott[4], $sid); $lotto6 = parsepm($lott[5], $sid); echo "[b]Lottery:[/b] $lotto1 / $lotto2 / $lotto3 / $lotto4 / $lotto5 / $lotto6 ";
Code:///////////////////////////////////Settings else if($action=="uset") { **addonline(getuid_sid($sid),"User Settings ",""); **echo "<head>"; **echo "<title>User Settings</title>"; **echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; **echo "</head>"; **echo "<body>"; **$uid = getuid_sid($sid); **$avat = getavatar($uid); **$email = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$uid."'")); **$bdy = mysql_fetch_array(mysql_query("SELECT birthday FROM ibwf_users WHERE id='".$uid."'")); **$uloc = mysql_fetch_array(mysql_query("SELECT location FROM ibwf_users WHERE id='".$uid."'")); **$usig = mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$uid."'")); **$sx = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'")); $one = mysql_fetch_array(mysql_query("SELECT one FROM ibwf_users WHERE id='".$uid."'")); $two = mysql_fetch_array(mysql_query("SELECT two FROM ibwf_users WHERE id='".$uid."'")); $three = mysql_fetch_array(mysql_query("SELECT three FROM ibwf_users WHERE id='".$uid."'")); $four = mysql_fetch_array(mysql_query("SELECT four FROM ibwf_users WHERE id='".$uid."'")); $five = mysql_fetch_array(mysql_query("SELECT five FROM ibwf_users WHERE id='".$uid."'")); $six = mysql_fetch_array(mysql_query("SELECT six FROM ibwf_users WHERE id='".$uid."'")); **$uloc[0] = htmlspecialchars($uloc[0]); **echo "<p align=\"center\">"; **echo "[b]Settings[/b]"; **echo "</p>"; **echo " "; **echo "<form action=\"genproc.php?action=uprof&sid=$sid\" method=\"post\">"; **echo "Profile Pic: <input name=\"savat\" maxlength=\"100\" value=\"$avat\"/> "; **echo "E-Mail: <input name=\"semail\" maxlength=\"100\" value=\"$email[0]\"/> "; **echo "Birthday(YYYY-MM-DD): <input name=\"ubday\" maxlength=\"50\" value=\"$bdy[0]\"/> "; **echo "Location: <input name=\"uloc\" maxlength=\"50\" value=\"$uloc[0]\"/> "; **echo "Info: <input name=\"usig\" maxlength=\"100\" value=\"$usig[0]\"/> "; **echo "Sex: <select name=\"usex\" value=\"$sx[0]\">"; **echo "<option value=\"M\">Male</option>"; **echo "<option value=\"F\">Female</option>"; **echo "</select> "; echo "lottery numbers: <input name=\"one\" maxlength=\"2\" value=\"$one[0]\"/> "; echo "<input name=\"two\" maxlength=\"2\" value=\"$two[0]\"/> "; echo "<input name=\"three\" maxlength=\"2\" value=\"$three[0]\"/> "; echo "<input name=\"four\" maxlength=\"2\" value=\"$four[0]\"/> "; echo "<input name=\"five\" maxlength=\"2\" value=\"$five[0]\"/> "; echo "<input name=\"six\" maxlength=\"2\" value=\"$six[0]\"/> "; **echo "<input type=\"submit\" value=\"Update\"/>"; **echo "</form>"; **echo "</p>"; **echo "<p align=\"center\">"; **echo "<a href=\"index.php?action=cpanel&sid=$sid\">Settings</a> "; **echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Home</a>"; **echo "</p>"; **echo "</body>"; }
Code://////////////////////////////////////////Update profile else if($action=="uprof") { ****addonline(getuid_sid($sid),"Updating Settings",""); ****$savat = $_POST["savat"]; ****$semail = $_POST["semail"]; ****$ubday = $_POST["ubday"]; ****$uloc = $_POST["uloc"]; ****$usig = $_POST["usig"]; ****$usex = $_POST["usex"]; $one = $_POST["one"]; $two = $_POST["two"]; $three = $_POST["three"]; $four = $_POST["four"]; $five = $_POST["five"]; $six = $_POST["six"]; ******echo "<head>"; ******echo "<title>$sitename</title>"; ******echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; ******echo "</head>"; ******echo "<body>"; **echo "<p align=\"center\">"; **//$uid = getuid_sid($sid); **$res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', one='".$one."', two='".$two."', three='".$three."', four='".$four."', five='".$five."', six='".$six."', sex='".$usex."' WHERE id='".$uid."'"); **if($res) **{ ****echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Your profile was updated successfully "; **}else{ ****echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Error updating your profile "; **} **echo " <a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; **echo "</p></body>"; }
Code:Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/*****/public_html/******/web/index.php on line 3087
Code:Error updating your profile
Last edited by wackywizards; 24.04.09, 01:08.
Comment
Comment