Guestbook:
If ( $err != "" ) { ?>
ERRORS
foreach ( $err as $val ){ print "$val"; }
} Else { ?>
Post whatever you like. Show off your site, or just say hello. If you have any errors they will appear here.
} ?>
Your name: required
} ?>" size="20" maxlength="50" onblur="this.className='entry'" onfocus="this.className='entrySel'">
Your email: required
} ?>" size="20" maxlength="50" onblur="this.className='entry'" onfocus="this.className='entrySel'">
Your website:
} ?>" size="20" maxlength="100" onblur="this.className='entry'" onfocus="this.className='entrySel'">
Your location: required
} ?>" size="20" maxlength="100" onblur="this.className='entry'" onfocus="this.className='entrySel'">
Your post: required
|
$link = mysql_connect( "localhost", $user, $pass );
if ( ! $link ) die( "Couldn't connect to MySQL" );
mysql_select_db( $db ) or die( "Couldn't open $db: ".mysql_error() );
$result = mysql_query( "SELECT * FROM tblgbook ORDER BY gbookID DESC LIMIT 50" );
$num_rows = mysql_num_rows( $result );
for ( $counter=$num_rows; $counter != 0; $counter-- )
{
$row = mysql_fetch_array($result); ?>
|