Jump to content

This topic is 7022 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm not sure where the $value variable is coming from:

<?php echo ''.$value; ?>

The "OR" would be added like this:

$findrecord->AddDBParam("-lop","or");

It indicates to FM to find any of the values in the view_detail list.

You still have to convert the view_detail Array to a list.

Do you have a view_detail field in your database? If so, what type of data does it contain? That is, what are you searching for? Maybe you should be searching for RecordIDs.

All the best.

Garry

Posted

A couple of things

Index.php

In the form I see no 'info_ID' defined

show_all.php

You cannot POST an array (believe me I tried).

So your view_detail that you are posting needs to be broken into a list:

Input name=viewdetail1

input name=viewdetail2

title_detail_list.php

Your POST data would need to correspond to what you are submitting for show_all.php

One great way to get all the $_REQUEST values from the array into variables is the following script I picked up:

foreach($_REQUEST as $key=>$value)

{

$$key=$value;

}

it may help.

As Gary says

Good Luck!

Posted

Hi Garry,

Thank you for the help.

The value of <?php echo ''.$value; ?>are comming from a simple database.

I did try to search using theRecordIDs, but it is bringing me the entire records instead bring me only the ones I had checked on search_all.php to be displayed on title_detail_list.php. I am not sure what I am missing. I am attaching the zip file to see if you can give me an idea what am I missing.

thank you!

:

search.zip

Posted

In the "show_all.php" page change the chaeckbox to look like this:

In the "title_detail_list.php" page have this:

if(isset($_GET['Info_ID']))

{ $Info_ID = $_GET['Info_ID'];};

if(isset($_POST['view_detail']))

{ $Info_ID = implode(" ",$_POST['view_detail']);};

$findrecord=new FX($serverIP,$webCompanionPort);

$findrecord->SetDBData('file.fp7','Main');

$findrecord->SetDBPassword('monkey','admin');

$findrecord->AddDBParam("Info_ID",$Info_ID);

$findrecord->AddDBParam("-lop","or");

$findrecordResult=$findrecord->FMFind();

Working fine :

All the best.

Garry

Posted

Hi Garry,

I did try the code, but for some reason when I check more than 1 checkboxes on search_all.php page, I keep getting the following error on title_detail_list.php page:

Found Count = -1

Error Code = 401

But if I check only 1 checkbox, it works fine.

Do you have any idea why I keep getting the error message?

Thank You

Posted

Did you include the [] square brackets with the checkbox name:

view_detail[]

Is the "or" correct.

You can test manually with:

$findrecord=new FX($serverIP,$webCompanionPort);

$findrecord->SetDBData('file.fp7','Main');

$findrecord->SetDBPassword('monkey','admin');

$findrecord->AddDBParam("Info_ID","S103 S104 S105");

$findrecord->AddDBParam("-lop","or");

This list ("S103 S104 S105") is being created by the implode() function from the view_details[] array.

Good Luck.

Garry

This topic is 7022 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.