From so long facing this issue, don't getting the result if I pass the php variable inside exp:channel's as paramater, I have mentioned the code below.
$entryId = "1";
$entryId = "1|2|3";
{exp:channel:entries entry_id='<?=$entryId?>'}
<h2>{title}</h2>
{paginate}
<p>Page {current_page} of {total_pages} pages {pagination_links}</p>
{/paginate}
{/exp:channel:entries}
I would love to allow both of them, One of these atleast. But as of now in my case none of these is working. it didnt accept PHP variable, and returns null or blank. If I write directly like this
entry_id="1" OR entry_id="1|2|3"
,
that will work perfect. and returns the entries and I've print the title of entry, So got the results.
And Yes I have allow PHP
in my template from preference.
Can anybody find what I am making mistake in this..??
Please to help me, its such a irritating issue for me now..
I am open make any kind of changes.
All of suggestions will be allowed..
Thanks in Advance
Update :
Sir, Here I am not passing the segment, its a php form submit. So, I got the data in php $_POST Variable, I have used that in sql query[i.e. simple basic code like mysql_query and mysql_fetch_array]. I used this code, becuase of the same problem, I am not getting PHP variable inside exp:channel. Otherwise I like to use that {exp:query sql="..."}. Now what should I do.?? In actual its a result of search criteria. In form I have lots of fields with check box, whatever checkbox are checked that will be pass in from post, N here I got the result in $_POST variable[those are channel's fields], and need to pass that $_POST data and then what result i got on the base of channel's fields that is entries that will be display.