dhpackr
14 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
14 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
14 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
14 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
14 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
14 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
14 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
14 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
14 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
14 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
Users browsing this topic
    Fan Shout
    Martha Careful (9h) : Z, could you please combine my thread with yours please. I obviously did not see it when I Created it
    Martha Careful (13h) : Re: 'Kool-Aid' McKinstry. Other than Icky Woods, has there ever been a good NFLer with a childish nickname?
    Martha Careful (14h) : Packers looking to trade up
    Martha Careful (16h) : Flag?
    Martha Careful (16h) : Sag?
    Nonstopdrivel (17h) : It rhymes with "bag."
    beast (26-Apr) : Family? That's Deadpool's F word
    Nonstopdrivel (26-Apr) : Not THAT f-word.
    Zero2Cool (26-Apr) : fuck
    beast (25-Apr) : 49ers are Cap Tight
    beast (25-Apr) : Fuck
    Mucky Tundra (25-Apr) : Kanata, I will be when I'm on my lunch later
    TheKanataThrilla (25-Apr) : Love you NSD
    Nonstopdrivel (25-Apr) : Huh. I guess the F-word is censored in this fan shout.
    Nonstopdrivel (25-Apr) : Anyone who doesn't hang out in the chat probably smokes pole.
    TheKanataThrilla (25-Apr) : GoPackGo Thinking CB is the pick tonight
    TheKanataThrilla (25-Apr) : Anyone hanging out in the chat tonight?
    Zero2Cool (25-Apr) : whoa...49ers have had trade conversations about both Deebo Samuel and Brandon Aiyuk
    Zero2Cool (25-Apr) : I hope they take a Punter at 9th overall. Be bold!
    Mucky Tundra (25-Apr) : I may end up eating those words but I think they need a lot more talent then their 4 picks can provide
    Mucky Tundra (25-Apr) : I really hope they stand pat and Draft a WR
    Mucky Tundra (25-Apr) : @DMRussini
    Mucky Tundra (25-Apr) : The Chicago Bears are very open for business at 9 and telling teams they are ready to move for the right price, per source
    buckeyepackfan (24-Apr) : Lions extend Penei Soul 4yrs - 112mil
    buckeyepackfan (24-Apr) : Lions extend St. Brown 4 years 120mil and
    Mucky Tundra (24-Apr) : Now look, trading up to 13 to take a TE might not seem like a good idea later but it will be later!
    dfosterf (24-Apr) : (Your trade up mock post)
    dfosterf (24-Apr) : Mucky- The only thing fun to watch would be me flipping the f out if Gute goes up to 13 and grabs Brock Bowers, lol
    beast (24-Apr) : DT Byron Murphy II, Texas... whom some believe is the next Aaron Donald (or the closest thing to Donald)
    Zero2Cool (24-Apr) : What? And who?
    Mucky Tundra (24-Apr) : *sad Mucky noises*
    Mucky Tundra (24-Apr) : @JoeJHoyt Murphy said he’s been told he won’t slide past pick No. 16.
    wpr (23-Apr) : Just about time to watch Sonny Weaver stick it to the seahags. I never get tired of it.
    Martha Careful (23-Apr) : *game plan
    Martha Careful (23-Apr) : IMHO, not even close. He is not a guy you game play around.
    Mucky Tundra (23-Apr) : is Aiyuk worth a 1st rounder?
    Zero2Cool (23-Apr) : 49ers are seeking a 1st round pick in exchange for WR Brandon Aiyuk
    Mucky Tundra (22-Apr) : Based on Gutes comments, now I don't feel as silly having 13 picks in my mock the other day
    Zero2Cool (22-Apr) : Zach Wilson to Broncos.
    Zero2Cool (22-Apr) : Gutekunst says he'd love to have 13 or 14 picks. He's trading back huh lol
    beast (22-Apr) : Someday we'll have a draft betting scandal
    beast (21-Apr) : Sometimes looking extremely amazing, sometimes looking extremely lost
    beast (21-Apr) : I haven't looked into the QBs, but some have suggested Maye has some of the most extremely inconsistent tape they've seen
    beast (21-Apr) : Well it also sounds like Patriots are listening to trade offers, not that seriously considering any, but listening means they aren't locked
    Zero2Cool (21-Apr) : Maye needs to be AFC
    Mucky Tundra (21-Apr) : Not liking the idea of the Vikings getting Maye
    Zero2Cool (21-Apr) : Vikings HC joked that he may or may not have sent flowers to Bob Kraft. That's where rumor came from.
    beast (21-Apr) : Can't tell if this is real or BS, but some rumors about a possible Patriots/Vikings trade for #3 overall
    dfosterf (21-Apr) : One playbook to my knowledge. I was shooting for facetious.
    beast (20-Apr) : I'm not sure they have different playbooks for different OL positions, and Dillard run blocking is supposedly worse than his pass blocking..
    Please sign in to use Fan Shout
    2023 Packers Schedule
    Sunday, Sep 10 @ 3:25 PM
    Bears
    Sunday, Sep 17 @ 12:00 PM
    Falcons
    Sunday, Sep 24 @ 12:00 PM
    SAINTS
    Thursday, Sep 28 @ 7:15 PM
    LIONS
    Monday, Oct 9 @ 7:15 PM
    Raiders
    Sunday, Oct 22 @ 3:25 PM
    Broncos
    Sunday, Oct 29 @ 12:00 PM
    VIKINGS
    Sunday, Nov 5 @ 12:00 PM
    RAMS
    Sunday, Nov 12 @ 12:00 PM
    Steelers
    Sunday, Nov 19 @ 12:00 PM
    CHARGERS
    Thursday, Nov 23 @ 11:30 AM
    Lions
    Sunday, Dec 3 @ 7:20 PM
    CHIEFS
    Monday, Dec 11 @ 7:15 PM
    Giants
    Sunday, Dec 17 @ 12:00 PM
    BUCCANEERS
    Sunday, Dec 24 @ 12:00 PM
    Panthers
    Sunday, Dec 31 @ 7:20 PM
    Vikings
    Sunday, Jan 7 @ 3:25 PM
    BEARS
    Sunday, Jan 14 @ 3:30 PM
    Cowboys
    Saturday, Jan 20 @ 7:15 PM
    49ers
    Recent Topics
    1h / Green Bay Packers Talk / Mucky Tundra

    2h / Green Bay Packers Talk / Mucky Tundra

    2h / Green Bay Packers Talk / Mucky Tundra

    2h / Green Bay Packers Talk / Mucky Tundra

    3h / Green Bay Packers Talk / Mucky Tundra

    9h / Green Bay Packers Talk / Martha Careful

    13h / Green Bay Packers Talk / beast

    13h / Green Bay Packers Talk / beast

    22h / Green Bay Packers Talk / Zero2Cool

    26-Apr / Green Bay Packers Talk / Nonstopdrivel

    25-Apr / Green Bay Packers Talk / beast

    25-Apr / Green Bay Packers Talk / buckeyepackfan

    25-Apr / Green Bay Packers Talk / bboystyle

    24-Apr / Random Babble / beast

    22-Apr / Green Bay Packers Talk / Mucky Tundra

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