|
Posted by "Richard Lynch" on 07/11/05 04:15
On Sat, July 9, 2005 7:46 pm, Will said:
> Hi, can someone say where I might post this.
> Hi, I am using a quickform form and it works well except when I use it by
> using an include in another file. In that case when the file is called in
> (by way of the include statement in the parent file) it seems that the
> quickform gets processed as though it had been submitted. Does anyone know
> why that is?
Somewhere in the quickform (whatever that is) near the top of the code,
there is some kind of "if" statement that determines whether to display
the blank form, or if this is the "second" time on this page, after the
form was submitted.
Whatever you've done in your script *before* the quickform, is triggering
that "if" statement into believing that it was submitted.
EXAMPLE:
------- yourscript.php -------
<?php
$name = "Will"; //Probably came from POST or GET, actually...
include 'quickform.inc';
?>
------------------------------
------- quickform.inc ---------
<?php
if (isset($name)){
//Process form code here
}
else{
//Display form code/html here
}
?>
-------------------------------
If 'yourscript.php' hadn't set $name, then the quickform would behave
differently.
It could also be the case that your page has POST or GET data -- Either a
form of its own, or some ?variable1=value1&variable2=value2 stuff.
Your POST/GET or other variables are "confusing" quickform.
You might be able to just change all your variable names to less common
names.
--
Like Music?
http://l-i-e.com/artists.htm
Navigation:
[Reply to this message]
|