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

Поделиться
HTML-код
  • Опубликовано: 23 дек 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.

  • @tomassue
    @tomassue 2 года назад

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

  • @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.

  • @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!

  • @fahimashe9363
    @fahimashe9363 Год назад

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

  • @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

  • @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.

  • @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; ruclips.net/video/yqiTtDPbfCU/видео.html&pbjreload=101

  • @rmnmrajapakshe
    @rmnmrajapakshe Год назад

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

  • @techgeektw
    @techgeektw 3 года назад

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

  • @bethocubans2168
    @bethocubans2168 Год назад

    Muchas gracias todo super bien, saludos desde Cuba teacher

  • @its187inc
    @its187inc 4 года назад

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

  • @DevidInsee
    @DevidInsee 4 года назад

    You are the man. best tutorial best sample code

  • @jeyakumarjeyaraj8618
    @jeyakumarjeyaraj8618 3 года назад

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

  • @bryancordova3179
    @bryancordova3179 4 года назад

    this is compatibil with codeigniter 3?

  • @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');

  • @fidaalivahora5873
    @fidaalivahora5873 3 года назад

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

  • @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

  • @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 :)

  • @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

  • @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.

  • @JeewakaKarunaratne
    @JeewakaKarunaratne 4 года назад

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

  • @zz-hv9xz
    @zz-hv9xz Год назад

    Better voice, thank you!

  • @glenescobar6776
    @glenescobar6776 4 года назад

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

  • @roylopez6892
    @roylopez6892 Год назад

    How about forgot password?

  • @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.

  • @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.

  • @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.

  • @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)

  • @edgatg
    @edgatg 4 года назад

    Good job, excelent video

  • @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

  • @MohammadaAprilianto
    @MohammadaAprilianto 4 года назад

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

  • @zaidkhan-pathan
    @zaidkhan-pathan 4 года назад

    Great work, keep doing bro ...

  • @cerad7304
    @cerad7304 4 года назад +1

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

    • @AlexLancer
      @AlexLancer  4 года назад

      Will use spark also later

  • @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

  • @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.

  • @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.

  • @webtantras
    @webtantras 4 года назад

    Thanks for this .....

  • @anggayuda7719
    @anggayuda7719 4 года назад

    thank you sir

  • @kangegi1749
    @kangegi1749 Год назад

    thanks

  • @ZeeshanKhan-kf9by
    @ZeeshanKhan-kf9by 4 года назад

    Good

  • @asa_code4147
    @asa_code4147 4 года назад

    nice bro

  • @ajanthanasia4296
    @ajanthanasia4296 3 года назад

    wow