WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Snipe.Net's Web Design Color Scheme Previewer- Allows uses to input hex codes for their text, background, and link colors, and preview the color scheme with their background image. Example: http://www.snipe.net/tech/snipeschool/hex.php3
Categories : PHP, HTML and PHP, General, Graphics, HTML Click here to Update Your Picture
A. Gianotto
Date : Sep 16th 1999
Grade : 3 of 5 (graded 1 times)
Viewed : 6132
File : No file for this code example.
Images : No Images for this code example.
Search : More code by A. Gianotto
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

<?

/*
** This script was written by Alison Gianotto of www.snipe.net. If you wish to make this
script available on a personal or commercial website, please leave this comment tag in the
code, and leave the credit at the bottom of the page. To see this script at work, go to
http://www.snipe.net/tech/snipeschool/hex.php3 . E-mail any questions to snipe@snipe.net.
*/
        print ("<HTML><HEAD><TITLE>Welcome to the PHP Playground of Snipe.Net- The
Red Haired Snipe's Website Hex Color Scheme Previewer
</TITLE></HEAD>\n");
        
        /* sets the color to maroon for the first time the users hits the page */
        if ($bgColor == "")
        {
                $bgColor = "#890F01";
        }
        if ($textColor == "")
        {
                $textColor = "#FFFFCC";
        }
        if ($linkColor == "")
        {
                $linkColor = "#FF9966";
        }
        if ($alinkColor == "")
        {
                $alinkColor = "#CC6633";
        }
        if ($vlinkColor == "")
        {
                $vlinkColor = "#5AAF74";
        }
        
        /* opens body using the specified background color and image unless none is given,
which sets it to maroon with not background image */

        if ($bgImage=="")
        {
                print ("<BODY BGCOLOR=\"$bgColor\" TEXT=\"$textColor\" LINK=
\"$linkColor\" VLINK=\"$vlinkColor\" ALINK=\"$alinkColor\">\n");
        }
        else
        {
                print ("<BODY BGCOLOR=\"$bgColor\" BACKGROUND=\"$bgImage\" TEXT=
\"$textColor\" LINK=\"$linkColor\" VLINK=\"$vlinkColor\" ALINK=\"$alinkColor\">\n");
        }
        /*
        **prints out the formatting table
        */
        print ("<CENTER>\n");
        print ("<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" WIDTH=
\"563\">\n");
        print ("<TR><TD VALIGN=\"TOP\">\n");
        /*
        **prints out the introductory text
        */
        print ("<CENTER><H2>Plan your Web Site's Colors</H2>\n");
        print ("<H3>with the Red Haired Snipe's Website Color Scheme Previewier</H3>
\n");
        print ("</CENTER>\n");
        print ("Simply enter in the hexidecimal or text name for the colors you wish to
preview together, and then press the button below. The colors on this
page will then change to the colors you have chosen, and the HTML tag will be generated
below. Simply copy and paste this code into the webpage and
the color scheme will be set for you.");
        print ("<CENTER>\n");
        print ("<BR><FONT COLOR=\"$linkColor\"><B><U>Link Color</U></B></FONT>\n");
        print ("<BR><FONT COLOR=\"$alinkColor\"><B><U>Active Link
Color</U></B></FONT>\n");
        print ("<BR><FONT COLOR=\"$vlinkColor\"><B><U>Visited Link
Color</U></B></FONT>\n");
        print ("</CENTER>\n");
        print ("<BR><B>The HTML for this color scheme is:</B><BR><BR>");

        /*
        ** If the user has not specified a backgound image, print the HTML body code
without a background attribute
        */
        if ($bgImage=="")
        {
print ("<FONT SIZE=\"-1\">&lt;BODY BGCOLOR=&quot;$bgColor&quot;         TEXT=&quot;
$textColor&quot; LINK=&quot;$linkColor&quot; VLINK=&quot;$vlinkColor&quot; ALINK=&quot;
$alinkColor&quot;&gt;</FONT><BR><BR>");
        }
        else
        {
        print ("<FONT SIZE=\"-1\">&lt;BODY BGCOLOR=&quot;$bgColor&quot;        
BACKGROUND=&quot;$bgImage&quot; TEXT=&quot;$textColor&quot; LINK=&quot;
$linkColor&quot; VLINK=&quot;$vlinkColor&quot; ALINK=&quot;
$alinkColor&quot;&gt;</FONT><BR><BR>");
        }

        /*
        **starts form
        */
        print ("<FORM ACTION=\"hex.php3\" METHOD=\"POST\">\n");
        /*
        **starts nested table
        */
        print ("<CENTER>\n");
        print ("<TABLE BORDER=\"0\" CELLPADDING=\"3\" CELLSPACING=\"6\">\n");
        print ("<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\">\n");
        /*
        ** gets the users background color
        */
        print ("<B>Background Color: </B>");
        print ("</TD><TD VALIGN=\"TOP\" ALIGN=\"LEFT\">\n");
        print ("<INPUT ");
        print ("TYPE=\"text\" ");
        print ("NAME=\"bgColor\" ");
        print ("VALUE=\"$bgColor\">\n");
        print ("</TD></TR>\n");
        /*
        ** gets the users background image
        */
        print ("<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\">\n");
        print ("<B>URL of Background Image: </B>");
        print ("</TD><TD VALIGN=\"TOP\" ALIGN=\"LEFT\">\n");
        print ("<INPUT ");
        print ("TYPE=\"text\" ");
        print ("NAME=\"bgImage\" ");
        print ("VALUE=\"$bgImage\">\n");
        print ("</TD></TR>\n");
        /*
        **gets text color
        */
        print ("<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\">\n");
        print ("<B>Text Color: </B>");
        print ("</TD><TD VALIGN=\"TOP\" ALIGN=\"LEFT\">\n");
        print ("<INPUT ");
        print ("TYPE=\"text\" ");
        print ("NAME=\"textColor\" ");
        print ("VALUE=\"$textColor\">\n");
        print ("</TD></TR>\n");
        /*
        **gets link color
        */
        print ("<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\">\n");
        print ("<B>Link Color: </B>");
        print ("</TD><TD VALIGN=\"TOP\" ALIGN=\"LEFT\">\n");
        print ("<INPUT ");
        print ("TYPE=\"text\" ");
        print ("NAME=\"linkColor\" ");
        print ("VALUE=\"$linkColor\">\n");
        print ("</TD></TR>\n");
        /*
        **gets active link color
        */
        print ("<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\">\n");
        print ("<B>Active Link Color: </B>\n");
        print ("</TD><TD VALIGN=\"TOP\" ALIGN=\"LEFT\">\n");
        print ("<INPUT ");
        print ("TYPE=\"text\" ");
        print ("NAME=\"alinkColor\" ");
        print ("VALUE=\"$alinkColor\">\n");
        print ("</TD></TR>\n");
        /*
        **gets visited link color
        */
        print ("<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\">\n");
        print ("<B>Visited Link Color: </B>");
        print ("</TD><TD VALIGN=\"TOP\" ALIGN=\"LEFT\">\n");
        print ("<INPUT ");
        print ("TYPE=\"text\" ");
        print ("NAME=\"vlinkColor\" ");
        print ("VALUE=\"$vlinkColor\"><BR><BR>\n");
        print ("</TD></TR>\n");
        print ("<TR><TD VALIGN=\"TOP\" ALIGN=\"CENTER\" COLSPAN=\"2\">\n");
        /*
        ** submit button
        */
        print ("<CENTER><INPUT TYPE=\"submit\" NAME=\"Submit_Button\" VALUE=
\"Preview My Colors Now!\"></CENTER>\n");
        print ("</TD></TR></TABLE></CENTER>\n");
        print ("</FORM>\n");
        print ("</CENTER>\n");
        print ("<BR><BR><BR><BR>\n");
        print ("<FONT SIZE=\"-2\" FACE=\"arial, Helvetica, Verdana, Sans Serif\">This script
written by A. Gianotto of <A HREF=\"http://www.snipe.net\">Snipe.Net</A></FONT>\n");
        /*
        **closes the formatting table
        */
        print ("</TD></TR>\n");
        print ("</TABLE>\n");
        /*
        **closes the html page
        */
        
        print ("</BODY>\n");
        print ("</HTML>\n");
?>



webcam cam view image ispy browser independant
Categories : Graphics, HTML, HTML and PHP, PHP
A simple class with some HTML output functions that would come in handy for consistent page layout etc.
Categories : PHP, PHP Classes, HTML and PHP, HTML, Navigation
Display Slashdot headers on your own site
Categories : HTML and PHP, HTML, PHP
Builds JavaScript that updates the contents of one selector based on another.
Categories : HTML, Java Script, PHP, Complete Programs, General
Random Image Display
Categories : PHP, Filesystem, Graphics, HTML and PHP
Functions for loading images into a MySQL database and displaying them.
Categories : Graphics, HTML and PHP, MySQL, PHP, Databases
Creating thumbnails from MySQL Blobs online
Categories : PHP, MySQL, Graphics, HTML and PHP, Databases
How to preset a text string in a textarea input field
Categories : HTML, HTML and PHP, PHP, Beginner Guides
Upload images restricted by pixel size (Picture width and Picture Height)
Categories : PHP, HTML and PHP, Graphics
Automatic generation of HTML code for a table. OO interface. Can define colspan, rowspan, table style, cell style, and data style. Simple, but effective.
Categories : PHP, PHP Classes, HTML, HTML and PHP
This script shows you the 7th latest php items from the mailing list archive on zend.com
Categories : HTML, HTML and PHP, HTTP, PHP
GonxTabs : Create elegant HTML tabs based interface
Categories : Navigation, HTML, HTML and PHP, PHP
class formHTML build your HTML Forms from PHP
Categories : PHP, PHP Classes, HTML and PHP, HTML
Barcodes On The Fly With GD
Categories : Ecommerce, Graphics, HTML and PHP, PHP
Simple PHP/3 Access Counter (using GD and DBM functions)
Categories : Databases, PHP, Graphics, HTML and PHP, dBase