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 : A class to put get and post variables in hidden form elements. Works on scalars, normal arrays, associative arrays.
Categories : Algorithms, Variables, Arrays, PHP, PHP Classes Update Picture
David Sklar
Date : Jan 16th 1999
Grade : 2 of 5 (graded 28 times)
Viewed : 26769
File : No file for this code example.
Images : No Images for this code example.
Search : More code by David Sklar
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

<?

class c_HiddenVars {

function display($a) {
$c = Count($a);
for ($i = 0, Reset($a); $i < $c; $i++, Next($a)) {
$k = Key($a); $v = $a[$k];
if (is_array($v)) {
$vc = Count($v);
for (Reset($v), $vi = 0; $vi < $vc; $vi++, Next($v)) {
$vk = Key($v);
echo "<input type=hidden name=\"$k\[$vk\]\" value=\"".htmlspecialchars($v
[$vk]). "\">\n";
}
} else {
echo "<input type=hidden name=\"$k\" value=\"".htmlspecialchars($v). "\">\n";
}
}
}

function get() {
global $HTTP_GET_VARS;
if (is_array($HTTP_GET_VARS)) { $this->display
($HTTP_GET_VARS); }
}

function post() {
global $HTTP_POST_VARS;
if (is_array($HTTP_POST_VARS)) { $this->display
($HTTP_POST_VARS); }
}

function all() {
$this->get();
$this->post();
}
};

?>



clearing variables in php3
Categories : Variables, Arrays, PHP
Password Creator: This PHP code exmaple shows how to use bitwise operations on a single variable and using it as a flagged variable. The class generates passwords of a given length using specified characters and the flags.
Categories : PHP, PHP Classes, Algorithms, Security
PHP Dump in html format the contents of one array variable with a recursive list of the nested array variables inside.
Categories : PHP, Arrays, Variables
XML To Array
Categories : PHP, PHP Classes, XML, Arrays
translate.php - Assocciative array example, passing a reference to a function.
Categories : PHP, Arrays, Languages, Variables
Credit Card Identification and Validation Class - The credit_card class provides methods for cleaning, validating and identifying the type of credit card numbers.
Categories : PHP, PHP Classes, Credit Cards, Ecommerce, Algorithms
Check parameters validity. Paranoia was designed to check the validity of the parameters that a php page will receive after a form submission. It can be used to check the variables sent by POST or GET
Categories : Algorithms, HTML and PHP, PHP, Variables
Dump the contents of a PHP variable in html format with a recursive list of subfolders and files from a given root directory.
Categories : PHP, Directories, Variables, Arrays
Array Insertion
Categories : PHP, PHP Classes, Arrays
A recursive function to traverse a multi-dimensional array where the dimensions are not known
Categories : Arrays, PHP, Algorithms
minus - subtract arrays. Send two arrays and get an array with the operation A-B, elements on A that are not included on B.
Categories : PHP, Arrays, Algorithms
A simple bubblesort that takes 2 arrays as argument.The first one is the actual data used for sorting, the second is data that will "tag along" with the first array, for instance a descriptive text about the data in the first array.
Categories : Algorithms, Arrays, PHP, Complete Programs
HTML_Graphs uses PHP to provide a consistent interface for creating HTML based charts. The user of the class sets up arrays that are passed to html_graph() which then takes care of all the messy HTML layout.
Categories : Graphics, Arrays, PHP, PHP Classes, Charts and Graphs
Pageinfo: Array containing page URI, page query string (parameters), request method (GET or POST) and the complete URI
Categories : Variables, PHP Options and Info, Arrays, URLs, PHP
Variable serialization and unserialization. Loading and saving variable structures to and from file.
Categories : Arrays, Filesystem, Variables, Strings, PHP
 LooNeX Calp wrote : 62
Good... but what is it? :) hehe
 
 babak bandpay wrote : 112
This would be much nicer with some comments, which 
could explain all the fancy coding in it.
 
  wrote : 155
Yeah.. what is it? ah?
 
  wrote : 309
it takes the variables received through HTTP GET and POST methods 
(ie, from a form) and prints them out as hidden inputs in another form.  
this is useful for having a user fill out a form that spans multiple pages, 
for example. 
 
 Frederic Jeanbart wrote :1228
Hmmmm... I have fired programmers from my team twice for not commenting anything about their work (and mostly for showing disdain about this IMPORTANT task when you work in any collaborative environment)... That situation made others loose a valuable amount of time, and in the end it was more easy to re-code instead of trying to figure out what the uncommented code did!!

No comments = loss of time when you are an experienced coeder reading someone else`s code... No comments = too bad, there is NOTHING here that awakens my curiosity. Sorry if this sounds rude, but hey, isn`t it rude towards your readers to present a code WITHOUT ANY COMMENT?!?!