T
|
thesofa 2/3/2007 |
I have PHPRunner 3.1 build 207 From the registration page I have a dropdown menu where the user selects an option such as their school. I want their selection in this option to write data into two other fields TeamCode and TeamName when they click the register button. Does anyone know how I would do this? Thanks
|
R
|
run4sbc author 2/3/2007 |
Ok, but how would I code it so that if the dropdown item selected is Arkansas it inserts TeamCode ARK and inserts TeamName Arkansas |
T
|
thesofa 2/3/2007 |
Ok, but how would I code it so that if the dropdown item selected is Arkansas it inserts TeamCode ARK and inserts TeamName Arkansas Selected Item Arkansas TeamCode = ARK TeamName = Arkansas I want it to automatically insert the data automatically based on the dropdown menu. I just dont have any idea how the code would work, but I know where it would need to go.
|
R
|
run4sbc author 2/3/2007 |
Here is the registration page |
T
|
thesofa 2/3/2007 |
Here is the registration page http://www.trackmeetsonline.com/07IndoorMe...ge/register.php When you select an item from the dropdown menu under school I want it to then write data into the protection table under the TeamCode and TeamName fields. I want to set the TeamCode and TeamName fields in the coding for them to be stored in the database when the corresponding school from the registration table is selected. So when they pick a school it saves this data secretly where the user cannot edit it. So kinda like this. If school=Arkansas then savedata TeamCode ARK savedata TeamName Arkansas Something like that. I spose it is a beatiful day in the usa? |
R
|
run4sbc author 2/3/2007 |
It wasnt a bad day. I spent most of it driving home from New York City. Thanks for the help, I'll work with it some more and see what I come up with. |
J
|
Jane 2/5/2007 |
Hi, function AfterSuccessfulRegistration() { global $conn,$strTableName; $str = "select school from ".$strTableName." where Username='".$_SESSION["UserID"]."'"; $rs = db_query($str,$conn); $data = db_fetch_array($rs); $teamcode = strtoupper(substr($data["school"],0,3)); $strUpdate = "update ".$strTableName." set TeamCode='".$teamcode."', TeamName='".$data["school"]."' where Username='".$_SESSION["UserID"]."'"; db_exec($strUpdate,$conn); }
|
R
|
run4sbc author 2/5/2007 |
Thanks Jane. I used the lookup tables and it worked fine. But thanks for the help!! |