Jump to content

[SOLVED] PHP/SQL frustration - I'm probably being a bit thick...


3d!T

Recommended Posts

Hi! I'm quite the N00b round here, so be lenient...

I'm working on a job listings page for a recruitemnt site. I've set up an SQL db with no problem, and can call SELECT statements to display the data on my PHP page. I'm now working on a back end content management bit for the dorks who work here to update the jobs themselves. So I've been binding the form fields to the SQL fields and all seemed well - except it will not insert the data into the db... I've now broken down the page to literally just insert what I'm telling it to:

[code]
<?
require("Connections/jobsdb.php");
echo("Database connection successful.\n");

$query = "INSERT INTO Current_Jobs VALUES ('', 'testing', 'fooooooooooobaaarrrrr', 'bidleybum', '2007-01-11', 'blah', CURDATE())";

mysql_query($query);

mysql_close();
?>
[/code]

When I preview the page (on the server), it seems to run without error, but fails to add a new row of data. I have checked the SQL statement in the MySQL Query Browser, and it works. Can someone please tell me what planet I'm on?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.