Problem in retriving datas using link

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kavithadevan
    New Member
    • Jul 2007
    • 23

    Problem in retriving datas using link

    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]
    Last edited by ak1dnar; Jul 20 '07, 02:45 PM. Reason: [code:php] changed with [code=php]
  • adamalton
    New Member
    • Feb 2007
    • 93

    #2
    Is it the comma , in <a href="country,p hp">
    Should be
    <a href="country.p hp">

    ...?

    Comment

    • ak1dnar
      Recognized Expert Top Contributor
      • Jan 2007
      • 1584

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

      example:

      [code=php]

      // Your codes goes here

      [ /code]

      Comment

      • kavithadevan
        New Member
        • Jul 2007
        • 23

        #4
        Hi,
        No,thats country.php only



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

        example:

        [code=php]

        // Your codes goes here

        [ /code]

        Comment

        • kovik
          Recognized Expert Top Contributor
          • Jun 2007
          • 1044

          #5
          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.

          Comment

          • kavithadevan
            New Member
            • Jul 2007
            • 23

            #6
            Hi,
            Actually i gave country.php only but here i typed wrongly


            Originally posted by volectricity
            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.

            Comment

            • kovik
              Recognized Expert Top Contributor
              • Jun 2007
              • 1044

              #7
              You still need to describe what is actually happening.

              Comment

              Working...