Posted by James on 03/21/06 02:37
How can I get the search on the left and the then the menu on the same line
in vaild Xhtml Version 1.0?
<?php
echo "<form method='post' action='forms/display.php'>";
echo "<div class='left'>";
echo "Search <input type='text' name='Search'/>";
echo "<input type='submit' value='Seach'/>";
echo "</div>";
echo "</form>";
$dir = opendir('.');
$files = array();
echo "<p class='center'>";
while(($file = readdir($dir))!= false)
{
if( ( !is_dir($file) ) && ( substr(strtolower($file), strlen($file) -
3) == 'php' ) && ( strlen($file) >= 3 ) )
{
$files[] = $file;
$short = str_replace(".php", "", $file);
$long="/~user/dir/$file";
if ($long==$_SERVER['PHP_SELF'])
{
echo "$short ";
}
else
{
echo "<a href='http://ww.example.com/~user/dir/$file'>$short</a>
";
}
}
}
echo "</p>";
closedir($dir);
?>
[Back to original message]
|