dhpackr
15 years ago
first, you need to write a validation function to ensure each radio button has been selected.

you have given each radio button its own variable in the database?? right.

its game time, and i am drinkin and eatin tacos.

after the game i may do some fishin.

Monday, when i get some time, i'll post some code for radio buttons, validation, and mysql.

unless you get it before hand.

go packers
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 won't have it before hand, lol. 🙂
UserPostedImage
zombieslayer
15 years ago

Okay, effective, umm, now. No more host switching until next off season. I'm going to focus on learning PHP in a similar fashion that I know ASP.NET.

Click HERE  to see the page.


Building the form, easy.
Coding the connection to the database, easy.
Grabbing the values from the radio buttons and storing them into variables to transfer to a database, kicking my ass.

I think I'm attacking this wrong because I'm using HTML code, but shouldn't I be able to use straight PHP code throughout?


Edit, here's how I'm starting out ...
http://w3schools.com/php/php_syntax.asp 

lol

"Zero2Cool" wrote:



Zero - If you were here in SF, you could get pretty good jobs knowing PHP pretty well. ASP not so much.
My man Donald Driver
UserPostedImage
(thanks to Pack93z for the pic)
2010 will be seen as the beginning of the new Packers dynasty. 🇹🇹 🇲🇲 🇦🇷
dhpackr
15 years ago

Okay, effective, umm, now. No more host switching until next off season. I'm going to focus on learning PHP in a similar fashion that I know ASP.NET.

Click HERE  to see the page.


Building the form, easy.
Coding the connection to the database, easy.
Grabbing the values from the radio buttons and storing them into variables to transfer to a database, kicking my ass.

I think I'm attacking this wrong because I'm using HTML code, but shouldn't I be able to use straight PHP code throughout?


Edit, here's how I'm starting out ...
http://w3schools.com/php/php_syntax.asp 

lol

"zombieslayer" wrote:



Zero - If you were here in SF, you could get pretty good jobs knowing PHP pretty well. ASP not so much.

"Zero2Cool" wrote:



PHP ASP both scripting languages. I could work on apllications in San Fran from WI
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
When submit clicked, check all games to ensure a selection has been made, if all selected, send each selection to database, if one or more was missing, indicate that to the user.

once all are sent, I'd like it to say

Zero2Coo's Winners for Week 01
Packers
Lions
etc


That's what I'm going for.
UserPostedImage
dhpackr
15 years ago
ok mind you i got 4 beers and three shots in me, and i'm gonna hack this during half time

some basic php from the top of my head
?> ----start PHP
<tr>
<td >Your Pick<font color=red>*</font>:</td>
<td>
<input type="radio" name="dhpackr" value="1" class="textbox"<?if($dhpackr=="1"){echo " checked ;}?>> Packers<br>
<input type="radio" name="dhpackr" value="0" class="textbox"<?if($dhpackr=="0"){echo " checked ";}?>> Bengals

</td>

</tr>

<?---end PHP
game on i gota go, but There is an exAMPLE of using a PHP scriipt to add an radio selection
this will echo out your selection.
add the dhpackr to your select/insert mysql statement and you would need a different variable for each selection.
some basic 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->dhpackr==""){
$is_valid=false;
$this->add_error('Make a selection!');
}
return $is_valid;

}

this project would take some serous maintanence
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
i see some of ur errors now. if i could see the code i think i could make some progress
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
Errors? I haven't tried coding it yet.

I don't know exactly how to go about what I want to do, yet.


I attached the file in question for ya.


When the page is loaded,

Check username for that week (tbl2009Week01) and to see if they have a selection made for game 01.
if selection found,
display "Usernames seslected winners for Week 01"
if selection not found,
display table of all games,
when submit button clicked, check to see if all games have a selection,
if all games are selected,
send selection one by one to db,
if all games are not selected,
alert user and request all selections to be made


Sound reasonable or am I being foolish?
UserPostedImage
dhpackr
15 years ago

Errors? I haven't tried coding it yet.

I don't know exactly how to go about what I want to do, yet.


I attached the file in question for ya.


When the page is loaded,

