Jump to content

New Page php mysql results


houssam_ballout

Recommended Posts

hello all,I'd developed a simple search engine that searches through records in database, I'd located the button and the text box in the index page, when the user enter the keywords, I want to display the results in a pop-up window?the results works fine when the user enters anything in the search engine and clicks search

Link to comment
Share on other sites

If the page is not XHTML, you can set a target on the form to open a new window when the form gets submitted. If you are using XHTML, I'm not sure you can do that.<form target="_blank" ...>
ok, how can I pass form variable to the next page?like I'd a text box named: searchWord, how I can pass it to the next page so that I can use with the sql to select data based on the search keyword?
Link to comment
Share on other sites

lets say you have in one page form:

<from method=get action=other_page.php target=_blank><input type=text name=keyword /><input type=submit /></form>

you want to get the value of the keyword in other_page.phpso:

<?php$keyword = $_GET['keyword'];echo $keyword; // Should work fine...?>

Link to comment
Share on other sites

I'd used the following: <a href="link.php?search> aa </a>it works fine, but I'd a text box named searchWordson the new page, I'd used $_GET['searchWords'], I tried to echo that variable , but nothing happens..
Clicking on a link does not submit the form, if you want the words in the input box to be passed to the next page you need to submit the form, not just click a link.
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...