Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Error

  1. #1
    New Coder
    Join Date
    Mar 2009
    Posts
    97
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Error

    Heres my error!

    Omg!
    Notice: Undefined index: id in C:\wamp\www\tests\index.php on line 19
    Edit
    Last Night...
    Notice: Undefined index: id in C:\wamp\www\tests\index.php on line 19
    Edit
    Woot
    Notice: Undefined index: id in C:\wamp\www\tests\index.php on line 19
    Edit
    Omg!
    Notice: Undefined index: id in C:\wamp\www\tests\index.php on line 19
    Edit
    Omg!
    Notice: Undefined index: id in C:\wamp\www\tests\index.php on line 19
    Edit
    Heres my code


    PHP Code:
    <?php
    include 'connection.php';
    ?>

    <html>
    <head>
        <title>Testing</title>
    </head>
    <body>
        <?php
        $q 
    "SELECT * FROM `test`";
        
    $qinfo mysql_query($q);
        
        
        while(
    $post mysql_fetch_array($qinfo)) {
        
        echo 
    "<div id=\"postinfo\">";
        echo 
    $post['title'];
        echo 
    "<a hrer=\"edit.php?id=$_GET[id]\">Edit</a>";
        echo 
    "</div>";
    }
        
    ?>
    </body>
    </html>
    Kevin

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Code:
    echo "<a hrer=\"edit.php?id=$_GET[id]\">Edit</a>";
    I think you need
    Code:
    echo "<a hrer=\"edit.php?id={$post['id']}\">Edit</a>";
    there.

    PS: validate your code and fix all errors in your markup.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    Kev0121 (03-08-2009)

  • #3
    New Coder
    Join Date
    Mar 2009
    Posts
    97
    Thanks
    10
    Thanked 0 Times in 0 Posts
    Thanks alot it works and thanks for the site very helpfull

    Kevin


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •