954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Inserting Data into mySQL Database via PHP not Working

I am Using a form to insert data into a table i have created, I receive no errors but for some reason, it states it worked, although it does not insert any data, Here is what I'm using:
this is the form page:

<head>
	<link rel="stylesheet" href="../uploads/css/style.css"  type="text/css" />
</head>
<body>
<form method="post" action="_update_db.php">

Name:

<input type="text" name="Name" size="11" />

Title:

<input type="text" name="Title" size="30" />

Description:

<input type="text" name="Description" size="50" />

<input type="submit" value="Update Database" />

</form>
</body>



Here is the PHP script:

<head>
	<link rel="stylesheet" href="../uploads/css/style.css"  type="text/css" />
</head>
<body>
<?php
$Name = $_POST['Name'];
$Title = $_POST['Title'];
$Description = $_POST['Description'];

mysql_connect ("xxxx", "xxxx", "xxxxx") or die ('I cannot connect to the datebase because: ' . mysql_error());
mysql_select_db ("xxxxxx");

$query="INSERT INTO game_pages (ID, Name, Title, Discription)VALUES ('NULL','".$Name."', '".$Title."', '".$Description."')";

echo "Database Updated With: Name: " .$Name. " Title: ".$Title." Description: ".$Description ;

?>
</body>


Any Ideas, thanks in advance.

giddyhank
Newbie Poster
4 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 
evstevemd
Senior Poster
3,713 posts since Jun 2007
Reputation Points: 462
Solved Threads: 392
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: