Can't load variables from helper in controller, help is appreciated. |
[eluser]psychonetics[/eluser]
What I'm trying to do I have a date dropdown on my signup form for my website. PHP is used to generate the dropdown data. Rather than have the data in my controller I put it in a helper because I will want to use it again through out my website. Below is a copy of the code on my controller, helper and view. I have also copied and pasted the text from my browser when I load my signup form page. Controller Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); controller: Code: <?php Code: <!DOCTYPE html> Here's the message i get when I load my page with the form on it.. A PHP Error was encountered Severity: Notice Message: Undefined property: Join::$datepicker Filename: controllers/join.php Line Number: 18 Fatal error: Call to a member function getdate() on a non-object in /**my file path**/ on line 18 So I see some variable(s) is/are not defined. I've been googling all day and finally decided to post and get some help. Thanks in advance
[eluser]bobbob[/eluser]
Have you thought of using jquery ui's datepicker? It is so easy to implement. Then very easy to handle in your controller. http://jqueryui.com/demos/datepicker/
[eluser]psychonetics[/eluser]
Yep but I would have to do some customization to make just the drop down show.. for now I would prefer to learn what I'm doing wrong so I can use it to help me in the future with other tasks. |
Welcome Guest, Not a member yet? Register Sign In |