I want store html input data store sql server database using php, just may know give it your solution Ignore as possible here is the code ...
<?php
$serverName = 'SRB-Nick_Desktop\SQLEXPRESS';
$connectionInfo = array('Database'=>'cslogs', 'UID'=>'cslogslogin',
'PWD'=>'123456');
$connection = sqlsrv_connect($serverName, $connectionInfo);
if( $connection === false )
{
echo "Connection could not be established.\n";
die( print_r( sqlsrv_errors(), true));
}
$tsql = "INSERT INTO logs(ForteID, disposition, appnumber, Finance_Num,
num_payments, ach_cc, date, notes) VALUES (?,?,?,?,?,?,?,?)";
$parameters = array( "forteid", "LOC", "NCXXXXXXX4", "SRB-000004", "0",
"cc", "2012-11-01", "gave LOC instructions");
$stmt = sqlsrv_query($connection, $tsql, $parameters);
if( $stmt === false ){
echo "Statement could not be executed.\n";
die( print_r( sqlsrv_errors(), true));
}
else
{
echo "Rows affected: ".sqlsrv_rows_affected( $stmt )."\n";
}
sqlsrv_free_stmt( $stmt);
sqlsrv_close( $connection);
?>