Php > Site Navigation
Website Navigation via PHP
Website Navigation via PHP "; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { extract($line); if ($lastcategory != $link_type) { if ($lastcategory) print "
\n"; if ($link_type != "Navigation") print "$link_type: "; else print " "; $lastcategory = $link_type; } if ($link_caption != "") { print " [ "; for ($i = (15 - strlen($link_caption)) / 2; $i > 0; $i = $i - 1) { print " "; } print "
"; print "$link_caption
"; for ($i = (15 - strlen($link_caption)) / 2; $i > 0; $i = $i - 1) { print " "; } if ((15-strlen($link_caption)) % 2 == 0) print " "; } else { print " [ "; print "
"; print "$link_location
"; } print " ]"; } print "
\n"; mysql_free_result($result); mysql_close($conn); } ?> #MySQL syntax to create internal_links table: CREATE TABLE internal_links ( _handle INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, link_caption TEXT, link_location TEXT NOT NULL, link_type ENUM("Business", "Personal", "Projects", "Scholastic", "Navigation") );
Php Codes
Algorithms
Arrays
Authentication
Calendar
Code Snippets
Programs
Content Manage
Contest Related
Cookies
Credit Cards
DBase Related
Databases
Date Time
Directories
E-Mail
Errors
File
File System
Forms
Handling
Graphics
HTML and PHP
Informix
Ingres
InterBase
LDAP
Look and Feel
Miscellaneous
MySQL
Other
PHP Classes
Searching
Navigation
Statistics
Strings
User Manage