Including a html form in a php script
Get the solution ↓↓↓Solution:
You want to display the cities names next to your radios, try this in your two loops :
foreach ( $cities as $city ) {
echo "<label><input type='radio' name='origin' value='" . $city . "'>" . $city . "</label> <br>";
}
And also replace
echo "<form action= " . "'$" . "PHP_SELF' method = 'post'>";
by
echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">';
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: php_network_getaddresses: getaddrinfo failed: temporary failure in name resolution
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.