hello,
I was trying to connect my login.php page with a new blog.php page using phpmyadmin and xamp server.
I use email and password to login into the account and once the input are correct the page should redirect to another blog.php page.
Also in my blog.php page i want to print the student_id and name from the database.
this is my login.php
"; if (isset($_SESSION["student_id"])) { header("Location: blog.php"); } } } } ?> Registration System
Login Now
email
Password
</div>
<p> NOT MEMBER? <a href="register.php"> SIGN UP </a>
</p>
</form>
</body>
</html>
this is my blog.php under maintenance
<?php session_start(); echo "hello"; echo $_SESSION["student_id"]; ?><!DOCTYPE html>
Registration System
hello
Also this is my server.php that i have included in my login.php
<?php session_start(); $name = ""; $email = ""; $password_1 =""; $phone_number =""; $servername = "localhost"; $username = "root"; $Password = ""; $dbname = "satyam"; $db = new mysqli($servername, $username, $Password, $dbname ); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } echo "connected succesfully"; ?>I know the code is not best I apologize, I have just started coding and it’s all very confusing sometimes.