By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,528 Members | 1,375 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,528 IT Pros & Developers. It's quick & easy.

Problem in linking pages

P: 23

I am creating websites in my event search form i am have 2 options(which is in radio button)one is countryname and another one is state name with search field(Its in first table).If i run my page and i click countryname then it shows country table and then if i entered i want to go another page for result so my codings are in one form design is in one form.In submit form i am using one image.I gave link in image button but its not working.Help me how to give link for this code and i tried header for this but its also not working tell me some suggestion regarding to this.

table design code

<form name="search" id="search" method="get" ><br><br><br>
<h2><b><center>Search any Events</center> </b></h2>
<table border="0" align="center">
<td><input type="radio" name="searchOption" value="country" onclick="showSelect('country')"></td>
<td>By Countryname</td>
<td><input type="radio" name="searchOption" value="state" onclick="showSelect('state')"></td>
<td>By Statename</td>
<td><input type="radio" name="searchOption" value="festival" onclick="showSelect('festival')"></td>
<td>By Festivalname</td>
</table><br /><br><br>
<!--Hiding tables-->
<!--Country Details-->

<div id="hiddenTables">

<table border="0" id="country" align="center" class="hide" cellpadding="4">

<th colspan="2">Select Country Name</th>
<td><input type="text" name="countryname" id="countryname" </td>
<tr><td class="show"><a href="country.php"><input type="image" name="submit" src="go.gif" /></a>

<!--Hiding tables with coding for country -->

<!--State Details-->

<table border="0" id="state" align="center" class="hide" cellpadding="4">

<th colspan="2">Select State Name</th>
<td><input type="text" name="state" id="state"></td>
<tr><td><input type="image" name="submit" src="go.gif" />

</td></tr> </table>


$sql = "SELECT * FROM add_event WHERE countryname ='$string'";
$query = mysql_query($sql) or die(mysql_error());
//$row_sql = mysql_fetch_assoc($query);
$total = mysql_num_rows($query);
<table width="700" border="0" align="center" id="countrytable" cellpadding="3" cellspacing="1">
<div align="center"><b>Search Details</b></div>
<tr bgcolor="#E1E1E1">
<td width="14%" bgcolor="#E6E6E6"><strong>Event</strong></td>
<td width="14%" bgcolor="#E6E6E6"><strong>State</strong></td>
<td width="14%" bgcolor="#E6E6E6"><strong>Date</strong></td>
<td width="14%" bgcolor="#E6E6E6"><strong>Month</strong></td>
<td width="14%" bgcolor="#E6E6E6"><strong>Year</strong></td>

while ($row_sql = mysql_fetch_array($query))
{//echo out the results


print "<tr bgcolor=\"#CCCCCC\">
<td bgcolor=\"#FFFFFF\">" . $row_sql['event'] ."</td>
<td bgcolor=\"#FFFFFF\">" . $row_sql['state'] ."</td>
<td bgcolor=\"#FFFFFF\">" . $row_sql['date'] ."</td>
<td bgcolor=\"#FFFFFF\">" . $row_sql['month'] ."</td>
<td bgcolor=\"#FFFFFF\">" .$row_sql['year'] ."</td>
</tr> ";
echo"<B>Totally $total events are found</B><br>You searched for $string";
echo"<center><b>no events found.<br>
Check weather u entered $string is spelled correctly or not </b>";
Jul 28 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,044
If you want to use a link, then simply make a link instead of a button.
Jul 28 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.