Jump to content

Problem with searching returned query results


lisounder

Recommended Posts

Search not functioning. The drop down box to search on Club_Name and Email is blank, clicking search results unchanged ... all suggestions appreciated ... newbie at php.  Thanks.

 

<!-- Code below is not functional, trying to query search results, search box with drop down box for two fields-->

<table width="50%">

<tr>

<td height="30"  align="left" bgcolor="#FFFFFF" class="form1" >

{$letter_links}

</td>

<td height="30"  align="right" bgcolor="#FFFFFF" class="form1" >

<input type=hidden name="sorter" value="{$sorter}">

<table><tr>

<form name="search_form" action="{$form.action}" method="post">

<td class="form1" ><input type="text" name="search" value="{$search}"></td>

<td class="form1" ><select name="s_type" style="">

{section name=s loop=$types}

<option value="{$smarty.section.s.index_next}" {if $types.sel}selected{/if}>{$types.value}</option>

{/section}

</select></td>

<td class="form1"><input type="button" value="{$button.search}" class="button" onclick="javascript: document.search_form.submit();" name="search_submit"></td>

</form>

</tr></table>

</td>

</tr>

</table>

<!-- Code below successfully displays query results -->

    <form method="post" action="{$file_name}?sel=approve" enctype="multipart/form-data" name="form1" onsubmit="foo(); return false;">

      <table cellspacing="2" cellpadding="10" border="1">

        <tr align="center"><td>Num</td><td>Club Name</td><td>Login</td><td>Country</td><td>Region</td><td>City</td><td>Address</td><td>Web site</td><td>Email</td><td>Contact Name</td><td>Contact Phone</td><td>Swinging</td><td>Alcohol</td><td>Food</td><td>Entertainment</td><td>Fees</td><td>Approved/<br/>Rejected</td><td>Actions</td></tr>

        {foreach item=item from=$contest key=key name=foo}

<tr align="center"><td><input type="hidden" name="all_approves[{$item.id}]" value="{$item.id}"/>{$key+1}</td><td>{$item.name}</td><td>{$item.login}</td><td>{$item.country_name}</td><td>{$item.region_name}</td><td>{$item.city_name}</td><td>{$item.address}</td><td>{$item.web_site}</td><td>{$item.email}</td><td>{$item.contact_name}</td><td>{$item.contact_phone}</td>

<td>

{math equation="x - 1" x=$item.swinging  assign=index_pos}

{$xml_swing[$index_pos].value}</td>

<td>{math equation="x - 1" x=$item.alcohol  assign=index_pos}{$xml_alco[$index_pos].value}</td>

<td>{math equation="x - 1" x=$item.foot  assign=index_pos}{$xml_foot[$index_pos].value}</td>

<td>{math equation="x - 1" x=$item.entertainment  assign=index_pos}{$xml_entertainment[$index_pos].value}</td>

<td>{math equation="x - 1" x=$item.fees  assign=index_pos}{$xml_fees[$index_pos].value}</td><td>

<span>  {if $item.is_approved eq '1'} Approved {else} Rejected {/if}</span></td><td align="center"><a href="{$file_name}?sel=edit&id_content={$item.id}">[ Edit ]</a><br/><a href="{$file_name}?sel=delete&id_content={$item.id}">[ Delete ]</a><br/><a href="{$file_name}?sel=approve&id_content={$item.id}">[ Approve ]</a><br/><a href="{$file_name}?sel=reject&id_content={$item.id}">[ Reject ]</a></tr>

{/foreach}

      </table>

    </form>

 

[attachment deleted by admin]

lol did you see the code above you just posted? :shrug:

 

Maybe rewrite the code, and leave the styling (css) out and put that in an external stylesheet.

That also makes it easier for everyone to solve what you want?

Also i see some weird tags i assume that is smarty? If it's a pure smarty thing i would post that in the right forum to be honest. this is total abracadabra for anyone not using smarty

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.