> I am trying to write a quick form->mail script (like Matt's) and I am > stuck > on one small part: > > form: > <form method=post action=form.php> > <input type=text name='field1'><br> > <input type=text name='field2'><br> > <input type=text name='field3'><br> > <input type=text name='field4'><br> > <input type=text name='field5'><br> > <input type=text name='field6'><br> > <input type=text name='field7'><br> > <input type=text name='field8'><br> > <input type=text name='field9'><br> > <input type=text name='field10'><br> > <input type=text name='field11'><br> > <input type=submit value='Go'> > </form> > > Form.php (receiver of the form post): > foreach($_POST as $x) { > print "$x<br>"; > } > > > Will output the values of field1, field2, etc > > BUT - how do I get the field names on the form.php page? I want to be > able > to display: > field1: value of field 1
Foreach($_POST as $key=>$value) { $msg = $key . ":" . $value; } ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php