Jump to content

Form problem


Lassie

Recommended Posts

As part of a page header I have a simple search input form.

I aslo have an input form which submitts to itself for validation etc

When I include the search for in the header the input form takes the search form action ie it goes to search .php

If I comment the search form out the form submits to itself as required.

How can I resolve this?

 

search form


<td class="tcart"><form action="search.php" method="get">

<input type="text" size="20" name="q" value=""/>
<input type="submit" value="Search"/>

</form</td>

input form submit
[code]
<form action = 'checkout.php' method = 'post'>
//input fields
<input type ="hidden" name="submitted" Value="TRUE"/>
    	<tr><td colspan = 2 align = 'center'>
      <b>Please press Purchase to confirm your purchase,
         or Continue Shopping to add or remove items</b> 
     <?php
  display_form_button('purchase', 'Purchase These Items');
  display_button('show_cart.php', 'continue-shopping','Continue Shopping');
   ?>
    </td>
  </tr>
  </form>

button function
[code]

function display_form_button($image, $alt)
{
  echo "<center><input type = image src=\"images/$image".".gif\" 
           alt=\"$alt\" border=0 height = 50 width = 135></center>";
}

 

[/code]

[/code]

Link to comment
https://forums.phpfreaks.com/topic/81339-form-problem/
Share on other sites

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.