龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > php编程 >

php 下拉列表实现的友情链接

时间:2014-07-31 11:14来源:网络整理 作者:网络 点击:
分享到:
下拉列表实现的友情链接 [代码片段(34行)]
<?
if ($site != \"\") :
    header(\"Location: http://$site\");
    exit;
else :
?>

<html>
<head>
<title></title>
</head>
<body>
<?
$favsites = array (\"outofmemory.cn

?>
<form action = \"index.php\" method=\"post\">
<select name=\"site\">
<option value = \"\">Choose a site:
<?
$x = 0;

while ( $x < sizeof ($favsites) ) :
          print \"<option value=\'$favsites[$x]\'>$favsites[$x]\";
          $x++;
endwhile;
?>
</select>
<input type=\"submit\" value=\"go!\">
</form>
<?
endif;
?>
//该片段来自于http://outofmemory.cn
精彩图集

赞助商链接