So I have the basic CRUD setup but when it comes to adding a new domain (or several records) it will allow me to add the first record (ID=0) in the database, but then wont let me add anything additional, can anyone tell me why?
Quote:
<html>
<head>
<base href="https://gfy.com/" /><!--[if IE]></base><![endif]-->
<title>Add Domain</title>
</head>
<body>
<a href="index.php">Go to Home</a>
<br/><br/>
<form action="add.php" method="post" name="form1">
<table width="25%" border="0">
<tr>
<td>Registrar</td>
<td><input type="text" name="Registrar"></td>
</tr>
<tr>
<td>Domain</td>
<td><input type="text" name="DomainName"></td>
</tr>
<tr>
<td>Registered</td>
<td><input type="text" name="Registration"></td>
</tr>
<tr>
<td>Expires</td>
<td><input type="text" name="Expiration"></td>
</tr>
<tr>
<td>NS1</td>
<td><input type="text" name="NameServer1"></td>
</tr>
<tr>
<td>NS2</td>
<td><input type="text" name="NameServer2"></td>
</tr>
<tr>
<td>Status</td>
<td><input type="text" name="Status"></td>
</tr>
<tr>
<td>Notes</td>
<td><input type="text" name="Notes"></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="Submit" value="Add"></td>
</tr>
</table>
</form>
<?php
// Check If form submitted, insert form data into table.
if(isset($_POST['Submit'])) {
$Registrar=$_POST['Registrar'];
$DomainName=$_POST['DomainName'];
$Registration=$_POST['Registration'];
$Expiration=$_POST['Expiration'];
$NameServer1=$_POST['NameServer1'];
$NameServer2=$_POST['NameServer2'];
$Status=$_POST['Status'];
$Notes=$_POST['Notes'];
// include database connection file
include_once("config.php");
// Insert user data into table
$result = mysqli_query($mysqli, "INSERT INTO DomainManagement(Registrar,DomainName,Registration ,Expiration,NameServer1,NameServer2,Status,Notes) VALUES('$Registrar','$DomainName','$Registration', '$Expiration','$NameServer1','$NameServer2','$Stat us','$Notes')");
// Show message when user added
echo "Record added successfully. <a href='index.php'>View Users</a>";
}
?>
</body>
</html>
|
Been playing with this a few hours trying to figure out why and its driving me crazy, it isnt kicking out any errors, just isnt entering data into the table
