How to display form errors with PHP | How to handle a form with PHP | English subtitles.

Поділитися
Вставка
  • Опубліковано 19 вер 2024
  • PHP tutorial.
    In this tutorial we are going to see how to structure the html form
    so we can show possible validation errors.
    You can read the article and download the source code from my website:
    digitalfox-tut...
    If you feel like saying thanks, you can buy me a coffee.
    www.buymeacoff...

КОМЕНТАРІ • 31

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

    Φοβερό κανάλι, με ξεκάθαρο και επαγγελματικό υλικό, μπράβο σας και ευχαριστούμε.

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

    Great work exactly what I am looking for

  • @nihongo_
    @nihongo_ 3 місяці тому

    simple good video

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

    Thanks !!

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

    helpful. thank you

  • @ΜαρίαΓεωργιάδη-ρ8β
    @ΜαρίαΓεωργιάδη-ρ8β 9 місяців тому

    That is a very good tutorial. Keep up the good work.
    I'm running on an issue though. Whenever i click the submit button, i jump to an empty script.php page even if i insert 'wrong' data or even if i put the 'correct data without the messages being displayed.
    How can i solve the issue ?
    Thanks so much for the tutorial.

    • @DigitalFox-tutorials
      @DigitalFox-tutorials  9 місяців тому +1

      Hey, this is not supposed to happen. Maybe you have a typo in your code, happens to me a lot.
      Check out or download the source code from my website.
      digitalfox-tutorials.com/tutorial.php?title=How-to-display-form-errors-with-php
      Happy that you liked the tutorial.

  • @aristideexe
    @aristideexe 2 роки тому +1

    Very good tutorial

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

    Why we use the null?

    • @DigitalFox-tutorials
      @DigitalFox-tutorials  Рік тому +1

      You don't have to. When we create a variable without assigning a value, the variable by default has a value of null. Sometimes i set a variable to null, sometimes not. It depends on the moment i guess.

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

    With bootstrap?

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

    when i press submit my page is refreshing and then after refreshing is showing the message can you please help me

  • @BlackCrypt
    @BlackCrypt 10 місяців тому

    Arrow code bad code?

    • @DigitalFox-tutorials
      @DigitalFox-tutorials  10 місяців тому

      Hey, thanks for the sub. Can you be more specific please.

    • @BlackCrypt
      @BlackCrypt 10 місяців тому +1

      @@DigitalFox-tutorials I’ve seen many tutorials where they say nested if then statements are bad.

    • @BlackCrypt
      @BlackCrypt 10 місяців тому

      @@DigitalFox-tutorials ua-cam.com/users/shortsAik0WxJWdmg?si=dMhqE4Vwdt_Nm4-L

    • @DigitalFox-tutorials
      @DigitalFox-tutorials  10 місяців тому +1

      Nested if statements are not necessarily bad. It comes down on your
      code readability. If your 'if else chains' are hard to follow , or you have
      excessive nesting, then yes it's bad code because its harder to read and maintain your code.
      I hardly use over two nested if statements in my code.

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

    Warning: Undefined variable $username
    Warning: Undefined variable $password
    I get this problem in php file, value="" . I already have require in html and the script.php already has that variables. Please help

    • @DigitalFox-tutorials
      @DigitalFox-tutorials  Рік тому +1

      Hey, if you already declared the variable in the php file, check for any misspelling.
      Or download the source code:
      digitalfox-tutorials.com/tutorial.php?title=How-to-display-form-errors-with-php

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

      @@DigitalFox-tutorials Thanks for replying! I checked the variables, it is the same. I also looked at the source code, I added the terminator but the problem's still there. This is a project for my school so it is a little bit different from your tutorial. The form I made has an action=" ". Maybe that's the problem?

    • @DigitalFox-tutorials
      @DigitalFox-tutorials  Рік тому

      @Schulken Borashen It doesn't matter if the action attribute is empty, check in the php file if your variables are declared outside the if statement, and not inside.

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

      @@DigitalFox-tutorials I have the same problem