

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Home.php Welcome to Home Page"; echo ""; echo ""; echo ""; echo ""; ?> connect_error){ die("Connection Failed: ". $con- >connect_error); } $sql = "SELECT * FROM posts"; $result = $con -> query($sql); if($result->num_rows > 0 ){ while($row = $result->fetch_assoc()){ echo " "; echo "
". $row["post"]. "
"; echo ""; } }$con->close(); ?> Postdata.php connect_error){ die("Connection Failed: ". $con- >connect_error); } $sql = "INSERT INTO posts(post) VALUES ('$post')"; $result = $con -> query($sql); if($result === TRUE){ echo "Post Uploaded Successfully"; header("Location: home.php"); }else{