Skip to content
Advertisement

How to display error message with php after form submit

Hello everyone i am building a project with php where do i want to display error message on form submit with php but the problem is i am unable to do that my page gets reloads and the message doesnot shows. Below i am pasting the codes please help me how to do that.

Form part

JavaScript

php codes

JavaScript

Advertisement

Answer

you can use with session like this

JavaScript

session is secure and every time you post it will set session and then it will remove the value set is session with unset the session.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement