Jump to content

Multiple select listbox


nottoolate

Recommended Posts

Hello,

 

I'm using PHP and I have a list box where I should be able to select multiple values, that I then submit to run multiple reports. However, when I select two values I only get results for the last selected value instead of both value a & value b.

 

Can anyone help me with my problem?

 

<td style="text-align: right">Job Type:</td>
<td>
<select name="job_type" multiple="multiple" size="4">
<option value="0" selected>ALL</option>
{section name=jt loop=$job_type_list}
<option value="{$job_type_list[jt][0]}">{$job_type_list[jt][1]}</option>
{/section}
</select>
</td>

 

I've read that I can change name="job_type" to name="job_type[]", but I'm not getting any luck with that...

Link to comment
Share on other sites

Thanks for the replies.

 

I changed name to "job_type[]".

This is what I had already included under my report parameters:

if (isset($_POST['job_type'])){
		$job_type = $_POST['job_type'];
	} else {
		$job_type= $_SESSION['report_job_type'];
	}

 

When I attempt to run it I receive this error:

Fatal error: Call to a member function RecordCount() on a non-object

 

I checked my log file afterwards and I see 'oc18 error: 904: 0RA-00904: "ARRAY": invalid identifier.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.