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
    buckeyepackfan (13h) : Lions extend Penei Soul 4yrs - 112mil
    buckeyepackfan (13h) : Lions extend St. Brown 4 years 120mil and
    Mucky Tundra (14h) : Now look, trading up to 13 to take a TE might not seem like a good idea later but it will be later!
    dfosterf (16h) : (Your trade up mock post)
    dfosterf (17h) : 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 (20h) : DT Byron Murphy II, Texas... whom some believe is the next Aaron Donald (or the closest thing to Donald)
    Zero2Cool (21h) : 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..
    dfosterf (19-Apr) : The only problem with that is he isn't a guard either.
    dfosterf (19-Apr) : Put him at right guard. That is where he will be coached. That is where he will compete. He is not even allowed to look at the LT playbook.
    dfosterf (18-Apr) : Kidding aside, I hope the best for him.
    dfosterf (18-Apr) : Went to a Titans board. One comment there. Not very long. I quote: "LOL" They don't sound overly upset about our aquisition.
    beast (18-Apr) : OT Dillard has been absolutely horrible... like OG Newman levels
    dfosterf (18-Apr) : Suit him up and have him stand in front of the big board as a draft day cautionary tale.
    Zero2Cool (18-Apr) : Packers sign T Andre Dillard.
    Mucky Tundra (18-Apr) : Adds most of the information this time of year comes from agents.
    Mucky Tundra (18-Apr) : @RealAlexBarth Bill Belichick says accurate draft information doesn't leak from teams until about 12 hours before the draft. Adds most of th
    Mucky Tundra (18-Apr) : I am very happy that for moment, Jordan Love seems like a normal human being
    Zero2Cool (17-Apr) : Belichick * whatever
    Zero2Cool (17-Apr) : "There's a lot of depth at Offensive Tackle and Wide Receiver." Bill Bellichick
    Zero2Cool (17-Apr) : Thanks! I can't believe it's over haha
    Martha Careful (16-Apr) : Congratulations
    Zero2Cool (16-Apr) : Boom. Student Loan. $0.00. Only took about 20 years.
    Zero2Cool (14-Apr) : Packers DT Kenny Clark: New defensive coordinator Jeff Hafley will 'allow us to be way more disruptive'
    Zero2Cool (12-Apr) : Saints have agreed to terms on a contract with former Packers wide receiver Equanimeous St. Brown.
    beast (12-Apr) : No, but of it's for legislation, then half of the country will find it evil, not good, whatever it says....
    Mucky Tundra (12-Apr) : Draft is still 2 weeks away. UGH
    dhazer (11-Apr) : Does anyone know of a good AI generator to create letters of Support for legislation?
    Zero2Cool (11-Apr) : Gordon "Red" Batty retires as equipment manager
    Zero2Cool (10-Apr) : Sounds like that's pretty certain now.
    Zero2Cool (10-Apr) : Packers "at" Eagles in Brazil. Week One
    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

    7h / Green Bay Packers Talk / bboystyle

    12h / Green Bay Packers Talk / Mucky Tundra

    15h / Random Babble / beast

    22-Apr / Green Bay Packers Talk / Mucky Tundra

    21-Apr / Fantasy Sports Talk / dfosterf

    21-Apr / Green Bay Packers Talk / dfosterf

    19-Apr / Random Babble / Zero2Cool

    18-Apr / Green Bay Packers Talk / Zero2Cool

    18-Apr / Random Babble / Mucky Tundra

    18-Apr / Green Bay Packers Talk / Mucky Tundra

    17-Apr / Green Bay Packers Talk / Mucky Tundra

    17-Apr / Green Bay Packers Talk / Mucky Tundra

    17-Apr / Green Bay Packers Talk / beast

    17-Apr / Green Bay Packers Talk / beast

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