Estoy atascado un poco, ¿me pueden ayudar?, estoy empezando a programar en PHP
, porque un amigo mío me lo recomienda, pero he tenido este problema por un tiempo
<div class="container">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<!-- Wizard container -->
<div class="wizard-container">
<div class="card wizard-card" data-color="orange" id="wizardProfile">
<div class="wizard-header text-center">
<h3 class="wizard-title">Sign Up</h3>
<p class="category">Create a profile and fill it with your information.</p>
</div>
<br/>
<div id="sign"class="row ">
<form class="formget " action="" method="post">
<div class="">
<input class="formember" type="text" name="user" value="" placeholder="Usuario">
</div>
<div class="">
<input class="formember" type="text" name="email" value="" placeholder="Email">
</div>
<div class="">
<input type="password" class="formember" type="text" name="passwo" value="" placeholder="Password">
</div>
</form>
</div>
<div id="sign2"class="row ">
<form class="formget " action="" method="post">
<div class="">
<input class="formember" type="text" name="pname" value="" placeholder="Personal Name">
</div>
<div class="">
<input type="text" class="formember" type="text" name="lastname" value="" placeholder="Lastname">
</div>
<div class="">
<input type="text" class="formember" type="text" name="phone" value="" placeholder="Phone number">
</div>
</form>
</div>
<div id="sign3" class="row ">
<form class="formget " action="" method="post">
<div class="">
<input class="formember" type="text" name="birth" value="" placeholder="Birthday YYYY-MM-DD">
</div>
<div class="">
<input type="text" class="formember" type="text" name="" value="" placeholder="Profession">
</div>
<div class="">
<input type="text" class="formember" type="text" name="" value="" placeholder="Nationality">
</div>
</form>
</div>
<br/>
<div class="card-feet">
<div class="sign-low">
<button id="btn-home" onclick="window.location.href='index.php'" class="btn btn-outline-dark" type="button" name="button">Home</button>
<button id="btn-previous"onclick="sesion.previous();" class="btn btn-outline-dark" type="button" name="button">Previous</button>
</div>
<div class="sign-low">
<button id="btn-next" class="btn btn-primary pull-right" type="button" name="button" onclick="sesion.next();">Next</button>
<form class="" action="" method="post">
<input id="btn-finish" class='btn btn-primary btn-finish pull-right' type="submit" name='submitbutton' value="Finish" ></input>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
$dbServerName = "remotemysql.com";
$dbUsername = "usr";
$dbPassword = "pss";
$dbName = "usr";
// create connection
$db = mysqli_connect($dbServerName, $dbUsername, $dbPassword, $dbName);
if($_POST['submitbutton']) {
$myusername = mysqli_real_escape_string($db,$_REQUEST['user']);
$mypassword = mysqli_real_escape_string($db,$_REQUEST['passwo']);
$myemail = mysqli_real_escape_string($db,$_REQUEST['email']);
$mypname = mysqli_real_escape_string($db,$_REQUEST['pname']);
$mylastname = mysqli_real_escape_string($db,$_REQUEST['lastname']);
$myphone = mysqli_real_escape_string($db,$_REQUEST['phone']);
$mybirth = mysqli_real_escape_string($db,$_REQUEST['birth']);
$sql = "INSERT INTO users (name, passw, email,legalname,lastname,phone,birthdat)VALUES ('$myusername', '$mypassword', '$myemail', '$mypname','$mylastname','$myphone','$mybirth')";
if ($db->query($sql) === TRUE) {
echo "New record created successfully";
header("location: initx.php");
} else {
echo "Error: ";
}
$db->close();
}
?>
Estos son los errores:
Notice: Undefined index: user in C:\xampp\htdocs\signew.php on line 109
Notice: Undefined index: passwo in C:\xampp\htdocs\signew.php on line 110
Notice: Undefined index: email in C:\xampp\htdocs\signew.php on line 111
Notice: Undefined index: pname in C:\xampp\htdocs\signew.php on line 112
Notice: Undefined index: lastname in C:\xampp\htdocs\signew.php on line 113
Notice: Undefined index: phone in C:\xampp\htdocs\signew.php on line 114
Notice: Undefined index: birth in C:\xampp\htdocs\signew.php on line 115