PHP Tutorial (& MySQL) #22 - Checking for Errors & Redirecting

preview_player
Показать описание
Hey gang, in this PHP tutorial I'll explain how to redirect a user to another page after checking there are no errors in our form submission.

----------------------------------------

🐱‍💻 🐱‍💻 Course Links:

🤑🤑 Donate


🎓🎓 Find me on Udemy

Рекомендации по теме
Комментарии
Автор

Thanks shaun!, PHP looks simple, thanks to you!, don't stop Ninja!, Don't!

chuchu-yc
Автор

In the end, we could shorten a bit instead of leaving the first part of the condition empty:
if(!array_filter($errors)){
header('Location: index.php');
}

jeansienkin
Автор

I can't believe you upload daily!! Thanks for such great content!

HaxGuru
Автор

Wow 🙂 I can say your version of PHP course is the best I've seen

It's the only one u understand the most

Thanks man 😌😌

comibyteacademy
Автор

"Alright then me friends" love this intro :) great content !

jakewarburton
Автор

you a great programming guru, I started with you from the beginning I really appreciate your great job I`ved ever leant in you tube like this you are the great tutor in youtube

easetellnetworks
Автор

Your method of teaching is just awesome!

SaadKhan-wjik
Автор

really you are explaining very logic to make me understand every single dark element, thank you buddy for your efforts, you are father of and master of php world

salaheddinlahmer
Автор

how does the errors array become empty? Once I make an error it stays in the array and the form never thinks its valid even if I fix it

sugarglass
Автор

I strongly suggest you to start a series using a Framework like (symfony Or laravel) just after finishing this one these are popular, do your best to do this dude thank you so much for your efforts

dontargetme
Автор

How does array_filter perform a callback function on the $errors array? Callback functions are normally functions with another function as a parameter. But that isn't the case here.

Martin
Автор

If anyone is facing issue in redirecting please refer this comment -

Correct : header("Location: home.php"); or header("Location:home.php");
Incorrect : header("Location :home.php");
Remove space between Location and : --> header("Location(remove space): home.php");

varunpandey
Автор

great job dude... carry on.... loved it....

limakhansr
Автор

Great Series. Continue!!!!
How many video left?

marcinmaj
Автор

Hello sir, i've a question, now as i've finished your lessons on php i wonder if it's necessary to learn php oop. Please i need answer

Trader-
Автор

when I was press the submit button then all of the three input areas turning email why?

despotjc
Автор

Can you show how to do load more button or pagination ?

bikramchettri
Автор

i cant even continue with the playlist because of the Warning: mysqli_fetch_all() expects parameter 1 to be mysqli_result, boolean given line 17 can someone please help me

blvksmithtradingchannel
Автор

It redirects me to the page written in 3:32 action="add.php" (line 56) no matter what I write in array_filter. Why ?
After I erased that action from the html form, it actually redirected to index.php as ordered in array_filter.
Moreover it doesn't work if there's any echo command engaged before the redirect.
Took me two hours to figure out all this.

Tuttigiu
Автор

beauty)) thank you)) altho i still get an error redirecting but ill carry on maybe will be solved later in the tut((

Mustafa-cvpk
visit shbcf.ru