CodeIgniter 4 User Login Tutorial - Part 1 - Project Setup & HTML

Поділитися
Вставка
  • Опубліковано 31 гру 2024

КОМЕНТАРІ • 81

  • @tomyhawks9344
    @tomyhawks9344 4 роки тому +6

    Thanks god that you exist really we need a mentor like to show us how codeigniter 4 is going on ! Keep going bro!

    • @AlexLancer
      @AlexLancer  4 роки тому

      @Tomy Hawks thanks for the support.

  • @niekvlessert
    @niekvlessert 4 роки тому +2

    I'm certainly not new to programming but I'm a framework n00b, I never needed to dive in until now. Your videos are just what I was looking for, I've had trouble finding a quick way in on how to use it properly. I believe Codeigniter is a good framework to start with, maybe I'll use it forever since the scaffolding stuff which for example Laravel provides seems nice at first sight, but I think you first have to do it yourself manually to actually understand what you're doing and give you control over it.

    • @AlexLancer
      @AlexLancer  4 роки тому

      Nice approach, niekvlessert. And yes, CI is very good.

  • @tomassue
    @tomassue 2 роки тому

    Thank you for making simple yet comprehendable tutorials. It really helped me.

  • @krillinsworld9439
    @krillinsworld9439 Рік тому +1

    This video is far too old for 4.4.1. I was able to get this to work with CI 4.4.1. It took some doing and some splitting up of some lines and update the required functions in the three filter files. But because I work in subfolders, the code keeps trying to look into my localhost root rather than my project folder, but that should be easy to fix. I just hope there aren't other unforeseen issues as I have not tried logging in, registering, etc. I am taking baby steps with this, but so far, I like it! I edited this post because I don't give up easy with the issues I faced. I tackled them and conquered. It feels good because it really did NOT take but 15-20 minutes to fix. Not as tough as debugging regular PHP error message jargon!

  • @bakikimolina
    @bakikimolina 4 роки тому +8

    Great tutorial! I have been using CI3 for more than 5 years and I'm starting now to transfer my codes to CI4. One question, what is the difference of setting up the variables in .env and setting them up in app/Config/App.php?

    • @ozanulutas3334
      @ozanulutas3334 4 роки тому

      Hi, it's an old question but anyways... I guess .env file overrides variables in the app/Config/App.php file like it did in the app/Config/Database.php. The one of the benefits of it that; you can set the static vars in this config files and set the changable vars in the .env file. So you can configure vars easily.
      Alex talks about it in; ua-cam.com/video/yqiTtDPbfCU/v-deo.html&pbjreload=101

  • @gilmcglory3748
    @gilmcglory3748 4 роки тому

    Thanks a lot. I had been looking for a good tutorial for Codeigniter 4. This will help.

    • @AlexLancer
      @AlexLancer  4 роки тому

      Glad it helped! You are welcome.

  • @jeyakumarjeyaraj8618
    @jeyakumarjeyaraj8618 4 роки тому

    thank you so much, sir. I have faced this form submit redirect issue past 2 weeks. now i got the solution

  • @Hassan-rl1iy
    @Hassan-rl1iy 2 роки тому

    by renaming env into .env i got issue on powershell: Closed without sending a request; it was probably just an unused speculative preconnection

  • @bethocubans2168
    @bethocubans2168 Рік тому

    Muchas gracias todo super bien, saludos desde Cuba teacher

  • @fahimashe9363
    @fahimashe9363 Рік тому

    having an issue of not redirect to login page, shows the users at localhost,why is this?

  • @DevidInsee
    @DevidInsee 4 роки тому

    You are the man. best tutorial best sample code

  • @BucurIonNiculae
    @BucurIonNiculae 3 роки тому +1

    It would be good if in the future you can make a small CMS using version 4. Nice video, nice job.

  • @lightmare1919
    @lightmare1919 4 роки тому

    the last part i got 404 - File not found but i try the same code with this $routes->match(['get','post'],'register', 'Users::register');

  • @techgeektw
    @techgeektw 3 роки тому

    hi can you please share what addons you have added in your visual studio code? would be great help.

  • @its187inc
    @its187inc 4 роки тому

    alex what software are you using is your os an ios or ms or something else i do not recognize

  • @mr.ic4l
    @mr.ic4l 4 роки тому +1

    its very hard to find tutotial about CI4 .... and thx god dat u r exist!
    i wanna ask u question. how to get a total row in a table? if in mysql select count(*) from table_name where gender='male';
    how do i get a total result of 'male' ????
    thx

    • @AlexLancer
      @AlexLancer  4 роки тому

      Hey, thanks for yuor good words.
      Try using query builder.
      $db = db_connect();
      $builder = $db->table('table_name');
      $result = $builder->where(['gender' => 'male'])->countAllResults();

    • @mr.ic4l
      @mr.ic4l 4 роки тому

      @@AlexLancer i try and its not working.
      i used a query in a controller
      $model = new UserModel();
      $data['xdata'] = $model->where('gender', 'Female');
      $data['xdata'] = $model->findAll();
      i use that and i find all data that gender are Female. how to get count on that? i used countAll() still showing the error.
      thx before

  • @zz-hv9xz
    @zz-hv9xz Рік тому

    Better voice, thank you!

  • @cerad7304
    @cerad7304 4 роки тому +1

    Surprised you are using xampp instead of the built in development server. Good video.

  • @glenescobar6776
    @glenescobar6776 4 роки тому

    thanks for the video my friend.
    its the same to make in AWS?

  • @sonalsahu909
    @sonalsahu909 4 роки тому

    hey Alex, whenever you create any project you change the directory path from httpd.conf file. can't we skip public from url using htaccess redirect ????

    • @AlexLancer
      @AlexLancer  4 роки тому +1

      Hey Sonal,
      "public folder is meant to be the “web root” of your site, and your web server would be configured to point to it." - from codeigniter docs.
      So to answer your question, in theory you could, but it is more convenient to configure your server to point into public folder.

  • @geovanex24
    @geovanex24 4 роки тому +1

    Hello Alex! I have the codelgniter 3 version... This project works in this versión too?

    • @GabrielMartins-rp2vg
      @GabrielMartins-rp2vg 4 роки тому

      Bro, i think is not working... cause ci4 is very different of ci3

  • @rmnmrajapakshe
    @rmnmrajapakshe Рік тому

    Hi. I have got stuck in ajax request in codeigniter 4. Error " POST myurl 500 ( internal sever error)

  • @JeewakaKarunaratne
    @JeewakaKarunaratne 4 роки тому

    Hi Alex,
    i see to create form you use standard input fields (HTML)
    but in codeignitor documentation have different input field
    form_input([$data = ''[, $value = ''[, $extra = ''[, $type = 'text']]]])
    is it safe to use standard html input ? if so it easy.
    same time some says if i use standard html input use esc to text box so javascript injection will strop.
    can you kindly tell me best way to implement form inputs with security (simplest way is good)
    thank you.

    • @AlexLancer
      @AlexLancer  4 роки тому +1

      Use any way you like. The validation of the fields will be done in the backend. So no need to worry about injection. Codeigniter will escape your input values when using validation and query builder.
      The esc($string) can be used in both cases. And with form_input() and with html

    • @JeewakaKarunaratne
      @JeewakaKarunaratne 4 роки тому

      @@AlexLancer Thank you. I have more problem to come. will get another one hour training soon. thank you

    • @AlexLancer
      @AlexLancer  4 роки тому

      @@JeewakaKarunaratne sure. whatever you need. You already know how it works :)

  • @apareshmazumder4331
    @apareshmazumder4331 4 роки тому

    Excellent bro! I have subscribed to you. How to manage user roles? Please make a video. I want admin and seller roles on the different dashboards.

  • @zaidkhan-pathan
    @zaidkhan-pathan 4 роки тому

    Great work, keep doing bro ...

  • @zoracoinglobalalliancegrou2254
    @zoracoinglobalalliancegrou2254 4 роки тому

    Sometimes if my users log in, another person's details will be displayed to them but go off after they refresh, please how can I solve this... I used your script.

  • @bryancordova3179
    @bryancordova3179 4 роки тому

    this is compatibil with codeigniter 3?

  • @edgatg
    @edgatg 4 роки тому

    Good job, excelent video

  • @fidaalivahora5873
    @fidaalivahora5873 3 роки тому

    hey!! Why you didnt't use .htaccess instead of change xampp config file every time

  • @JeewakaKarunaratne
    @JeewakaKarunaratne 4 роки тому

    Dear Alex,
    can you upload full project to github or any other place you prefer? thank you.

  • @alexpandiyan3632
    @alexpandiyan3632 4 роки тому

    vera level thala neenga

    • @AlexLancer
      @AlexLancer  4 роки тому +1

      My friend, I don't get what you try to say.

    • @alexpandiyan3632
      @alexpandiyan3632 4 роки тому

      That is my mother tongue Tamil,that means Ur awesome and U doing a fantastic job.

    • @AlexLancer
      @AlexLancer  4 роки тому +1

      @@alexpandiyan3632 google translate recognized it. But the translation was not very helpful. Thank you a lot!

    • @alexpandiyan3632
      @alexpandiyan3632 4 роки тому

      Actually that is local word

    • @alexpandiyan3632
      @alexpandiyan3632 4 роки тому

      Hi Alex I have one doubt,
      how to link with another page in codeignetor 4(how to use Anchor tag)

  • @thesloveniaboy123
    @thesloveniaboy123 4 роки тому

    Does old() do the same as set_value()?

    • @AlexLancer
      @AlexLancer  4 роки тому

      kind off. I have never used it before. from what I see though in the documentation you must use "redirect()->back()->withInput() " to be able to use old() helper. Would it work without redirect ?
      I think the idea here is that lets say you have a form under home/index but you want to validate post form under home/validation so when you need to go back to the home/index (ex. if no validation) and still keep the inputs you would use this method. just brainstorming. tell me if you find other use-case.

  • @MohammadaAprilianto
    @MohammadaAprilianto 4 роки тому

    have you make a csrf CI4 tutorial? i need it :D

  • @FilippoBerardo
    @FilippoBerardo 4 роки тому

    thank you! very much!

    • @AlexLancer
      @AlexLancer  4 роки тому

      You're welcome!

    • @FilippoBerardo
      @FilippoBerardo 4 роки тому

      @@AlexLancer i cannot see the debug bar in the bottom, i use macosx catalina with VScode (or Netbeans) and the apache server of mac. The browser is firefox, do you have an idea why i cannot see it?

    • @AlexLancer
      @AlexLancer  4 роки тому

      @@FilippoBerardo 2 things. When you start your project duplicate env file and name it .env
      Then uncomment CI_ENVIRONMENT and set it to 'development' .
      Also uncomment and set base url inside your .env file
      And you should be fine.

  • @webtantras
    @webtantras 4 роки тому

    Thanks for this .....

  • @afobata5079
    @afobata5079 4 роки тому

    Help us with password resetting with email sending

    • @AlexLancer
      @AlexLancer  4 роки тому

      Afo, this series is complete there will be no other video on this subject. But soon I will publish new series with user roles

  • @kangegi1749
    @kangegi1749 Рік тому

    thanks

  • @anggayuda7719
    @anggayuda7719 4 роки тому

    thank you sir

  • @ZeeshanKhan-kf9by
    @ZeeshanKhan-kf9by 4 роки тому

    Good

  • @roylopez6892
    @roylopez6892 Рік тому

    How about forgot password?

  • @ajanthanasia4296
    @ajanthanasia4296 3 роки тому

    wow

  • @asa_code4147
    @asa_code4147 4 роки тому

    nice bro

  • @afobata5079
    @afobata5079 4 роки тому

    Check this on live server, isn't working

    • @AlexLancer
      @AlexLancer  4 роки тому

      What is the problem exactly?

    • @afobata5079
      @afobata5079 4 роки тому

      @@AlexLancer I built the project on localhost and it works perfectly but on launching it to live server it gave me nightmares for 1 day but I have solved the problem

    • @AlexLancer
      @AlexLancer  4 роки тому

      @@afobata5079 That's why I ask. What was the problem? Because you say that this tutorial does not work on live server. So describe please what was the issue to avoid misleading others or to let know what to be aware of. Maybe it is something that I should consider in my next tuts. Thank you in advance.

    • @afobata5079
      @afobata5079 4 роки тому

      @@AlexLancer Is now perfectly working

    • @afobata5079
      @afobata5079 4 роки тому

      Thanks a lot