+ 1

Please friend, how can I do to get the value of an element with php while the field isn't isset ?

15th Dec 2020, 8:53 PM
Nathanaël Zuchuon
Nathanaël Zuchuon - avatar
4 Antworten
+ 1
Thanks bro ✨
17th Dec 2020, 3:27 PM
Nathanaël Zuchuon
Nathanaël Zuchuon - avatar
0
Clarify your question. If you need to interact with DOM Elements in real-time you need JavaScript since PHP can't do that.
16th Dec 2020, 3:20 AM
Erick Ruh Cardozo
Erick Ruh Cardozo - avatar
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.
16th Dec 2020, 10:24 PM
Nathanaël Zuchuon
Nathanaël Zuchuon - avatar
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.
16th Dec 2020, 11:52 PM
Erick Ruh Cardozo
Erick Ruh Cardozo - avatar