This topic is locked

select value from dropdown list based

5/22/2017 8:55:38 PM
PHPRunner General questions
R
rchugha author

HI,
i got Vendor table with column: Vendor ID, Vendor Name, Vendor address, on add page (vendor_Add.php). once I save the data on Add page. I am using below code to go to add page of another table so that user can specify default setting for vendor.
After Record Added: event of Vendor Add Page

header("Location: default_vendor_settings_add.php");

exit();
on default_vendor_settings_add.php:

I have fields : Vendor (which is drop down list of vendor table), Default Expense Type, Default Contact Name.
Now the issue: with above code it takes me to default_vendor_settings_add.php but user has to select the Vendor Name form the list but i want to get auto selected based on the last vendor added before getting to this page.
Is there any way that i can pass the Vendor ID from Vendor_Add.php to Vendor field on default_vendor_settings_add.php ?
please help
thanks

jadachDevClub member 5/22/2017

Try creating a session variable after record added then use that session variable as default on the second add page.