Green Bay Packers Forum

Welcome to your Green Bay Packers Online Community!

Since 2006, PackersHome has been providing a unique experience for fans.
Your participation is greatly anticipated!
Login or Register.
10 Pages«<45678>»
Options
Go to last post Go to first unread
Offline dhpackr  
#51 Posted : Sunday, September 20, 2009 8:22:39 PM(UTC)
Rank: Registered

Joined: 12/12/2007(UTC)
Applause Given: 36
Applause Received: 36
" said: Go to Quoted Post
The picks are predicated on the username already. It takes the global variable from the website. If you were to submit picks, it'd register as YOUR username :)


perfect, can u submit the picks, are the picks being stored in a db table, then retrieved from the db and displayed on a page based on memberid or username?

add the code i gave you to your file

change
&lt;input name='rdoGame01' type='radio' value='Titans' /&gt;Tenneesee Titans
&lt;input name='rdoGame01' type='radio' value='Steelers'/&gt;Pittsburgh

with...................................................................................................

&lt;?php
&lt;input type="radio" name="rdoGame01" value="1" class="textbox"&lt;?if($rdoGame01=="1"){echo " checked ";}?&gt;>Tenneesee Titans

&lt;input type="radio" name="rdoGame01" value="0" class="textbox"&lt;?if($rdoGame01=="0"){echo " checked ";}?&gt;> Steelers
?>
Offline Zero2Cool  
#52 Posted : Sunday, September 20, 2009 8:30:01 PM(UTC)
Rank: Premier Member

Yahoo! NCAA March Madness - Gold: 2015Yahoo! Fantasy Football - Gold: 2009FleaFlicker Fantasy Football - Silver: 2010Yahoo! NCAA March Madness - Silver: 2011ESPN NCAA March Madness - Bronze: 2010Yahoo! NCAA March Madness - Bronze: 2013

United States
Joined: 10/13/2006(UTC)
Location: Green Bay, WI
Applause Given: 2,446
Applause Received: 3,860
" said: Go to Quoted Post
" said: Go to Quoted Post
The picks are predicated on the username already. It takes the global variable from the website. If you were to submit picks, it'd register as YOUR username :)


perfect, can u submit the picks, are the picks being stored in a db table, then retrieved from the db and displayed on a page based on memberid or username?


Yes sir. I'm using the username from the main website's db and using a separate db to store the picks. The picks are also retrieved from that location based on the username.

So if I were to submit my picks logged in as SlickVision and then next week as Zero2Cool, I'd be fux0red. :)
Offline dhpackr  
#53 Posted : Sunday, September 20, 2009 8:45:19 PM(UTC)
Rank: Registered

Joined: 12/12/2007(UTC)
Applause Given: 36
Applause Received: 36
" said: Go to Quoted Post
" said: Go to Quoted Post
" said: Go to Quoted Post
The picks are predicated on the username already. It takes the global variable from the website. If you were to submit picks, it'd register as YOUR username :)


perfect, can u submit the picks, are the picks being stored in a db table, then retrieved from the db and displayed on a page based on memberid or username?


Yes sir. I'm using the username from the main website's db and using a separate db to store the picks. The picks are also retrieved from that location based on the username.

So if I were to submit my picks logged in as SlickVision and then next week as Zero2Cool, I'd be fux0red. :)


look at post above this one^^^^^^^^^^^^^^^^^^^^^^^^^^ ^
Offline dhpackr  
#54 Posted : Sunday, September 20, 2009 8:50:44 PM(UTC)
Rank: Registered

Joined: 12/12/2007(UTC)
Applause Given: 36
Applause Received: 36
now there is no code in that file u sent to connect to db or retrieve data from db and display on form.

that is not a dynamic database driven form
Offline Zero2Cool  
#55 Posted : Sunday, September 20, 2009 8:50:53 PM(UTC)
Rank: Premier Member

Yahoo! NCAA March Madness - Gold: 2015Yahoo! Fantasy Football - Gold: 2009FleaFlicker Fantasy Football - Silver: 2010Yahoo! NCAA March Madness - Silver: 2011ESPN NCAA March Madness - Bronze: 2010Yahoo! NCAA March Madness - Bronze: 2013

United States
Joined: 10/13/2006(UTC)
Location: Green Bay, WI
Applause Given: 2,446
Applause Received: 3,860
Okay, how does it get checked? Is that code have some hidden magic I don't see in the code or does it need to be validated elsewhere? In short, how does it validate? lol
Offline dhpackr  
#56 Posted : Sunday, September 20, 2009 8:56:57 PM(UTC)
Rank: Registered

Joined: 12/12/2007(UTC)
Applause Given: 36
Applause Received: 36
here is validation

