Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

submit to another form

Options
  • 13-10-2009 11:06pm
    #1
    Registered Users Posts: 8,070 ✭✭✭


    I have form products.php

    it has search functions,
    an input field


    product.php has a sidebar, sidebar.php which has a search box.
    How do i search whats entered in the search box in products.php

    i.e i tried calling products.php in the searchbox form with same input field name,
    doesnt work ....

    thanks


Comments

  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    I'm confused. Are these done using frames or something?


  • Registered Users Posts: 8,070 ✭✭✭Placebo


    no sorry.

    products.php has a sidebar, using <php include....


    sidebar.php has a form in it, searching this should submit the form in products.php

    so in the sidebar form i have
    <form method="POST" action="products.php">


    but it doesnt seem to work,i have it working in a dummy file i made x.php
    product.php has extra variables etc but im passing them on as hidden fields in the sidebar form


  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    I'm all confused :)

    I mean, if you include a file in PHP, it all renders to the same HTML page so you get a form. If you submit this form to itself (the main script), you just grab the variable using $_POST;

    Apologies if I'm reading into this all wrong, long day!


  • Registered Users Posts: 8,070 ✭✭✭Placebo


    ugh i got it

    product.php only executed search on submit on the page,
    so i just forward on a variable and checked for that

    my bad
    late nights....


Advertisement