Hi,
I am trying to retriving some datas from the database.using submit button i am getting result but i inserted one submit image and i gave link to that image and then i run that script but its not working now.Can u tell me using link how to retrive the datas.
here i pasted my script
---------------------search.php--------------
[code=php]
<form name="form1" method="get">
<table width="200" border="1">
<tr>
<td><input name="event" type="text">&nb sp;</td>
<td><a href="country,p hp"> <img src="go.gif"></a></td>
</tr>
</table>
</form>
[/code]
-----coutry.php--------------------------
[code=php]
<form name="form1" method="get">
<?php
// error_reporting (E_ALL);
//ini_set('displa y_errors', True);
include('connec t.php');
$sql="SELECT subject FROM addevent WHERE event ='$_GET[event]'";
// OREDER BY id DESC is order result by descending
$result=mysql_q uery($sql);
while($rows=mys ql_fetch_assoc( $result))
{
// Start looping table row
?>
<?PHP
echo "Details about '$_GET[event]'";?>
<table width="900" border="0" align="center">
<div align="center"> <b>Search Details</b></div>
<tr bgcolor="#E1E1E 1" >
<td width="194">Sub ject</td>
</tr></table>
<?php
print "<tr bgcolor=\"#CCCC CC\">
<td bgcolor=\"#FFFF FF\">" . $rows['subject'] . "</td>
</tr>";
// Exit looping and close connection
}
mysql_close();
?>
</form>
[/code]
I am trying to retriving some datas from the database.using submit button i am getting result but i inserted one submit image and i gave link to that image and then i run that script but its not working now.Can u tell me using link how to retrive the datas.
here i pasted my script
---------------------search.php--------------
[code=php]
<form name="form1" method="get">
<table width="200" border="1">
<tr>
<td><input name="event" type="text">&nb sp;</td>
<td><a href="country,p hp"> <img src="go.gif"></a></td>
</tr>
</table>
</form>
[/code]
-----coutry.php--------------------------
[code=php]
<form name="form1" method="get">
<?php
// error_reporting (E_ALL);
//ini_set('displa y_errors', True);
include('connec t.php');
$sql="SELECT subject FROM addevent WHERE event ='$_GET[event]'";
// OREDER BY id DESC is order result by descending
$result=mysql_q uery($sql);
while($rows=mys ql_fetch_assoc( $result))
{
// Start looping table row
?>
<?PHP
echo "Details about '$_GET[event]'";?>
<table width="900" border="0" align="center">
<div align="center"> <b>Search Details</b></div>
<tr bgcolor="#E1E1E 1" >
<td width="194">Sub ject</td>
</tr></table>
<?php
print "<tr bgcolor=\"#CCCC CC\">
<td bgcolor=\"#FFFF FF\">" . $rows['subject'] . "</td>
</tr>";
// Exit looping and close connection
}
mysql_close();
?>
</form>
[/code]
Comment