function check_pick() {
//if (Auth::isAdmin())

//return true;
this chunck of code allows admin to
bypass validation remove the slashes to make it so admin would have to check all boxes


$is_valid = true;
if($this->rdoGame01=="" or $this->rdoGame02=="" ){
$is_valid=false;
$this->add_error('Make a selection!');
}
return $is_valid;

}

this validates the first two radio buttons

in other words....
if rdoGame1 is equal to nothing or =="" then display this error

make a selection

if rdoGameo1 == true then submit

you would have to add 16 variables to this function
Offline Zero2Cool  
#57 Posted : Sunday, September 20, 2009 9:17:11 PM(UTC)
Rank: Premier Member

Yahoo! NCAA March Madness - Gold: 2015Yahoo! Fantasy Football - Gold: 2009FleaFlicker Fantasy Football - Silver: 2010Yahoo! NCAA March Madness - Silver: 2011ESPN NCAA March Madness - Bronze: 2010Yahoo! NCAA March Madness - Bronze: 2013

United States
Joined: 10/13/2006(UTC)
Location: Green Bay, WI
Applause Given: 2,446
Applause Received: 3,860
I don't know if I have a case of the stupids or what, but that doesn't make much sense. I'm guessing the function will return a value of false if not all games are selected?
Offline dhpackr  
#58 Posted : Sunday, September 20, 2009 9:18:44 PM(UTC)
Rank: Registered

Joined: 12/12/2007(UTC)
Applause Given: 36
Applause Received: 36
" said: Go to Quoted Post
I don't know if I have a case of the stupids or what, but that doesn't make much sense. I'm guessing the function will return a value of false if not all games are selected?


yes and spit that error. but that is just code for two buttons, you need to add code for all 16
Offline Zero2Cool  
#59 Posted : Sunday, September 20, 2009 9:25:24 PM(UTC)
Rank: Premier Member

Yahoo! NCAA March Madness - Gold: 2015Yahoo! Fantasy Football - Gold: 2009FleaFlicker Fantasy Football - Silver: 2010Yahoo! NCAA March Madness - Silver: 2011ESPN NCAA March Madness - Bronze: 2010Yahoo! NCAA March Madness - Bronze: 2013

United States
Joined: 10/13/2006(UTC)
Location: Green Bay, WI
Applause Given: 2,446
Applause Received: 3,860
" said: Go to Quoted Post
" said: Go to Quoted Post
I don't know if I have a case of the stupids or what, but that doesn't make much sense. I'm guessing the function will return a value of false if not all games are selected?


yes and spit that error. but that is just code for two buttons, you need to add code for all 16


I'll play around with it a little bit and see what happens.

" said: Go to Quoted Post
now there is no code in that file u sent to connect to db or retrieve data from db and display on form.

that is not a dynamic database driven form


I didn't think it was wise to put the database connection information in every thread so I have it in a separate file and am using a function to call it.
Offline Zero2Cool  
#60 Posted : Sunday, September 20, 2009 10:32:37 PM(UTC)
Rank: Premier Member

Yahoo! NCAA March Madness - Gold: 2015Yahoo! Fantasy Football - Gold: 2009FleaFlicker Fantasy Football - Silver: 2010Yahoo! NCAA March Madness - Silver: 2011ESPN NCAA March Madness - Bronze: 2010Yahoo! NCAA March Madness - Bronze: 2013

United States
Joined: 10/13/2006(UTC)
Location: Green Bay, WI
Applause Given: 2,446
Applause Received: 3,860
[php]
function check_pick() {
//if (Auth::isAdmin())

//return true;
this chunck of code allows admin to
bypass validation remove the slashes to make it so admin would have to check all boxes


$is_valid = true;
if($this->rdoGame01=="" or $this->rdoGame02=="" ){
$is_valid=false;
$this->add_error('Make a selection!');
}
return $is_valid;

}
[/php]
Rss Feed 
Users browsing this topic
Guest
10 Pages«<45678>»
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error


