dhpackr
15 years ago

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 :)

"Zero2Cool" wrote:



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
<input name='rdoGame01' type='radio' value='Titans' />Tenneesee Titans
<input name='rdoGame01' type='radio' value='Steelers'/>Pittsburgh

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

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

<input type="radio" name="rdoGame01" value="0" class="textbox"<?if($rdoGame01=="0"){echo " checked ";}?>> Steelers
?>
So if you meet me Have some courtesy, Have some sympathy, and some taste
Use all your well-learned politesse, Or I'll lay your soul to waste
Zero2Cool
15 years ago

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 :)

"dhpackr" wrote:



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?

"Zero2Cool" wrote:



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. 🙂
UserPostedImage
dhpackr
15 years ago

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 :)

"Zero2Cool" wrote:



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?

"dhpackr" wrote:



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. :)

"Zero2Cool" wrote:



look at post above this one^^^^^^^^^^^^^^^^^^^^^^^^^^ ^
So if you meet me Have some courtesy, Have some sympathy, and some taste
Use all your well-learned politesse, Or I'll lay your soul to waste
dhpackr
15 years ago
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
So if you meet me Have some courtesy, Have some sympathy, and some taste
Use all your well-learned politesse, Or I'll lay your soul to waste
Zero2Cool
15 years ago
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
UserPostedImage
dhpackr
15 years ago
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
So if you meet me Have some courtesy, Have some sympathy, and some taste
Use all your well-learned politesse, Or I'll lay your soul to waste
Zero2Cool
15 years ago
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?
UserPostedImage
dhpackr
15 years ago

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?

"Zero2Cool" wrote:



yes and spit that error. but that is just code for two buttons, you need to add code for all 16
So if you meet me Have some courtesy, Have some sympathy, and some taste
Use all your well-learned politesse, Or I'll lay your soul to waste
Zero2Cool
15 years ago

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?

"dhpackr" wrote:



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

"Zero2Cool" wrote:



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

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

