php - HTML Table Displys Codes and Not Variables -


my html table expected display variables mysql table using php , table rather displays raw codes in cells , not variables

below diagram of table : table displays codes

the code below

<?php  $host="localhost"; // host name   $username="root"; // mysql username   $password=""; // mysql password   $db_name="test"; // database name   $tbl_name="test_mysql"; // table name   $server_name="localhost";      // create connection  $con = new mysqli($server_name, $username, $password, $db_name , 3306);    if ($con->connect_error) {      die("connection failed: " . $con->connect_error);  }      // value of id sent address bar  $id=$_get['id'];    // retrieve data database   $sql="select * $tbl_name id='$id'";    $result = $con->query($sql);    $rows = $result->fetch_assoc();              ?>    <table width="400" border="0" cellspacing="1" cellpadding="0">  <tr>  <form name="form1" method="post" action="update_ac.php">  <td>  <table width="100%" border="0" cellspacing="1" cellpadding="0">  <tr>  <td>&nbsp;</td>  <td colspan="3"><strong>update data in mysql</strong> </td>  </tr>  <tr>  <td align="center">&nbsp;</td>  <td align="center">&nbsp;</td>  <td align="center">&nbsp;</td>  <td align="center">&nbsp;</td>  </tr>  <tr>  <td align="center">&nbsp;</td>  <td align="center"><strong>name</strong></td>  <td align="center"><strong>lastname</strong></td>  <td align="center"><strong>email</strong></td>  </tr>  <tr>  <td>&nbsp;</td>  <td align="center">  <input name="name" type="text" id="name" value="<? echo $rows['name']; ?>">  </td>  <td align="center">  <input name="lastname" type="text" id="lastname" value="<? echo $rows['lastname']; ?>" size="15">  </td>  <td>  <input name="email" type="text" id="email" value="<? echo $rows['email']; ?>" size="15">  </td>  </tr>  <tr>  <td>&nbsp;</td>  <td>  <input name="id" type="hidden" id="id" value="<? echo $rows['id']; ?>">  </td>  <td align="center">  <input type="submit" name="submit" value="submit">  </td>  <td>&nbsp;</td>  </tr>  </table>  </td>  </form>  </tr>  </table>    <?php  // close connection   $con->close();  ?>

can members suggest me

all php versions not support short cut <?= @ server executing code need replace <? <?php.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -