开发者

inserting radio button in php page

I have retrieved the database details from a database to a php page. i have actually retrieved a specific column of a query. but i am not able to add the radio buttons to the retrieved values. Following is my coding:

<?php
    $query  = "SELECT url FROM开发者_开发知识库 measurementurl";
    $result = mysql_query($query);

    while($row = mysql_fetch_row($result))
    {
        $url  = $row[0];
        echo "url :$url <br>" ;
    } 
?> 


Try this:

<form action="">
<?php
    $query  = "SELECT url FROM measurementurl";
    $result = mysql_query($query);

    while($row = mysql_fetch_row($result))
    {
        //$url  = $row[0]; removed cause not used in code
        echo "<input type=\"radio\" name=\"url\" value=\"$row[0]\" />$row[0]<br />";
    } 
?> 
</form>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