Jump to content
Server Maintenance This Week. ×

Passing a lot of form variables in a search breaks the website


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

Recommended Posts

We are trying to get our website to work with Filemaker 13 and finding that search forms don't work if there are a lot of variables being passed. With Filemaker 11 we had no problem but with 13 the form finds no records.
 
We use the same form processing page for a basic and an advanced search and for the basic search the form processing page just disregards all the empty form variables. 
 
I understand that an array can be introduced so that only populated form variables are applied to the search but what I don't understand is why this simple code works perfectly well with Filemaker 11 but not with 13.
 
Here's the code:
 
$course_search=$_REQUEST['course_search'];  //used for basic search
 
//used for advanced search
$newcd=$_REQUEST['newcd']; 
$cdn=$_REQUEST['cdn']; 
$course_name=$_REQUEST['course_name']; 
$course_code=$_REQUEST['course_code']; 
$starting_date=$_REQUEST['starting_date']; 
$venue=$_REQUEST['venue']; 
$presenters=$_REQUEST['presenters']; 
$stream=$_REQUEST['stream']; 
$keyword=$_REQUEST['keyword'];
$semester=$_REQUEST['semester'];
$type_of_search=$_REQUEST['type_of_search'];
 
 
if(isset($_REQUEST['skip'])){ 
$skipSize=$_REQUEST['skip'];
}else{
$skipSize='0';} 
$groupSize='20';
 
$Course_Search=new FX($serverIP,$webCompanionPort,'FMPro7'); 
$Course_Search->SetDBData('Course Information.fmp12','Course Information',$groupSize); 
$Course_Search->SetDBPassword('fmsadmin','fmsadmin');
 
$date = explode('/', $starting_date); 
if(count($date)==3) $starting_date = $date[1] . '/' . $date[0] . '/' . $date[2];
 
$Course_Search->AddDBParam('Course_Search', $course_search, 'cn');
$Course_Search->AddDBParam('New_Course', $newcd, 'eq');
$Course_Search->AddDBParam('CDN', $cdn, 'eq');
$Course_Search->AddDBParam('POST','Yes', 'eq'); 
$Course_Search->AddDBParam('Year','2014', 'eq'); 
$Course_Search->AddDBParam('Course_Name', $course_name, 'cn'); 
$Course_Search->AddDBParam('Course_Code', $course_code, 'eq'); 
$Course_Search->AddDBParam('Course_Date_First', $starting_date, 'eq'); 
$Course_Search->AddDBParam('Venue_Name', $venue, 'eq'); 
$Course_Search->AddDBParam('Semester', $semester, 'eq'); 
$Course_Search->AddDBParam('Stream_Name', $stream, 'eq'); 
$Course_Search->AddDBParam('Course_Outline', $keyword, 'cn');
$Course_Search->AddDBParam('All_Presenters', $presenters, 'eq');
 
if ($type_of_search == "OR") { $Course_Search -> AddDBParam('-lop', 'or'); }
 
 
$Course_Search->AddDBParam('customisedCourseDescriptionFlag', 'No', 'eq'); 
 
$Course_Search->AddSortParam('Sort_Order','descend'); 
$Course_Search->AddSortParam('Course_Date_First','ascend'); 
$Course_Search->FMSkipRecords($skipSize);
 
$Course_SearchResult=$Course_Search->FMFind(); 
$returnedCount=$Course_SearchResult['foundCount'];
Link to comment
Share on other sites

Did you replace the FileMaker PHP API files on your webpage server?  I had the same symptom when upgrading from FM11 to FM12. Replacing the API files with the ones that came with 12 solved it.

 

EDIT:  Sorry, I didn't notice that this was posted in the FX.php forum.

Link to comment
Share on other sites

This topic is 3636 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.