Hi, thanks for your series. I've begun working through them and have run into some early trouble. Is there anything in the 2.1.0 release that would affect this tutorial?
@JABevan Hi mate - yes there is... The way models and controllers are declared has changed slightly. Also the constructor is slightly different. Have a read of this codeigniter [dot] com/user_guide/installation/upgrade_200.html to see what you need to do differently...
@JABevan Dunno mate? You can shoot me through your code if you like and I will give it a once over... Send it to my email address or via the contact form on simplycodeigniter site
I think it'd be great if you could put the version of CodeIgniter in the description so that things are a little bit future-proofed. I know that the video tutorials on the CI website are considered deprecated, but the lessons are still valid. Same could be said for you videos once CI has progressed further, I think.
Hey, i'm trying to learn using Ci, but i have one problem Call to undefined function base_url() in MyHost/Ci/application/controllers/user.php on line 8
( i wrote url and form to autoload, but nothing changes ) Any ideas? :)
@TheUfonautas Hi mate - sorry I missed your question sooner! You need to autoload the "url" helper.
Rather than use $this->['base_url'] = base_url() in your constructor... I tend to just use base_url() when I need it now rather than sending it through to the view as a variable. Also see Gerrrrrrrry's comment below - you don't need it in anchor tags ie; echo anchor('controller/function', 'title', array('properties')) is sufficient...
You can leave out the url helper and the setting of the base url as calling form_open without arguments will just set the action to blank which will make the form redirect to the same page.
Hi, I'm new to CI and am just trying to follow this tutorial. I believe I did everything correct but I'm getting this message every time I click on the Register button:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: User::$view_data
Filename: controllers/user.php
Line Number: 11
There's also another notice, saying the 'base_url' is an undefined variable. Is there something I need to do to get rid of these 'notices'? Thanks much!
@lyndr29 Not sure what the problem is without seeing the source code. Contact me through simplycodeigniter website and I will reply. You can then email me your code. Otherwise - check that you have used $this->view_data['something'] = 'something'; before using it in the $this->load->view('view_name', $this->view_data)
With base_url prob - use the function base_url() - not sure if I did in this tutorial as I used to assign a variable with the base_url. To use this you need the url helper loaded.
@jslime Hi thanks! I use eclipse for php.. I think if you google php eclipse you should find it... I don't really understand eclipse btw! I use only a handful of it's features! I haven't looked around for better because it works OK. I does do some context sensitive help eg when you open a bracket on a function it will give you the options - if it knows the function. Sometimes it does this for CodeIgniter functions but I haven't figured out when it does and when it doesn't!
When doing the form_open if i point it to the base_url without directing it to the user controller and register function it works ok, but if I add the 'user/register' thing it throws up a file permissions error when i press submit. This is fine while user is my default controller, but I can't keep it that way. Is this a quick fix with a likley cause or are there millions of explanations.
hey mate.. not sure except perhaps you have not removed index.php using my other tutorial? try directing the form_open to 'index.php/user/register' or do yourself a favour and remove index.php refer my other tute.
I have no idea really.. Except I have always done it that way. No doubt I learnt that from someone else when I first started out. I guess you can do either. Normally I'll put the assignment of view_data['base_url'] into a base controller so it only has to be done once anyway - it's not that big a redundant step in that case...
Hi, thanks for your series. I've begun working through them and have run into some early trouble. Is there anything in the 2.1.0 release that would affect this tutorial?
JABevan 2 weeks ago
@JABevan Hi mate - yes there is... The way models and controllers are declared has changed slightly. Also the constructor is slightly different. Have a read of this codeigniter [dot] com/user_guide/installation/upgrade_200.html to see what you need to do differently...
Verbloten 2 weeks ago
@Verbloten Thanks man. I was able to make the updates; however, now I'm receiving the same error @lyndr29 received below:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: User::$view_data
Filename: controllers/user.php
I've checked and checked my code, watched you previous tutorials, and can't seem to find the error.
JABevan 2 weeks ago
@Verbloten
I have this on line 9: $this->view_data['base_url'] = base_url();
...and this on line 21: $this->load->view('view_register', $this->view_data);
JABevan 2 weeks ago
@JABevan Dunno mate? You can shoot me through your code if you like and I will give it a once over... Send it to my email address or via the contact form on simplycodeigniter site
Verbloten 2 weeks ago
Excellet demonstration/tutorial!
TheOddSeed 4 weeks ago
This has been flagged as spam show
Thank you very much. This is very helpfull. You help me very mcuh. Thanks a lot
ajishiteru 2 months ago
I think it'd be great if you could put the version of CodeIgniter in the description so that things are a little bit future-proofed. I know that the video tutorials on the CI website are considered deprecated, but the lessons are still valid. Same could be said for you videos once CI has progressed further, I think.
Thanks for the videos! Really great!
StevenSokulski 3 months ago
Hey, i'm trying to learn using Ci, but i have one problem Call to undefined function base_url() in MyHost/Ci/application/controllers/user.php on line 8
( i wrote url and form to autoload, but nothing changes ) Any ideas? :)
And, thanks for the tutorials :)
TheUfonautas 4 months ago
@TheUfonautas Hi mate - sorry I missed your question sooner! You need to autoload the "url" helper.
Rather than use $this->['base_url'] = base_url() in your constructor... I tend to just use base_url() when I need it now rather than sending it through to the view as a variable. Also see Gerrrrrrrry's comment below - you don't need it in anchor tags ie; echo anchor('controller/function', 'title', array('properties')) is sufficient...
Verbloten 4 months ago
@Verbloten Thank, thank, thank you!!
TheUfonautas 4 months ago
You can leave out the url helper and the setting of the base url as calling form_open without arguments will just set the action to blank which will make the form redirect to the same page.
Gerrrry 5 months ago
@Gerrrry Setting the field value to black also seems to be done by default, so no need to set it in your code.
Gerrrry 5 months ago
Hi, I'm new to CI and am just trying to follow this tutorial. I believe I did everything correct but I'm getting this message every time I click on the Register button:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: User::$view_data
Filename: controllers/user.php
Line Number: 11
There's also another notice, saying the 'base_url' is an undefined variable. Is there something I need to do to get rid of these 'notices'? Thanks much!
lyndr29 6 months ago
@lyndr29 Not sure what the problem is without seeing the source code. Contact me through simplycodeigniter website and I will reply. You can then email me your code. Otherwise - check that you have used $this->view_data['something'] = 'something'; before using it in the $this->load->view('view_name', $this->view_data)
With base_url prob - use the function base_url() - not sure if I did in this tutorial as I used to assign a variable with the base_url. To use this you need the url helper loaded.
Verbloten 6 months ago
thanks for great tut.
cnttlc 9 months ago
@cnttlc No worries mate. Thanks for taking those few seconds to thank me :)
Verbloten 9 months ago
2:04 Check your Security! :)
mxcreations 1 year ago
@mxcreations What do you mean?
Verbloten 1 year ago
Comment removed
mxcreations 1 year ago
@Verbloten its totally off topic... The windows security bubble pops up in your lower right corner ;)
Awesome tutorial! Keep up the good work :)
mxcreations 1 year ago
Hi, great video series, thank you for sharing!
What text editor are you using, and where can l get it?
jslime 1 year ago
@jslime Hi thanks! I use eclipse for php.. I think if you google php eclipse you should find it... I don't really understand eclipse btw! I use only a handful of it's features! I haven't looked around for better because it works OK. I does do some context sensitive help eg when you open a bracket on a function it will give you the options - if it knows the function. Sometimes it does this for CodeIgniter functions but I haven't figured out when it does and when it doesn't!
Verbloten 1 year ago
@jslime user netbeans, it's has great support for PHP code hinting and stuff.
nuwaus 1 year ago
hello can you tell me what is the base_url in config.php or the configuration in config.php..... thanks...
xiaxia01 2 years ago
Great Series.....learned alot.
juliancaldwellomaha 2 years ago
When doing the form_open if i point it to the base_url without directing it to the user controller and register function it works ok, but if I add the 'user/register' thing it throws up a file permissions error when i press submit. This is fine while user is my default controller, but I can't keep it that way. Is this a quick fix with a likley cause or are there millions of explanations.
andypooz 2 years ago
hey mate.. not sure except perhaps you have not removed index.php using my other tutorial? try directing the form_open to 'index.php/user/register' or do yourself a favour and remove index.php refer my other tute.
let me know if this was the problem?!
Verbloten 2 years ago
Why did you pass base_url in the view data and not just call base_url() in the view itself? Isn't that step redundant?
fused1980 2 years ago
Hey mate
I have no idea really.. Except I have always done it that way. No doubt I learnt that from someone else when I first started out. I guess you can do either. Normally I'll put the assignment of view_data['base_url'] into a base controller so it only has to be done once anyway - it's not that big a redundant step in that case...
Verbloten 2 years ago
Thanks to all that have commented and subscribed to my videos.
I'd be happy to do more - just send me a message/leave a comment whatever with what you are interested in and I'll do up a vid tutorial for you.
Verbloten 2 years ago
great tutorials man, I am acutally learning CI now, so this is a great resource. Thanks!!
raffkm 2 years ago 3
Congratulations Al, this is a great set of tutorials. I have never used CodeIgniter but am considering it and you have increased my confidence!
CrimsonBeer 2 years ago 6
I think you need more quick launch icons.
ehrengm 2 years ago