We're having difficulties dealing with two forms on one html search results page. We want the following to happen: 1) "next" and "previous" links to appear when the search returns more results than the limit set in the code. 2) the user to be able to click on a link/radio button which would allow them to view complete result data on another page. The code for goal 1 seems to need a "method = get" capability, while the second goal needs "method = post" to pass information on to the next page. We thought that the best way to do this would be to have two separate forms on the one html page. However, we can't seem to get either form to work in its entirety. Here's the code for our form with the "next" and "previous" links: Code: <form name = "form2" id="form2" method="get" action="<?php echo $_SERVER['PHP_SELF']?>"> When there is only this form on the page, the next/previous links work fine. It's when we try to incorporate other buttons (such as a submit button) and another form that things get messy. The same is true for the other form... it works fine by itself, but it's the combination that throws it off. Goal 2 form: Code: <form name = $formNum id = $formNum method=post action=seach_match_result.php target='_blank'> (This form has a submit button at the end.)These forms are not nested, but totally separated in the code. Are we on the right track, or is there a better way to accomplish this? Thanks! AM
im super tired right now and can hardly stay up and can hardly focus but what i see so far makes sense to me umm ill do a good detailed investigation on whats good and whats not on it in a couple of hours okay
We think we are not explaining the problem very well. We are trying to produce a results page like the Google search results page. Individual results pages would be available by clicking on links on the main results page, for example: a user searches our database for people whose birthdays fall on a specific day, and the main results page displays the first name of each of these. When the user clicks on the first name another page would pop up containing contact information for that person. The main results page would also have next and previous buttons, for example if there were more than 10 results, they would be displayed on multiple pages. We are having problems both sending information from the main results page to each of the individual result pages, as well as getting the next and previous buttons to work. When either of these two components are in separate test pages they work successfully, but not when on the same php page. Thanks, AM
Actually, we just got it to work! In case anyone is interested in the solution, we basically passed variables for the individual search pages via the GET method in the URL. For the next and previous buttons, we had to pass our MySQL query in the URL.