04-29-2017, 05:48 PM
Do you require the fields to be seen by the user? If you use the dropdown to display the information to the user, e.g. $company -> $firstname $lastname, and then in the post you can run .
So in your post:
Basically this will take the value of your select, which you seem to have figured out, then when you POST, it will populate the first and last name by grabbing the value from the table.
If you need the user to see the values, I will see what I can pull together for ya. But I think if they don't need to edit it, why do they need to see it before the form is submitted?
Code:
SELECT * FROM permsOp where company = ?, array($company)
So in your post:
Code:
$company = Input::get('company');
Code:
$Q = $db->query("SELECT * FROM tablename WHERE company = ?,array($company));
Code:
$result = $Q->first();
Code:
$firstname = $result->firstname;
Code:
$lastname = $result->lastname;
Basically this will take the value of your select, which you seem to have figured out, then when you POST, it will populate the first and last name by grabbing the value from the table.
If you need the user to see the values, I will see what I can pull together for ya. But I think if they don't need to edit it, why do they need to see it before the form is submitted?