+ 2

How can I add conditional logic for my Static HTML Form?

https://code.sololearn.com/W3Yc144viuS0/?ref=app I have created a static html form. How do I create conditional logic for my code? If i select Samsung than only samsung model (note 10 and 10 plus) should be displayed? Only “Samsung” and (on selecting model) “ note 10” should be submitted to MySql and php? I don’t want my database/ php/ sql to receive data that was not shown? I don’t want to insert blank value as an option.

5th Jan 2020, 9:30 AM
Sujay
Sujay - avatar
2 Respostas
+ 4
Hi, maybe this way: https://code.sololearn.com/WxG348UsBcQJ/?ref=app Try to select Samsung. Also consider that it is ES5 because it seems that my phone doesn't support ES6.
7th Jan 2020, 4:14 PM
SergeiRom
+ 1
Sergei Romanov thanks for your answer. But when I submit won’t my php/sql server receive data of both iphone and samsung model?
7th Jan 2020, 5:22 PM
Sujay
Sujay - avatar