Hi,
Here i have pasted 2 scripts first one is design and next one is country.php
in the below code is working nicely.
----------------------design.php------
[code=html]<form name="form1" method="post" action="country .hp">
<table width="200" border="1" align="center">
<tr>
<td>contrynam e</td>
<td><input type="text" name="countryna me"></td>
</tr>
</table>
<input type="submit" name="Submit" value="Submit">[/code]
-------------------country.php----------
[code=php]<form name="form1" method="post">
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCC C">
<tr>
<div align="center">
<h1>List Of Events</h1>
</div>
</tr>
<?php
include('connec t.php');
$str=$_GET['countryname'];
$sql="SELECT * FROM addevent where countryname LIKE'$str'";
// OREDER BY id DESC is order result by descending
$result=mysql_q uery($sql);
$num=mysql_num_ rows($result);
while($rows1=my sql_fetch_array ($result))
{
// Start looping table row
?>
<tr>
<td width="6%" align="center" bgcolor="#E6E6E 6"><strong>Even t</strong></td>
<td width="23%" align="center" bgcolor="#E6E6E 6"><strong>Date </strong></td>
<td width="15%" align="center" bgcolor="#E6E6E 6"><strong>Mont h</strong></td>
<td width="13%" align="center" bgcolor="#E6E6E 6"><strong>Year </strong></td>
</tr>
<?PHP
print "<tr bgcolor=\"#CCCC CC\">
<td bgcolor=\"#FFFF FF\">" . $rows1['event'] ."</td>
<td bgcolor=\"#FFFF FF\">" . $rows1['date'] ."</td>
<td bgcolor=\"#FFFF FF\">" . $rows1['month'] ."</td>
<td bgcolor=\"#FFFF FF\">" . $rows1['year'] ."</td>
</tr>";
// Exit looping and close connection
}
if($num!=0)
{
echo"<B> Totaly $num found</B> ";
}
else
{
echo"<center><B >No results found</B></center>";
}
mysql_close();
?>
</table>
</form>[/code]
But i changes submit button into image and i dont want to give link in action field(if i give action its working) in this how can i redirect another one form using image as a submit button can anyone help me how to do this
thanks
Here i have pasted 2 scripts first one is design and next one is country.php
in the below code is working nicely.
----------------------design.php------
[code=html]<form name="form1" method="post" action="country .hp">
<table width="200" border="1" align="center">
<tr>
<td>contrynam e</td>
<td><input type="text" name="countryna me"></td>
</tr>
</table>
<input type="submit" name="Submit" value="Submit">[/code]
-------------------country.php----------
[code=php]<form name="form1" method="post">
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCC C">
<tr>
<div align="center">
<h1>List Of Events</h1>
</div>
</tr>
<?php
include('connec t.php');
$str=$_GET['countryname'];
$sql="SELECT * FROM addevent where countryname LIKE'$str'";
// OREDER BY id DESC is order result by descending
$result=mysql_q uery($sql);
$num=mysql_num_ rows($result);
while($rows1=my sql_fetch_array ($result))
{
// Start looping table row
?>
<tr>
<td width="6%" align="center" bgcolor="#E6E6E 6"><strong>Even t</strong></td>
<td width="23%" align="center" bgcolor="#E6E6E 6"><strong>Date </strong></td>
<td width="15%" align="center" bgcolor="#E6E6E 6"><strong>Mont h</strong></td>
<td width="13%" align="center" bgcolor="#E6E6E 6"><strong>Year </strong></td>
</tr>
<?PHP
print "<tr bgcolor=\"#CCCC CC\">
<td bgcolor=\"#FFFF FF\">" . $rows1['event'] ."</td>
<td bgcolor=\"#FFFF FF\">" . $rows1['date'] ."</td>
<td bgcolor=\"#FFFF FF\">" . $rows1['month'] ."</td>
<td bgcolor=\"#FFFF FF\">" . $rows1['year'] ."</td>
</tr>";
// Exit looping and close connection
}
if($num!=0)
{
echo"<B> Totaly $num found</B> ";
}
else
{
echo"<center><B >No results found</B></center>";
}
mysql_close();
?>
</table>
</form>[/code]
But i changes submit button into image and i dont want to give link in action field(if i give action its working) in this how can i redirect another one form using image as a submit button can anyone help me how to do this
thanks
Comment