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

Problem in retriving datas using link

P: 23
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--------------
Expand|Select|Wrap|Line Numbers
  1. <form name="form1" method="get">
  2. <table width="200" border="1">
  3. <tr>
  4. <td><input name="event" type="text">&nbsp;</td>
  5. <td><a href="country,php"> <img src="go.gif"></a></td>
  6. </tr>
  7. </table>
  8. </form>
  9.  
-----coutry.php--------------------------
Expand|Select|Wrap|Line Numbers
  1. <form name="form1" method="get">
  2. <?php
  3. // error_reporting(E_ALL);
  4. //ini_set('display_errors', True);
  5. include('connect.php');
  6.  
  7. $sql="SELECT subject FROM addevent WHERE event ='$_GET[event]'";
  8. // OREDER BY id DESC is order result by descending
  9. $result=mysql_query($sql);
  10.  
  11. while($rows=mysql_fetch_assoc($result))
  12. {
  13. // Start looping table row
  14. ?>
  15. <?PHP
  16. echo "Details about '$_GET[event]'";?>
  17. <table width="900" border="0" align="center">
  18. <div align="center"><b>Search Details</b></div>
  19. <tr bgcolor="#E1E1E1" >
  20. <td width="194">Subject</td>
  21. </tr></table>
  22. <?php 
  23.  
  24. print "<tr bgcolor=\"#CCCCCC\">
  25.  
  26. <td bgcolor=\"#FFFFFF\">" . $rows['subject'] . "</td>
  27. </tr>";
  28.  
  29. // Exit looping and close connection
  30.  
  31. }
  32. mysql_close();
  33. ?>
  34.  
  35. </form>
  36.  
Jul 20 '07 #1
Share this Question
Share on Google+
6 Replies


P: 93
Is it the comma , in <a href="country,php">
Should be
<a href="country.php">

...?
Jul 20 '07 #2

ak1dnar
Expert 100+
P: 1,584
Please try [code=php] tags instead of [code:php].and close the code tags using [ /code]

example:

[code=php]

// Your codes goes here

[ /code]
Jul 20 '07 #3

P: 23
Hi,
No,thats country.php only



Please try [code=php] tags instead of [code:php].and close the code tags using [ /code]

example:

[code=php]

// Your codes goes here

[ /code]
Jul 21 '07 #4

kovik
Expert 100+
P: 1,044
I'm sure the comma is the problem. That's an invalid link.

Anyway, what about this is "not working?" Is nothing showing up at all? If so, it's the invalid link.
Jul 21 '07 #5

P: 23
Hi,
Actually i gave country.php only but here i typed wrongly


I'm sure the comma is the problem. That's an invalid link.

Anyway, what about this is "not working?" Is nothing showing up at all? If so, it's the invalid link.
Jul 23 '07 #6

kovik
Expert 100+
P: 1,044
You still need to describe what is actually happening.
Jul 23 '07 #7

Post your reply

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