Form Submit Buttons


Subject: Form Submit Buttons
Hi All,

Up until now any new pages i have added via the documentation section on this webside , method 2 where i add a php page, a tpl page and then add a standard page has only contained information, i have now created a page and added a form, the form has a search box on it to search a database for a particular word.

The problemi am having is that when you press the search button, you are taken to the login page.

Form code is below

Code: [Download] [Hide] [Select]

<form>
<td width="56"><span class="style31">Family</span></td>
<td width="91"> <span class="style14">
<select name="REGION_FILTER" size="1" id="REGION_FILTER" >
<option value="AllRg">Select</option>
<option value="{REGION_FILTER}" /></option>
</select> </td>

<td width="123"><input type="submit" name="submit2" value="Search" method="GET" action="{FULL_SITE_PATH}{U_ticklist_main}" /></td>
<td width="126" class="style13"> <blink>NEW FEATURE </blink></td>
<td width="78"><div align="right">Look for...</div></td>
<td width="144"><input type="text" name="searchstring" id="searchstring" /></td>
<td width="59"><input type="submit" name="submit3" value="Find" method="GET" action="{FULL_SITE_PATH}{U_ticklist_main}" /></td>
</form>


Can someone please help

Subject: Re: Form Submit Buttons
Hi Andy, the code you posted is quite broken under a semantic point of view.

You cannot add a form within a table row... you should add it before table definition, or within a table cell.

Plus you should add a method to the form and the file to be loaded when the form is submitted... you should take as reference any other form in Icy Phoenix template and try to replicate the code.

Also... how do you deal with submitted data?

Subject: Re: Form Submit Buttons
Thanks MG

Managed to stop it from requesting you to login each time submit is pressed

Code: [Download] [Hide] [Select]

<form action="{FULL_SITE_PATH}{SB_SEARCH}" method="post"><input name="submit" type="text" class="post search" style="width: 160px;" value="Search" onclick="if(this.value=='{L_SEARCH_THIS_TOPIC}')this.value='';" onblur="if(this.value=='')this.value='{L_SEARCH_THIS_TOPIC}';" /><input type="submit" class="mainoption" value="{L_SEARCH}" /></form></div>


Much appreciated pointing me in my errors.

One stupid question perhaps, if i now ping a database for the text in the submit box, with the data it brings back how can i make each record entry appear on screen as a hyperlink ?

Regards

Subject: Re: Form Submit Buttons
AndyGpy wrote: [View Post]
One stupid question perhaps, if i now ping a database for the text in the submit box, with the data it brings back how can i make each record entry appear on screen as a hyperlink?

You need to deal with all data using a loop and assign for each entry some template vars and then output.

Take a look at ranks.php, referers.php or staff.php in latest Icy Phoenix package, just to get the idea.


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.2039s (PHP: 9% SQL: 91%)
SQL queries: 10 - Debug Off - GZIP Enabled