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
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
Mobile Dev World

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 : Simple script to passing persistent and growing array between recalls of one page (manipulate little stack).
Categories : Arrays, Global Variables, PHP, HTML and PHP, Variables Update Picture
Antonio Cavallo
Date : Sep 19th 1998
Grade : 3 of 5 (graded 2 times)
Viewed : 8060
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Antonio Cavallo
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

<html>
<body>

<form method=post >
<select name=choices[] multiple>
<option>uno
<option>due
<option>tre
<option>quattro
<option>cinque
</select>
<input type=submit value=Ok>
<hr>
<?php
        $lastInsert=$HTTP_POST_VARS[choices];
        
        if ($lastInsert) {
                
                $n0=count($stack);
                for ($i=0;$i<$n0;$i++) {
                        echo "<input type=hidden name=\"stack[]\" value=\"$stack
[$i]\" >";
                }        
                
                $n1=count($lastInsert);
                for ($i=0;$i<$n1;$i++) {
                        echo "<input type=hidden name=\"stack[]\" value=
\"$lastInsert[$i]\" >";
                }        
                                
/*Uncomment this to see temporary values: only for debugging purpouses.                
        
        
                for($i=0;$i<$n0;$i++) {
                        echo "<h2>STACK:</h2> $stack[$i]<br>";
                }
                
                for($i=0;$i<$n1;$i++) {
                        $value=$lastInsert[$i];
                        echo "<h2>lastInsert:</h2> $value<br>";
                }
        
*/
        }

?>

<?php
        $stack=$HTTP_POST_VARS[stack];
        $n=count($stack);
        for($i=0;$i<$n;$i++) {
                echo "$i) ".$stack[$i]."<br>";
        }
        $ultimi=$HTTP_POST_VARS[choices];
        $n=count($ultimi);
        for($i=0;$i<$n;$i++) {
                echo "-> ".$ultimi[$i]."<br>";
        }
?>
</form>
</body>
</html>



Make old style (PHP3) scripts using GET, POST, COOKIE and File uploads (POST) compatible with PHP 4.2.0
Categories : PHP, HTML and PHP, Global Variables, Cookies, Variables
A database abstraction layer for the PHP Oracle 8 module (available from PHP 3.0.5). It supports persistent connections, fetching rows into arrays, prepare/execute (variable binding) and has a new and improved error interface.
Categories : Databases, Oracle, PHP, Arrays, Variables
Global Dump Highlighted
Categories : PHP, Variables, Global Variables
CSS style switcher
Categories : PHP, CSS, HTML and PHP, Arrays, Sessions
dynamic table columns
Categories : PHP, HTML and PHP, Arrays, Databases, MySQL
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
getting the name of the current script and query string
Categories : PHP, Global Variables, Variables, URLs
How to pass an array from one PHP Script to another via an HTML form
Categories : PHP, HTML and PHP, Arrays
Tag content retrieval from websites with preg_match
Categories : PHP, Regexps, Arrays, HTML and PHP
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
A quick way set data from a form to a function or other places where you can lose scope.
Categories : PHP, HTML and PHP, Variables
Select with current month
Categories : PHP, HTML and PHP, Date Time, Arrays
Variable serialization and unserialization. Loading and saving variable structures to and from file.
Categories : Arrays, Filesystem, Variables, Strings, PHP
Print out array key => value in colored HTML
Categories : PHP, Arrays, HTML and PHP
Form Submission Using Array's
Categories : PHP, HTML and PHP, Beginner Guides, Arrays