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

    Join Date
    Dec 2012
    Posts
    13
    Rep Power
    0

    How to show link in table in php for mysqli data?


    I am working on mysqli database.

    I am trying to create a link to update the data through php. I am hitting minor mistake by not knowing exactly how to write in mysqli. In mySQL it is
    Code:
    <a href="update.php?id=<? echo $rows['id']; ?>">
    but i need to write in mysqli.

    Thank you in advance!

    Below is my table where i got error:
    PHP Code:
          echo <<<EOM
        <table border='1'>
        <tr>
          <td>Last Name</td>
          <td>First Name</td>
          <td>Phone No</td>
          <td>Email</td>
          <td>Address</td>
          <td>City</td>
          <td>Update</td>
        </tr>
    EOM;

        while ((
    $row $result->fetch_assoc()) !== NULL)
        {
          echo <<<EOM
      <tr>
        <td>
    {$row["lName"]}</td>
        <td>
    {$row["fName"]}</td>
        <td>
    {$row["phoneNo"]}</td>
        <td>
    {$row["email"]}</td>
        <td>
    {$row["address"]}</td>
        <td>
    {$row["city"]}</td>
        <td><a href="update.php?id=
    {$rows['customerNo']}">update</a></td>
      </tr>

    EOM;
        } 
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,959
    Rep Power
    9397

IMN logo majestic logo threadwatch logo seochat tools logo