The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Basic SQL query question
I realize this is really basic, I'm learning as I go.
I'm trying to make a simple page to add data to a database. The database is named 'php', and I have a table with: id (int, auto increment) and text fields named lastname, firstname, org, cdate and notes. My form input is a quick table, the inputs look like this: Code:
<td width="100">Lastname</td> <td><input name="lastname" type="text" id="lastname"></td> I've defined these variables to grab the post data: Code:
$lastname = $_POST['lastname']; $firstname = $_POST['firstname']; $org = $_POST['org']; $cdate = $_POST['cdate']; $notes = $_POST['notes']; Code:
// Add the info $query = "INSERT INTO users (lastname, firstname, org, cdate, notes) VALUES ('$lastname', '$firstname', '$org', '$cdate', '$notes')"; mysql_query($query) or die('Error, insert query failed'); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|