include("databaseconnection.php");?> // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } ?> //Blog id if(isset($_GET['id'])) { $id=$_GET['id']; } else { $id=0; } ?> $text=""; $sql="SELECT * from blog where id=$id"; $result=$conn->query($sql); if ($result->num_rows > 0) { while($row=$result->fetch_assoc()) { $id=$row['id']; $name=$row['name']; $text=$row['text']; } } ?>
Share