473,387 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Problem in linking pages

Hi,

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
code:[PHP]

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

<div id="hiddenTables">

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

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

</td></tr>
<!--Hiding tables with coding for country -->

</table>
<!--State Details-->

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

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

</td></tr> </table>
[/code]

code:[php]
<b>country.php</b>

<?PHP
include('connect.php');
$string=$_GET['countryname'];
$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);
if($_GET['submit']=$_GET['countryname'])
{
?>
<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>
</tr>

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

?>

<?PHP
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> ";
}
if($total!=0)
{
echo"<B>Totally $total events are found</B><br>You searched for $string";
}
else
{
echo"<center><b>no events found.<br>
Check weather u entered $string is spelled correctly or not </b>";
}
}
//var_dump(mysql_fetch_array($query));
?>
[/code]
Jul 28 '07 #1
1 1301
kovik
1,044 Expert 1GB
If you want to use a link, then simply make a link instead of a button.
Jul 28 '07 #2

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

Similar topics

27
by: Lee Phillips | last post by:
I believe it is universally accepted that decorating your website with images from someone else's, without permission, is rude and unethical, even if the images are in the public domain, because...
33
by: randau | last post by:
Linking to a Targeted Browser Window I'd like to open reference links to other web sites in a separate browser window from the browser window hosting my own web site pages. The Link Target...
3
by: Ken | last post by:
I have a win 2000 database of autographs and scanned photos. They are in the SAME directory. In the table, my "ImagePath" text field shows JUST the image name (i.e. "blank.jpg"). I have an image...
14
by: diskoduro | last post by:
Hi!! Years ago I built a database to control the production of a little factory. The users wanted to work in a Windows Net workgroup so I created an mdb with all the tables and data an after...
13
by: Giggle Girl | last post by:
Hi there, I am having a problem with the behavior of Firefox, where lefthand column content is not resized properly after it is "collapsed" and then "re-expanded". An online demo is available...
1
by: clarke187 | last post by:
I have a website that exchanges links for ads. is there a robot i can use to see if they really are, without having to do it manually. I run mac OSx thanks
0
by: zhenya.tkachenko | last post by:
Hi! Have a problem with mod_auth_mysql. Compilation and installation of module done ok: # /usr/local/apache/bin/apxs -c -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient -lm -lz...
0
by: nachitas | last post by:
I was wondering if anybody could help me with this. I am new to CSS and think I understand it. My problem is that I had my template page working (it would update all my other pages) until I...
4
by: naveenmurthy | last post by:
Hello All, I have created a .mht file in following format. 1. The .mht file contains following htmls. a. MHTLinkingProblem.html b. Left.html c. Right.html d. Start.html
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.