How to retrieve the city name when using PHP from the javascript code[CODE ATTACHED]? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to retrieve the city name when using PHP from the javascript code[CODE ATTACHED]?

CODE LINK: https://code.sololearn.com/Wa21260a9A10/# How can I get the city variable to work with on PHP as I can retrieve the state using $_POST["stt'] variable? Someone please help!

8th Dec 2020, 9:43 PM
Ayush Dubey
Ayush Dubey - avatar
1 Answer
0
Sorry, but where the PHP in your code? Are you doing everything in Javascript, right? And there is no interaction with server (where PHP is). To send any data to server, you need submit it. You can do it via Ajax, or simply submitting a form with your data.
18th Dec 2020, 8:10 AM
Eduardo S. Luz
Eduardo S. Luz - avatar