Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want add anchore tag in datalist option.
I am simple adding a anchor tag but its not redirection to specific location.
Below is my code
XML
<input list="plants" placeholder="Search" name='search' style='width:400px;'/>
                            <datalist id='plants'>
                            <?php
                                $query_plants=mysql_query("select plant_id,plant_name from plants where status='plant'");
                                while($get_query=mysql_fetch_array($query_plants))
                                {
                                    $x=$get_query[0];
                                    $y=$get_query[1];
                                    echo"<a href='view/product-details.php?id=$x'><option value='$y'>$y</option></a>";
                                }
                            ?>
                            </datalist>


Please help to solve this
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900