Lottery

Started on the old forum in January 2009 · view the original in the archive · old links redirect here

9 replies · 714 views · started 17 years ago · 1 min read

4 participants
Guest #1

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

Guest #3

Im not luking for a fancy 1 just a basic 1

Guest #5

Lol i was guna put my winning numbers on

Guest #6

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

nclemale36 Lead · 537 posts #7

add this to veiwprofile

$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
";

edit update profile to this

///////////////////////////////////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>";
}

edit update profile in genproc to this

//////////////////////////////////////////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>";
}

dont say i never give ya nowt lol

jsyguy23 Developer · 134 posts #8

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>

you could do it like that so its only lil boxes bot big long bars lol looks better

wackywizards Junior · 44 posts #9

nclemale36 wrote: add this to veiwprofile

$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 "Lottery: $lotto1 / $lotto2 / $lotto3 / $lotto4 / $lotto5 / $lotto6
";

edit update profile to this

///////////////////////////////////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\" 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>";
}

edit update profile in genproc to this

//////////////////////////////////////////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>";
}

dont say i never give ya nowt lol

is there a sql for this as i got this error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/*****/public_html/******/web/index.php on line 3087

i also get this when i try to update profile

Error updating your profile
wackywizards Junior · 44 posts #10

thanks to jsyguy for helping me out here is the sql for it

`one` int(3) NOT NULL default '0',
`two` int(3) NOT NULL default '0',
`three` int(3) NOT NULL default '0',
`four` int(3) NOT NULL default '0',
`five` int(3) NOT NULL default '0',
`six` int(3) NOT NULL default '0',

Sign in to reply.

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