arcticvman
MIS
I am new to PHP, and I am having trouble inserting information into a MSSQL table. I have searched the web and have found little information pertaining to PHP and MSSQL so I am asking for help again.
What I am doing is displaying queried page from the table and giving an option to insert more information into the table.
The insert is as follows:
I am looking to update the table with the information and return something saying that the record was updated.
Thanks in advance.
What I am doing is displaying queried page from the table and giving an option to insert more information into the table.
The insert is as follows:
Code:
<?php
//connect to a DSN "myDSN"
$conn = odbc_connect('DSN','reports','password');
if ($conn)
{
$query = "INSERT INTO dbo.PROD (comments, trx_dt, serial_no)
VALUES ('this is a new comment', '10/21/2011 12:00:00AM', 880-1279)";
odbc_close ($conn);
}
else echo "odbc not connected";
?>
I am looking to update the table with the information and return something saying that the record was updated.
Thanks in advance.