diplay data stored mysql in php code example
Example 1: showing database table in php
$connection = mysql_connect('localhost', 'root', '');
mysql_select_db('hrmwaitrose');
$query = "SELECT * FROM employee";
$result = mysql_query($query);
echo "<table>";
while($row = mysql_fetch_array($result)){
echo "<tr><td>" . $row['name'] . "</td><td>" . $row['age'] . "</td></tr>";
}
echo "</table>";
mysql_close();
Example 2: print data that will be inserted in the database
$key = strtoupper(c_security::random_string(22));
$c_con->query("INSERT INTO keys(key, days, used) VALUES ('$key',".c_security::anti_sql_string($_POST["daysammount"])."', '0')");
echo $key;
i think like that