Fan Shout
Zero2Cool (2h) : Sweet. I backed my sweet ass into the playoffs. 8th and final seed.
Smokey (11h) : Thank you Zero, I also just finished the Reg. Fantasy season at #1 . (Tailgaters Fantasy Football League ) .
The_Green_Ninja (17h) : Same ol' Jay xD
Zero2Cool (19h) : Aaron Rodgers over the last 7 games: 302 passing yards/game, 19 TDs, 3 INTs, 104.6 passer rating. 212 rushing yards, TD.
Zero2Cool (5-Dec) : Nice! I noticed you rocked your NFL Picks this week too! Nice work!!
Smokey (5-Dec) : Yes, he got me 29 fantasy points !
Zero2Cool (5-Dec) : Didn't David Johnson have a really good game though?
DarkaneRules (4-Dec) : cardinals run game looks worse than ours
Zero2Cool (4-Dec) : Packers inactives v Texans: WR Trevor Davis CB Makinton Dorleant ILB Blake Martinez OLB Kyler Fackrell RG Lang C Tretter DT Christian Ringo
buckeyepackfan (4-Dec) : GOOD MORNING PACKER FANS! GAMEDAY! GO! PACK! GO!
Zero2Cool (2-Dec) : lol
TheKanataThrilla (2-Dec) : That's a better description Zero thanks.
Zero2Cool (2-Dec) : I wasn't cheering for Cowboys. I was just hoping Vikings lose lol
Smokey (2-Dec) : NFLshop.com
TheKanataThrilla (2-Dec) : Seems best for our divisional prospects
hardrocker950 (2-Dec) : then don't
TheKanataThrilla (2-Dec) : It feels awful to cheer for the Cowboys.
Zero2Cool (30-Nov) : You know you don't have a Google sign in, so ... ahh ... don't click it :-) (having fun with ya)
Laser Gunns (30-Nov) : I don't mean to make the dupe, it happens when I try to sign in using the google account link thing.
Zero2Cool (29-Nov) : Erik Walden has as many sacks as Nick Perry.
Zero2Cool (29-Nov) : Most players fly "home" for offseason.
Porforis (29-Nov) : Or they just don't want to beat their bodies to hell to get a bunch of money and not having stuff around to enjoy with said money
Cheesey (29-Nov) : Well, i guess it just shows who thinks their football job is less important then going out to party.
Zero2Cool (29-Nov) : Green Bay is a smaller town, and it's cold as crap here.
Zero2Cool (29-Nov) : What I've heard and read, more likely true than we care to admit.
hardrocker950 (29-Nov) : If that is true... they don't know what is good for them hehe
Zero2Cool (29-Nov) : That was from Brady Poppinga.
Zero2Cool (29-Nov) : Ted has always been aggressive & proactive in FA.It's just that a lot of big time free agents have taken less to play in bigger cities.
Zero2Cool (29-Nov) : Gunnar, QUIT creating that duplicate account! lol
Zero2Cool (29-Nov) : Reggie ragland was on IR early too.
Zero2Cool (29-Nov) : Seems anyone and everyone related to Packers is hurt lol
wpr (29-Nov) : Boy it's a good thing GB didn't sign Trevthan. Uncle Teddy is a genius. 8-l
The_Green_Ninja (29-Nov) : Silent from Nerdmann tonight :)
Zero2Cool (29-Nov) : Davante Adams turns 6 targets into 5-113-2 in MNF win
Zero2Cool (29-Nov) : Yeehaw
Please sign in to use Fan Shout

2016 Packers Schedule
Sunday, Sep 11 @ 12:00 PM
at Jaguars
Sunday, Sep 18 @ 7:30 PM
at Vikings
Sunday, Sep 25 @ 12:00 PM
LIONS
Sunday, Oct 2 @ 12:00 AM
BYE
Sunday, Oct 9 @ 7:30 PM
GIANTS
Sunday, Oct 16 @ 3:25 PM
COWBOYS
Thursday, Oct 20 @ 7:25 PM
BEARS
Sunday, Oct 30 @ 3:25 PM
at Falcons
Sunday, Nov 6 @ 3:25 PM
COLTS
Sunday, Nov 13 @ 12:00 PM
at Titans
Sunday, Nov 20 @ 7:30 PM
at Redskins
Monday, Nov 28 @ 7:30 PM
at Eagles
Sunday, Dec 4 @ 12:00 PM
TEXANS
Sunday, Dec 11 @ 3:25 PM
SEAHAWKS
Sunday, Dec 18 @ 12:00 PM
at Bears
Saturday, Dec 24 @ 12:00 PM
VIKINGS
Sunday, Jan 1 @ 12:00 PM
at Lions

Think About It
Think About It

Recent Topics
now / Green Bay Packers Talk / Zero2Cool

1h / Green Bay Packers Talk / Zero2Cool

2h / Green Bay Packers Talk / Zero2Cool

3h / Green Bay Packers Talk / beast

4h / Fantasy Sports Talk / Smokey

4h / Green Bay Packers Talk / packerfanoutwest

13h / Green Bay Packers Talk / beast

14h / Green Bay Packers Talk / Cheesey

14h / Green Bay Packers Talk / buckeyepackfan

15h / Green Bay Packers Talk / beast

23h / Green Bay Packers Talk / Zero2Cool

5-Dec / Green Bay Packers Talk / Zero2Cool

4-Dec / Green Bay Packers Talk / wpr

4-Dec / GameDay Threads / nyrpack

4-Dec / Green Bay Packers Talk / nerdmann


Packers Headlines