logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Coding & Scripting Corner View previous topic :: View next topic
Reply to topic   Topic: SQL insert statement failure
Author
tauwie



Joined: 10 Aug 2006
Posts: 2

PostPosted: Thu 10 Aug '06 14:39    Post subject: SQL insert statement failure Reply with quote

Hello,
I'm having a big problem:
I have installed apache 2.2.3 and PHP5 and MYSQL5.0 and everything works fine.

I have made a select statement and that works perfect but
when i want to store data to my database the insert statement simply does nothing although it seems to be correct.
I think it has something to do with my php.ini file but I have no idea.

Can anyone suggest a solution?

Here you have an extract of my insertcode :
$id=$_POST['id'];
$name=$_POST['name'];
$omschrijving=$_POST['omschrijving'];
$geboortejaar=$_POST['geboortejaar'];

$db = mysql_connect("localhost", "root","root");
mysql_select_db("pet",$db);
$sql = "INSERT INTO personenwagen (id,name, omschrijving,geboortejaar) VALUES ('$id','$name','$omschrijving','$geboortejaar')";
$result = mysql_query($sql);
Back to top
tauwie



Joined: 10 Aug 2006
Posts: 2

PostPosted: Thu 10 Aug '06 14:42    Post subject: Reply with quote

I rest my case.
The insert statement is working.
I was referring to a different table.
Stupid
Back to top


Reply to topic   Topic: SQL insert statement failure View previous topic :: View next topic
Post new topic   Forum Index -> Coding & Scripting Corner