"dhpackr" wrote:



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.
UserPostedImage
Zero2Cool
15 years ago
[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]
UserPostedImage
Fan Shout
Mucky Tundra (1h) : Mahomes Magic baby! *cough*
TheKanataThrilla (1h) : KC the luckiest team in the league
Zero2Cool (5h) : Frigging host issues for site again
beast (5h) : For the first time in their long history, the Bears fire their head coach mid-season. Which comes after three very close in-division losses.
Zero2Cool (23h) : At the game now. Kampman and Cullen Jenkins are here.
buckeyepackfan (23h) : Happy Thanksgiving Packer Fans! Gonna celebrate with some grilled Dolphin later!
buckeyepackfan (23h) : Inactive 23 CB Jaire Alexander 56 LB Edgerrin Cooper 62 OL Jacob Monk 87 WR Romeo Doubs
dhazer (23h) : Just a talking point, do we try and trade Jaire next year to get out from the contract as he can't stay healthy
Zero2Cool (28-Nov) : Happy Thanksgiving! About to head to game.
wpr (28-Nov) : Happy Thanksgiving
Martha Careful (28-Nov) : Happy Thanksgiving Everybody...Go Packers!!!
Zero2Cool (28-Nov) : That is what a lot of people seem to think. Even though when he was on Giants, he was trash.
Martha Careful (27-Nov) : Brilliant move by Vikings!!! The signing provide great leverage in Darnold negotiations
Mucky Tundra (27-Nov) : Boo!
Zero2Cool (27-Nov) : Packers have ruled out Jaire Alexander, Edgerrin Cooper, and Romeo Doubs for Thursday's game against the Dolphins.
Zero2Cool (27-Nov) : Daniel Jones joins Vikings
Zero2Cool (27-Nov) : Tomorrow high 32° and low 19°
beast (27-Nov) : Thanks Mucky!
Mucky Tundra (27-Nov) : beast, forecast is looking like 27-28 degrees at kickoff, slight chance of snow flurries
Zero2Cool (27-Nov) : Oh? It wasn't on the injury report. That sucks, but it's what is best.
packerfanoutwest (26-Nov) : Doubs is out due to concussion
beast (26-Nov) : What does the weather look like?
Martha Careful (26-Nov) : You can wear long-johns mittens and a hat. We want Hill and their other skill guys FROZEN
Zero2Cool (26-Nov) : I'm not sure I hope for that. I'll be at the game.
Martha Careful (25-Nov) : I hope it is colder than a well-diggers ass on Thanksgiving night.
Zero2Cool (25-Nov) : doubt he wants to face the speedsters
beast (25-Nov) : Dolphins offense can be explosive... I wonder if we'll have Alexander back
Zero2Cool (25-Nov) : No Doubs could be issue Thursday
Mucky Tundra (25-Nov) : Bears. Santos. Blocked FG
Zero2Cool (24-Nov) : Bears. Vikings. OT
Mucky Tundra (24-Nov) : Thems the breaks I guess
Mucky Tundra (24-Nov) : Two players out and Williams had an injury designation this week but Oladapo is a healthy scratch
Zero2Cool (24-Nov) : Packers inactives vs 49ers: • CB Jaire Alexander • S Kitan Oladapo • LB Edgerrin Cooper • OL Jacob Monk
TheKanataThrilla (24-Nov) : Aaron Jones with a costly red zone fumble
Zero2Cool (24-Nov) : When we trade Malik for a 1st rounder, we'll need a new QB2.
packerfanoutwest (23-Nov) : Report: Aaron Rodgers wants to play in 2025, but not for the Jets
beast (23-Nov) : That's what I told the Police officer about my speed when he pulled me over
packerfanoutwest (23-Nov) : NFL told Bears that Packers’ blocked field goal was legal
packerfanoutwest (22-Nov) : 49ers are underdogs at Packers, ending streak of 36 straight games as favorites
Zero2Cool (22-Nov) : 49ers might be down their QB, DL, TE and LT?
packerfanoutwest (22-Nov) : Jaire Alexander says he has a torn PCL
Zero2Cool (20-Nov) : Even with the context it's ... what?
Mucky Tundra (20-Nov) : Matt LaFleur without context: “I don’t wanna pat you on the butt and you poop in my hand.”
beast (20-Nov) : We brought in a former Packers OL coach to help evaluate OL as a scout
beast (20-Nov) : Jets have been pretty good at picking DL
Zero2Cool (20-Nov) : He landed good players thanks to high draft slot. He isn't good.
Zero2Cool (20-Nov) : He can shove his knowledge up his ass. He knows nothing.
beast (20-Nov) : More knowledge, just like bring in the Jets head coach
Zero2Cool (19-Nov) : What? Why? Huh?
beast (19-Nov) : I wonder if the Packers might to try to bring Douglas in through Milt Hendrickson/Ravens connections
Please sign in to use Fan Shout
2024 Packers Schedule
Friday, Sep 6 @ 7:15 PM
Eagles
Sunday, Sep 15 @ 12:00 PM
COLTS
Sunday, Sep 22 @ 12:00 PM
Titans
Sunday, Sep 29 @ 12:00 PM
VIKINGS
Sunday, Oct 6 @ 3:25 PM
Rams
Sunday, Oct 13 @ 12:00 PM
CARDINALS
Sunday, Oct 20 @ 12:00 PM
TEXANS
Sunday, Oct 27 @ 12:00 PM
Jaguars
Sunday, Nov 3 @ 3:25 PM
LIONS
Sunday, Nov 17 @ 12:00 PM
Bears
Sunday, Nov 24 @ 3:25 PM
49ERS
Thursday, Nov 28 @ 7:20 PM
DOLPHINS
Thursday, Dec 5 @ 7:15 PM
Lions
Sunday, Dec 15 @ 7:20 PM
Seahawks
Monday, Dec 23 @ 7:15 PM
SAINTS
Sunday, Dec 29 @ 12:00 PM
Vikings
Saturday, Jan 4 @ 11:00 PM
BEARS
Recent Topics
1h / Green Bay Packers Talk / Mucky Tundra

3h / Green Bay Packers Talk / bboystyle

5h / Green Bay Packers Talk / Mucky Tundra

12h / Green Bay Packers Talk / wpr

27-Nov / Green Bay Packers Talk / beast

26-Nov / Featured Content / Martha Careful

26-Nov / Green Bay Packers Talk / Mucky Tundra

25-Nov / Green Bay Packers Talk / Zero2Cool

25-Nov / Green Bay Packers Talk / buckeyepackfan

24-Nov / Green Bay Packers Talk / buckeyepackfan

24-Nov / GameDay Threads / Zero2Cool

23-Nov / Green Bay Packers Talk / dfosterf

23-Nov / Green Bay Packers Talk / Zero2Cool

21-Nov / Green Bay Packers Talk / Martha Careful

21-Nov / Green Bay Packers Talk / Zero2Cool

Headlines
Copyright © 2006 - 2024 PackersHome.com™. All Rights Reserved.