Page 2 of 2
Re: Formbrowser - Fatal Error... Please help!
Posted: Wed Apr 04, 2007 4:46 am
by richbothe
Sorry

that didn't do it either.
Re: Formbrowser - Fatal Error... Please help!
Posted: Wed Apr 04, 2007 2:58 pm
by Nullig
Do you have access to phpmyadmin on your server?
You could try your query there and see if it works as expected.
Run a query like:
SELECT * FROM `members` WHERE `bus_name` LIKE 'bloom%' ORDER BY bus_name
and see what results you get.
Nullig
Re: Formbrowser - Fatal Error... Please help!
Posted: Wed Apr 04, 2007 3:27 pm
by richbothe
I ran this exact query
SELECT * FROM `members` WHERE `bus_name` LIKE 'bloom%' ORDER BY bus_name
It returned the two results that contain "bloom" within the business name...
I turned on
echo $sql and searched "bloom" on
http://staging.aomam.org/index.php?page ... actitioner again...
Here's the SQL query string that the browser returns:
SELECT * FROM `members` WHERE `bus_name` LIKE '%' ORDER BY bus_name
Seems as though the field name isn't recognized or is getting stripped out before reaching the db. The result is the same whether I use "m5_12" or "busname" (name of the field in Formbuilder) as the field name.
Any other suggestions?
Re: Formbrowser - Fatal Error... Please help!
Posted: Wed Apr 04, 2007 7:02 pm
by Nullig
You could try:
$busname = $_GET['m5_12']; <- note the single quote
or
$busname = $_REQUEST['m5_12']; <- note the single quote
Try putting an echo of the variable $busname to see what is being passed to the page.
Nullig
Re: Formbrowser - Fatal Error... Please help!
Posted: Wed Apr 04, 2007 8:25 pm
by richbothe
I've tried both "$_GET & $_REQUST" with no change in results. When I echo $busname where:
$busname = $_GET['m5_12']; or
$busname = $_POST['m5_12']; or
$busname = $_REQUEST['m5_12']
(also tried all 3 using ['busname'])
the value of $busname is not returned, but when I change the value to something like:
$busname = "Test";
The value is returned.
When the field name is defined as something other than text, the value for $busname is not being passed.
Still trying different things to get it to work and I'm open for any other suggestions..

Re: Formbrowser - Fatal Error... Please help!
Posted: Wed Apr 04, 2007 8:31 pm
by Nullig
I notice in the page source that the field name has changed to m5_16.
Try that.
Nullig
Re: Formbrowser - Fatal Error... Please help!
Posted: Wed Apr 04, 2007 8:39 pm
by richbothe
Changing it to m5_16 still gives the same result. What I'm seeing is that somehow the value for the variable $busname is not getting passed, unless I enter standard text (VS entering the field name as the value).
Re: Formbrowser - Fatal Error... Please help!
Posted: Wed Apr 04, 2007 8:49 pm
by Nullig
Or the posted variable isn't getting posted.
I've never had this much trouble with a form posting before. It must have something to do with the formbuilder code.
One other test I thought of, although I'm not sure it would help would be to call the page directly in the form. Instead of
action="index.php"
try
action="index.php?page=search4"
I don't know if it would work.
Nullig
Re: Formbrowser - Fatal Error... Please help!
Posted: Wed Apr 04, 2007 9:07 pm
by Nullig
Another option would be to have formbuilder send the output to a text file (one of the options available), which then could be read to get the proper input.
Nullig
Re: Formbrowser - Fatal Error... Please help!
Posted: Wed Apr 04, 2007 9:27 pm
by Nullig
And as a final option, you could copy/edit the formbuilder generated code and paste it into the page, instead of using the formbuilder tag. In essence, create your own form. You then have more control over the output. You could use the same styles and format, but change the action to suit your needs.
Nullig
Re: Formbrowser - Fatal Error... Please help!
Posted: Wed Apr 04, 2007 9:30 pm
by richbothe
On the page
http://staging.aomam.org/index.php?page ... actitioner I used the form tools in the content editor to create a new form (removing the smarty tag to Formbuilder) and now it works perfectly.
I add
/index.php?page=search4 as the form action this way and it worked.
I'm going to try that using the Formbuilder also to see if it fixes that too.
Thank you Nulling for all of your time helping me to debug this...

Re: Formbrowser - Fatal Error... Please help!
Posted: Wed Apr 04, 2007 9:39 pm
by Nullig
Glad you finally got it working.
Nullig