I am new to PHP. For me PHP was always a plugin or script I could find, but now I have reasons to actually learn it. Anyways. I have this system built for a league on a certain game I like to play, and I have created a page that allows you to create teams. The form functions, and tells me the team is made, but in my database it is nowhere to be seen. I am sure I have messed something up, possibly my INSERT.
Here's a SS of the database tables; https://gyazo.com/96c061f9ee8c5bd4599a4e096364c6c9
Here's some code;
//insert the row into the database
$query = mysqli_query("INSERT INTO team (Name, Abbreviation) VALUES('$teamname', '$TeamAbbrev')");
//display the success message
successMsg("Team added");
logActivity(onlineUser(), "Added", '$TeamID');
}
}
}
}
?>
<form method="post" action="<?php echo $PHP_SELF;?>">
<p>
<label>Team Name</label><br />
<input type="text" class="text small" name="Name" />
</p>
<p>
<label>Team Abbreviation</label><br />
<input type="text" class="text small" name="Abbreviation" />
</p>
<BR />
<div class="tableactions">
<input type="submit" name="AddTeam" class="submit mid" value="Add Team" />
</div> <!-- .tableactions ends -->
</form>
</div> <!-- .block_content ends -->