Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: SQL insert statement failure |
|
Author |
|
tauwie
Joined: 10 Aug 2006 Posts: 2
|
Posted: Thu 10 Aug '06 14:39 Post subject: SQL insert statement failure |
|
|
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
|
Posted: Thu 10 Aug '06 14:42 Post subject: |
|
|
I rest my case.
The insert statement is working.
I was referring to a different table.
Stupid |
|
Back to top |
|
|
|
|
|
|