For PHP practice, I want to create a login form after simply linking DB, but there was an error, so I'm asking you this question. The database integration was successful by entering the source as below and confirming the message Success.
<?php
$db_host="localhost";
$db_user="root";
$db_password="159874";
$db_name="loginFunc";
$connect=mysqli_connect($db_host, $db_user, $db_password, $db_name);
if(mysqli_connect_errno($connect)) {
echo "Failed loading database connect :".mysqli_connect_error();
} } else {
echo "Success";
}
?>
In order to simply create a table in MySQL and take over the value from the input form, the following source is added, but the following error occurs:
<?php
$userId=$_POST['userId'];
$userPass=$_POST['userPass'];
?>
Notice: Undefined index: userId in /Users/KimMinWoo/Laravel/LoginFunc/login.php on line 2
Notice: Undefined index: userId in /Users/KimMinWoo/Laravel/LoginFunc/login.php on line 3
php database
I can only connect to the DB and there is no passing part.
Receive only part
Make an input and pass it over
© 2024 OneMinuteCode. All rights reserved.