|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
SitePoint Zealot
![]() ![]() Join Date: Jun 2005
Posts: 123
|
States' names do not appear in the dropdown list.
i created a class named ECISState in a single file named ecisstate.php. then i include the file in the common.php where all classes' files are included here. i have called 1 of the function in the ECISState in common.php. then, i failed to load all the states' names in the dropdown list in the employer_block.php. did i called the loadState function wrongly?
ecisstate.php PHP Code:
PHP Code:
PHP Code:
|
|
|
|
|
|
#2 |
|
SitePoint Wizard
![]() Join Date: Feb 2005
Location: Universum, 3rd Corner
Posts: 3,760
|
You function should return $state array.
PHP Code:
|
|
|
|
|
|
#3 |
|
SitePoint Zealot
![]() ![]() Join Date: Jun 2005
Posts: 123
|
i have tried your code jelena, but it only works if i put everything in a single file. the structure of system is like this. employer_block.php is in the different folder.
ecis ---- |_folder: include ->common.php, ecisstate.php, etc. |_folder: templates ->employer_block.php, etc. |_file: index.php, etc. all classes will be included in common.php PHP Code:
|
|
|
|
|
|
#4 |
|
SitePoint Wizard
![]() Join Date: Feb 2005
Location: Universum, 3rd Corner
Posts: 3,760
|
Well, you have to include common.php in template files or in files which include template files.
|
|
|
|
|
|
#5 |
|
Wadge!
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Oct 2005
Location: South Wales, UK
Posts: 1,148
|
Make $state a global variable too.
PHP Code:
|
|
|
|
|
|
#6 |
|
SitePoint Zealot
![]() ![]() Join Date: Jun 2005
Posts: 123
|
sorry, i am confusing actually. for example, in common.php, i have initiated
PHP Code:
but anyway, thanks guys. i will fix it the rest. |
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 18:19.










Hybrid Mode
