Formbrowser - Fatal Error... Please help!

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
User avatar
richbothe
Forum Members
Forum Members
Posts: 95
Joined: Tue Aug 15, 2006 5:34 pm

Re: Formbrowser - Fatal Error... Please help!

Post by richbothe »

Sorry  :-\ that didn't do it either.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Formbrowser - Fatal Error... Please help!

Post 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
User avatar
richbothe
Forum Members
Forum Members
Posts: 95
Joined: Tue Aug 15, 2006 5:34 pm

Re: Formbrowser - Fatal Error... Please help!

Post 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?
Last edited by richbothe on Wed Apr 04, 2007 5:39 pm, edited 1 time in total.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Formbrowser - Fatal Error... Please help!

Post 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
Last edited by Nullig on Wed Apr 04, 2007 7:09 pm, edited 1 time in total.
User avatar
richbothe
Forum Members
Forum Members
Posts: 95
Joined: Tue Aug 15, 2006 5:34 pm

Re: Formbrowser - Fatal Error... Please help!

Post 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..  ???
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Formbrowser - Fatal Error... Please help!

Post by Nullig »

I notice in the page source that the field name has changed to m5_16.

Try that.

Nullig
User avatar
richbothe
Forum Members
Forum Members
Posts: 95
Joined: Tue Aug 15, 2006 5:34 pm

Re: Formbrowser - Fatal Error... Please help!

Post 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).
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Formbrowser - Fatal Error... Please help!

Post 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
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Formbrowser - Fatal Error... Please help!

Post 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
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Formbrowser - Fatal Error... Please help!

Post 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
User avatar
richbothe
Forum Members
Forum Members
Posts: 95
Joined: Tue Aug 15, 2006 5:34 pm

Re: Formbrowser - Fatal Error... Please help!

Post 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...  ;D
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Formbrowser - Fatal Error... Please help!

Post by Nullig »

Glad you finally got it working.

Nullig
Post Reply

Return to “CMSMS Core”