rugzo Posted March 8, 2009 Share Posted March 8, 2009 Hi all, i am trying to include a datepicker into my registration form. On the same page i have signindate, birthday, resigndate... The first date picker works without problem, but in the second line i get an error instead of the picker which says: Fatal error: Cannot redeclare class datePicker in C:\xampp\htdocs\class.datepicker.PHP on line 33 What can i do to redeclare the class.datepicker.php. So far as i understand it can not recall the class.datepicker.php. thanks in advance... Link to comment https://forums.phpfreaks.com/topic/148471-solved-cannot-redeclare/ Share on other sites More sharing options...
Mark Baker Posted March 8, 2009 Share Posted March 8, 2009 You don't redeclare the class: you declare it once and instantiate it multiple times. Link to comment https://forums.phpfreaks.com/topic/148471-solved-cannot-redeclare/#findComment-779591 Share on other sites More sharing options...
waynew Posted March 8, 2009 Share Posted March 8, 2009 Use require_once when importing class files. Link to comment https://forums.phpfreaks.com/topic/148471-solved-cannot-redeclare/#findComment-779613 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.