- Messages
- 1
- Reaction score
- 0
- Points
- 16
Pa tulong naman, lumalabas kasi "Undefined index: user in C:\wamp64\www\----\testform.php "
<?php
$lhost = "localhost";
$user = "root";
$pss = "";
$dbn = "testarea";
$conn = mysqli_connect ($lhost,$user,$pss);
if (!$conn)
{
die("Connection Failed" .mysqli_connect_error());
}
$sdb = mysqli_select_db ($conn,$dbn);
if (!$sdb)
{
die("No Database" .mysqli_error());
}
$sqlii = "INSERT INTO person (name,contact,email) VALUES ('".$_POST['user']."','".$_POST['number']."','".$_POST['email']."')";
?>
<html>
<title>Test Area</title>
<body>
<form action="testform.php" method="post">
<input type="text" name="user"></br>
<input type="text" name="number"></br>
<input type="text" name="email">
<input type="submit" name="save" value="Save">
</form>
</body>
</html>
Image Attached.
View attachment 298625
<?php
$lhost = "localhost";
$user = "root";
$pss = "";
$dbn = "testarea";
$conn = mysqli_connect ($lhost,$user,$pss);
if (!$conn)
{
die("Connection Failed" .mysqli_connect_error());
}
$sdb = mysqli_select_db ($conn,$dbn);
if (!$sdb)
{
die("No Database" .mysqli_error());
}
$sqlii = "INSERT INTO person (name,contact,email) VALUES ('".$_POST['user']."','".$_POST['number']."','".$_POST['email']."')";
?>
<html>
<title>Test Area</title>
<body>
<form action="testform.php" method="post">
<input type="text" name="user"></br>
<input type="text" name="number"></br>
<input type="text" name="email">
<input type="submit" name="save" value="Save">
</form>
</body>
</html>
Image Attached.
View attachment 298625