I am trying this way but it doesnt work:
$sql = "INSERT INTO customers (userName,password,email,tel,companyName,idNumber,streetAddress,zipCode,city,coAdress) VALUES ($_POST['userName'],$_POST['password'],$_POST['email'] ,$_POST['tel'],$_POST['companyName'],$_POST['idNumber'],$_POST['streetAddress'],$_POST['zipCode'],$_POST['city'],$_POST['coAdress']);
if ($conn->query($sql) === TRUE) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
I have now finally been able to see the output of:
Form.php
<form class="form" method="post" id="compReg" action="process.php">
<input type="submit">
connect.php
<?php
print_r($_POST);?>
The output when fields are exported is this:
Array ( [name] => Hedda Calhoun [email] => pinecozy@gmail.com [tel] => +539-48-6021045 [password] => Pa$$w0rd! [cpassword] => Pa$$w0rd! [companyName] => Underwood and Christian LLC [personalNumber] => 119 [streetAdress] => Enim officia et at numquam est voluptas placeat nulla et corporis dolorem in eum modi ratione incidunt nihil [zipCode] => 58366 [city] => Unde quis vel quam eiusmod rerum quaerat voluptatum labore provident [coAdress] => Nostrud culpa sint quis ab est in obcaecati illo consequat Ducimus nulla )
How can I load these into a php array so I can acces the and export them to the database?