FORMs (HELP) --- PHP Gurus (Please HELP)
| From: | Miguel Ribeiro | Date: | Wed, 24 Oct 2001 18:59:56 +0000 |
| Subject: | FORMs (HELP) --- PHP Gurus (Please HELP) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-72144@lists.php.net to get a copy of this message | ||
Hi,
How can be possible to call other functions (that have a html pages) from a
first function that also have a html with a form and pass all html variables
without losing them?
I've a problem that from a html form I'm losing all html variables and this
is happening because this form is located in the 3th function (one inside
another)...
If you know a better way to deal with this... I'm interested to learn...
Thanks for all.
Simple example that may work:
file name: xyz.php
function display($ref) {
printf('The REF have %s",$ref);
}
function query() {
echo('<FORM ENCTYPE="multipart/form-data" NAME="addimovel"
METHOD=POST
ACTION="xyz.php?pg=1&ref=$ref">);
echo(' <TABLE>
<TR>
<TD>Ref</TD>
<TD><INPUT type=text
name="ref"></TD>
</TR>
<TR>
<TD><INPUT border="0"
src="baddaz.jpg"
name="ADD" width="40" height="40"
type="image"></TD>
</TR>
</TABLE>
</FORM>');
}
// PG options
switch($pg) {
case 1: display($ref);
break;
default: query();
break;
}