+ 1
Please friend, how can I do to get the value of an element with php while the field isn't isset ?
4 Answers
+ 1
Thanks bro âš
0
Clarify your question.
If you need to interact with DOM Elements in real-time you need JavaScript since PHP can't do that.
0
The problem is that when the page load, I want the php code waits while the customer submit the form. When the form is submitted I want to get the value of the field, see if it already exist in the database. If true, outputs an error message, if false, outputs successful.
0
Take a look at these:
Handling HTML Form Data with PHP -> [https://www.w3schools.com/php/php_forms.asp]
PHP + (MySQL) Database -> [https://www.w3schools.com/php/php_mysql_intro.asp]
To be honest, I have a slightly idea of how to implement what you need; but my PHP skills are a bit outdated, so I prefer to give you a right guidance instead of wrong teaching :)
Hope it helped in any way.