NEW
#51

dhpackr
Registered
Joined: Dec 12, 2007
Posts: 963

dhpackr
Registered
Joined:Dec 12, 2007
Posts:963
"Zero2Cool"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
<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
?>
0
SlickVision, Methodikal, Kevin and 5 others
NEW
#52

Zero2Cool
Elite Member
Joined: Oct 14, 2006
Posts: 44,952

Zero2Cool
Elite Member
Joined:Oct 14, 2006
Posts:44,952
"dhpackr""Zero2Cool"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. :)
0
SlickVision, Methodikal, Kevin and 5 others
NEW
#53

dhpackr
Registered
Joined: Dec 12, 2007
Posts: 963

dhpackr
Registered
Joined:Dec 12, 2007
Posts:963
"Zero2Cool""dhpackr""Zero2Cool"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^^^^^^^^^^^^^^^^^^^^^^^^^^ ^
0
SlickVision, Methodikal, Kevin and 5 others
NEW
#54

dhpackr
Registered
Joined: Dec 12, 2007
Posts: 963

dhpackr
Registered
Joined:Dec 12, 2007
Posts:963
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
that is not a dynamic database driven form
0
SlickVision, Methodikal, Kevin and 5 others
NEW
#55

Zero2Cool
Elite Member
Joined: Oct 14, 2006
Posts: 44,952

Zero2Cool
Elite Member
Joined:Oct 14, 2006
Posts:44,952
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
0
SlickVision, Methodikal, Kevin and 5 others
NEW
#56

dhpackr
Registered
Joined: Dec 12, 2007
Posts: 963

dhpackr
Registered
Joined:Dec 12, 2007
Posts:963
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
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
0
SlickVision, Methodikal, Kevin and 5 others
NEW
#57

Zero2Cool
Elite Member
Joined: Oct 14, 2006
Posts: 44,952

Zero2Cool
Elite Member
Joined:Oct 14, 2006
Posts:44,952
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?
I'm guessing the function will return a value of false if not all games are selected?
0
SlickVision, Methodikal, Kevin and 5 others
NEW
#58

dhpackr
Registered
Joined: Dec 12, 2007
Posts: 963

dhpackr
Registered
Joined:Dec 12, 2007
Posts:963
"Zero2Cool"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
0
SlickVision, Methodikal, Kevin and 5 others
NEW
#59

Zero2Cool
Elite Member
Joined: Oct 14, 2006
Posts: 44,952

Zero2Cool
Elite Member
Joined:Oct 14, 2006
Posts:44,952
"dhpackr""Zero2Cool"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.
"dhpackr"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.
0
SlickVision, Methodikal, Kevin and 5 others
NEW
#60

Zero2Cool
Elite Member
Joined: Oct 14, 2006
Posts: 44,952

Zero2Cool
Elite Member
Joined:Oct 14, 2006
Posts:44,952
[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]
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]
0
SlickVision, Methodikal, Kevin and 5 others