Check username for that week (tbl2009Week01) and to see if they have a selection made for game 01.
if selection found,
display "Usernames seslected winners for Week 01"
if selection not found,
display table of all games,
when submit button clicked, check to see if all games have a selection,
if all games are selected,
send selection one by one to db,
if all games are not selected,
alert user and request all selections to be made


Sound reasonable or am I being foolish?

"Zero2Cool" wrote:



no that is cool w/a few changes

i would create a new login page and new username and passwords.

you would have a form and have two fields username and password and the ability to create a new user as well

so....when a member clicked NFL Picks, it would take them to a login page.
the user could enter their username and password or create a new username and password. once they enter their username and password the would click a button this would take them to the weeks picks page.
you would have to change the text on the form every week
the picks could be entered into the db table based on their memberid. you would make this the primary key in the database and auto increment. so when the end user logs in, they are going to a weeks page that is unique to their id,

so their picks would be entered based on their login name.

so your page may look li ke this

?> ----start PHP
<tr>
<td >Pick1<font color=red>*</font>:</td>
<td>
<input type="radio" name="Pick1" value="1" class="textbox"<?if($Pick1=="1"){echo " checked ;}?>> Packers<br>
<input type="radio" name="Pick1" value="0" class="textbox"<?if($Pick1=="0"){echo " checked ";}?>> Bengals

</td>

</tr>


?> ----start PHP
<tr>
<td >Pick2<font color=red>*</font>:</td>
<td>
<input type="radio" name="Pick2" value="1" class="textbox"<?if($Pick2=="1"){echo " checked ;}?>> Vikings<br>
<input type="radio" name="Pick2" value="0" class="textbox"<?if($Pick2=="0"){echo " checked ";}?>> Lions

</td>

</tr>
and so on for 16 games, so you'll need 16 different variables in your database table.

the validation to make sure all picks are made

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->pick1=="" or $this->pick2=="" ){
$is_valid=false;
$this->add_error('Make a selection!');
}
return $is_valid;

}


the first part of code goes in your template file

the validation goes in your class file

do you have the functionality where those radio button selections are being stored in a db table, and then saved to a form b/c that is next. i can work on that 2moro.

