i'm learning php and some basic db stuff.. like i can read and print any info of my DB. BUT i can't get the insert to work properly..
i'm making lots of test and well it'll go faster if someone helps me
i know this is not good .. but i really don t get the insert function AND i absoloutly don t know how to use the WHERE ...
nyways as you can see i m a real noob
okay my table name is List, i have 3 field
1-nom
2-phone
3-key (wich is my primary key)
Code: Select all
<table width="752" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="center" class="textegris">
<td height="25"><strong>Nom</strong></td>
<td height="25"><strong>Centre</strong></td>
</tr>
<?php
$name = $_POSTї"name"];
$centre = $_POSTї"centre"];
echo ("<tr>");
echo ("<td>$nom</td>");
echo ("<td>$centre</td>");
echo ("</tr>");
if (!($connect = odbc_connect("x", "user", "pswd"))) {
echo "connection failed";
}else{
$connect = odbc_connect("x", "xx", "pswd");
$query = "INSERT INTO List ( nom, phone, key) VALUES ('nom', 'centre', '1')";
$queryexe = odbc_do($connect, $Query);
odbc_close($connect);
?>