1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2013
    Rep Power

    Show data with link

    Dear Experts,

    I have following codes

    PHP Code:
    $sql "SELECT * from contacts order by name" ;
    $select mysqli_query($con,$sql);
    //echo ($row);
    while($row mysqli_fetch_array($select))
    "<td> <a href='edit.php?id=".$row['id']."'>
        <img border=noborder src=images/pencil.png title=Display></a></td>"
    "<td align='left'> " $row["name"].  "</td>";
    "<td> " $row["moba"]. "</td>";
    "<td> " $row["city"]. "</td>";
    "<td> " $row["country"] . "</td>";
    ?>        </tbody>
    and Edit.php has this data

    PHP Code:
    $sno =$_GET['id']; 
    $query ="SELECT * FROM contacts WHERE id = $sno ";
            if (
                      while (
    $row mysqli_fetch_array($result))
    "no data found";
    I press a link then related data must appear in related textboxes against selected id like shown in image

    Please help
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Rep Power

    as long as you don't listen to us, this whole thing is pointless. Several people have told you that your code has massive security vulnerabilities. Now it's even worse, because you've added some cross-site scripting vulnerabilities. If you put this code online, the next best script kiddie will "hack" your server and your users (which is even worse) in a matter of minutes.

    This is what you need to fix first. As long as your code is fundamentally broken, we cannot have a discussion about fancy features.

    So are you willing to fix the problems? Or do you give a damn about what we have to say? In this case, I don't see how we could help you.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".

IMN logo majestic logo threadwatch logo seochat tools logo