this code can be displayed on another page that would display/confirm their picks
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 🙂
UserPostedImage
Fan Shout
Mucky Tundra (5h) : It's the offseason and the draft is still nearly 2 months away, what can ya do?🤷‍♂️
Zero2Cool (27-Feb) : NFL teams were notified today that the 2025 salary cap has been set at $279,200,000 per club.
Zero2Cool (27-Feb) : sssllllooooow
Martha Careful (27-Feb) : is it just me, or has the website been slow the last couple of days?
buckeyepackfan (26-Feb) : Damnit 2026 2nd rnd pick!
buckeyepackfan (26-Feb) : Packers get Myles Garret and Browns 2926 2nd rnd pick.
buckeyepackfan (26-Feb) : Browns get Jaire, + Packers #1 2025 pick and 2026 3rd rnd pick.
beast (26-Feb) : Rams trying to trade Stafford and Kupp, then signing Rodgers and Adams? Just speculation, but interesting
Zero2Cool (26-Feb) : Packers shopping Jaire Alexander per Ian Rapoport
Zero2Cool (25-Feb) : Gutekunst and Jaire Alexander’s agent, John Thornton, are meeting this week in Indianapolis to determine the future of the Packers’ 28-year-
Zero2Cool (25-Feb) : Gutekunst says Mark Murphy told him he can trade their first-round pick despite the draft being in Green Bay.
Zero2Cool (24-Feb) : Packers. 🤦
Zero2Cool (24-Feb) : One team.
Zero2Cool (24-Feb) : One team petition NFL to ban Brotherly Shove.
beast (23-Feb) : Seems like he was just pissed because he was no longer the starter
beast (23-Feb) : Campbell is right, he's rich and he doesn't have to explain sh!t... but that attitude gives teams reasons to never sign him again.
dfosterf (22-Feb) : I have some doubt about all that
dfosterf (22-Feb) : I read De'Vondre Campbell's tweet this morning (via the New York Post) Florio says that if he invested his earnings wisely, he will be good
beast (20-Feb) : I haven't followed, but I believe he's good when healthy, just hasn't been able to stay healthy.
dfosterf (20-Feb) : Hasn"t Bosa missed more games than he has played in the last 3 years?
Mucky Tundra (19-Feb) : He hasn't been too bad when healthy but I don't feel like I ever heard much about when he is
Zero2Cool (19-Feb) : Felt like he was more interested in his body, than football. He flashed more than I expected
Zero2Cool (19-Feb) : When he was coming out, I thought he'd be flash in pan.
Mucky Tundra (19-Feb) : Joey seems so forgettable compared to his brother for some reason
Zero2Cool (19-Feb) : NFL informed teams today that the 2025 salary cap will be roughly $277.5M-$281.5M
Zero2Cool (19-Feb) : Los Angeles Chargers are likely to release DE Joey Bosa this off-season as a cap casualty, per league source.
Zero2Cool (18-Feb) : If the exploit is not fixed, we'll see tons of "50 top free agents, 50 perfect NFL team fits: We picked where each should sign in March" lo
Zero2Cool (18-Feb) : Issue should be solved, database cleaned and held strong working / meeting. Boom!
Zero2Cool (18-Feb) : It should be halted now.
Mucky Tundra (18-Feb) : usually spambots are trying to get traffic to shady websites filled with spyware; the two links being spammed were to the Packers website
Mucky Tundra (18-Feb) : you know when you put it that way combined with the links it was spamming (to the official Packers website)
Zero2Cool (18-Feb) : Yep. You can do that with holding down ENTER on a command in Console of browser
Mucky Tundra (18-Feb) : even with the rapid fire posts?
Zero2Cool (18-Feb) : I'm not certain it's a bot.
Mucky Tundra (18-Feb) : I've got to go to work soon which is a pity because I'm enthralled by this battle between the bot and Zero
Zero2Cool (18-Feb) : Yeah, I see what that did. Kind of funny.
Mucky Tundra (18-Feb) : now it's a link to Wes Hodkiezwicz mailbag
Mucky Tundra (18-Feb) : Now they're back with another topic
Mucky Tundra (18-Feb) : oh lol
Zero2Cool (18-Feb) : I have a script that purges them now.
Zero2Cool (18-Feb) : 118 Topics with Message.
Mucky Tundra (18-Feb) : what's 118 (besides a number)?
Zero2Cool (18-Feb) : They got 118 slapped in there.
Mucky Tundra (18-Feb) : that's why it confused the hell out of me
Zero2Cool (18-Feb) : Yeah, but this is taking a headline and slapping it into the Packers Talk
Mucky Tundra (18-Feb) : Wasnt there a time guests could post in the help forum?
Zero2Cool (18-Feb) : lol good question, kind of impressed!
Mucky Tundra (18-Feb) : So how is a guest posting?
Mucky Tundra (18-Feb) : Tell them its an emergency
Zero2Cool (18-Feb) : Working. Meetings.
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 @ 3:25 PM
Vikings
Sunday, Jan 5 @ 12:00 PM
BEARS
Sunday, Jan 12 @ 3:30 PM
Eagles
Recent Topics
42m / Green Bay Packers Talk / Zero2Cool

2h / Green Bay Packers Talk / Zero2Cool

2h / Green Bay Packers Talk / Zero2Cool

6h / Green Bay Packers Talk / Zero2Cool

7h / Around The NFL / Martha Careful

27-Feb / Green Bay Packers Talk / Zero2Cool

27-Feb / Green Bay Packers Talk / wpr

26-Feb / Green Bay Packers Talk / beast

26-Feb / Green Bay Packers Talk / buckeyepackfan

24-Feb / Green Bay Packers Talk / bboystyle

24-Feb / Green Bay Packers Talk / Zero2Cool

23-Feb / Green Bay Packers Talk / beast

19-Feb / Green Bay Packers Talk / Zero2Cool

19-Feb / Green Bay Packers Talk / MintBaconDrivel

18-Feb / Green Bay Packers Talk / Zero2Cool

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