WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
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 Resources
Web Development Content
Internet Security Software
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
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

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 : DropDownListBox - just little example to make live easier
Categories : PHP, HTML and PHP Update Picture
Remi Cieslak
Date : Apr 02nd 2001
Grade : 4 of 5 (graded 2 times)
Viewed : 6212
File : dropdownlistbox.klasa
Images : No Images for this code example.
Search : More code by Remi Cieslak
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

<?php
//
//$array - any array{2} filled with data from any query "select ---- as value, ---- as
display_value from any_table where any_condition"
//$name - name of listbox
//$selected - if you want to display any value at the construction event or after submit event,
just set it to the value taht you want to display
//$atrribs - things required to visiualize lisbox eg. css,html inner tags
//$events - any kind of events from Javascrip pool
//
function insertListBox($array,$name,$selected,$attribs,$events)
{
        printf("<select name=$name $attribs $events>");
        printf("<option value=>select something");
        for($i=0;$i<sizeof($array);$i++)
        {
                $row = $array[$i];
                if($row->id == $selected)
                {
                        printf("<option value=$row->value selected>$row-
>display_value");
                }
                else
                {
                        printf("<option value=$row->value>$row->display_value");
                }
        }
        printf("</select>");
}
?>



PHP3: Formmail. Just a cgi formmail, but than in PHP. It is easy to use!
Categories : HTML and PHP, Email, PHP, Perl, HTML and PHP
PageRank Display
Categories : Search Engines, HTML and PHP, PHP
Print out array key => value in colored HTML
Categories : PHP, Arrays, HTML and PHP
If you want to create select buttons featuring current date this example will show you how...
Categories : Date Time, HTML and PHP, PHP
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
Creates three SELECT form fields: Month, Day, and Year. You give it a string which will be used to make the name for the three fields, and a number of seconds to use as the default date. If you give it blank for this value, the current date is used.
Categories : HTML and PHP, PHP, Date Time
a function that builds an HTML select list from any mysql table.
Categories : PHP, MySQL, HTML and PHP
Customizable encoding and decoding strings with security.
Categories : PHP, Strings, HTML and PHP
This script contains 2 functions: 1 to create html select object based on your own customer date format entry- "M d Y h:i.... etc". The second function processes the select object on submit back to unix time.
Categories : PHP, Calendar, Date Time, HTML and PHP
Message of the Day - Random Message (Needs MySQL!)
Categories : Databases, HTML and PHP, PHP, MySQL
function textwrap will wrap text to any desired width using <BR>\n as the default line break. Default wrap width is 80 columns.
Categories : Strings, HTML and PHP, PHP
Parse string to find sub-string between two arbitrary strings
Categories : PHP, Strings, HTML and PHP, Arrays
Database resultset navigation
Categories : PHP, HTML and PHP, Databases, MySQL, Navigation
Remote Scripting: send form POST data to a script and insert the results into a page without refreshing the page.
Categories : PHP, AJAX, HTML and PHP, Java Script
Required form fields that pull from MySQL database
Categories : PHP, HTML and PHP, Databases, MySQL