Hi - I have been struggling with this for a few days and need help!!!
Basically - I have a search form & the results show on the same page.
We shall call this page page.php. Within page.php, I have pages which are pulled from a database, and so a link would be page.php?pid=2.
The issue I have is when I run the search on page.php, no problems the results come back on that page, however if I run a search on page.php?pid=2, the page goes back to page.php and shows the results there.
I am using the below for the form itself
[php]
<?php if(isset($_GET['submit'])){ mysql_connect ("xxx", "xxx","xxx") or die (mysql_error()); mysql_select_db ("database"); $term = $_GET['term']; $sql = mysql_query("select pagetitle from table where extra like '%$term%'"); while ($row = mysql_fetch_array($sql)){ echo ''.$row['pagetitle']; echo '
'; } } ?> [/php] As I said above, the search works fine, it brings back the correct results but I just can't get it to the pid...i tried
$_GET[‘pid’] is used further up the script and calculated the correct pid…
Any help will be so so so appretiated!!!