Please explain how to wirite isset php with button | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please explain how to wirite isset php with button

26th Nov 2016, 10:36 PM
Dinda Ockta N
Dinda Ockta N - avatar
4 Answers
+ 3
Hey, max you have done wrong here if (isset($_POST['submit'])) forget to close if condition
27th Nov 2016, 3:05 AM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 2
Post method: if (isset($_POST['submit'])) //submit is the button name. { //code here if the button was clicked. } and the same as get method: use $_GET instead of $_POST. isset() is from typename bool and can have true or false as a return type.
27th Nov 2016, 1:44 AM
Max_N
Max_N - avatar
+ 2
yeah it was 3am in the morning haha. I edit that :)
27th Nov 2016, 10:33 AM
Max_N
Max_N - avatar
0
thanks for explain :)
27th Nov 2016, 3:58 AM
Dinda Ockta N
Dinda Ockta N - avatar