Jump to content

kyme

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by kyme

  1. I'm trying to learn.

  2. I'm trying to display a data from DB using mysqli. I'm not sure if I'm doing it right, my concern was secure. Am I doing it right? <?php include_once('user.php'); // Inialize session session_start(); $con=mysqli_connect("localhost","root","root","dbname"); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $result = mysqli_query($con,"SELECT aboutme FROM testing where id=1"); if ($result) { if ($row = mysqli_fetch_array($result, MYSQL_ASSOC)) { $aboutme = $row['aboutme']; } } mysqli_close($con); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.