Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 db connect

Author  Topic 

maxbox
Starting Member

2 Posts

Posted - 2008-12-01 : 13:04:04
hello
I need create an db conection to this php script :
the tables 'call' is all ready created in the myphpadmin



<?php
/*
* MySQL Databas:
*
* CREATE TABLE call (
* id int(11) auto_increment NOT NULL,
* paynr varchar(11) NOT NULL,
* custnr varchar(15) NOT NULL,
* code varchar(6) NOT NULL,
* tax varchar(3) NOT NULL,
* date varchar(10) NOT NULL,
* primary key (id)
* ) TYPE=MyISAM;
*
* Funtion:
* save information to db
*
*
*/

error_reporting(0); /* off error raport */

/* databas-connect */




// variabler
$paynr = mysql_real_escape_string($_GET['PAYNR']);
$custnr = mysql_real_escape_string($_GET['CUSTNR']);
$code = mysql_real_escape_string($_GET['CODE']);
$tax = mysql_real_escape_string($_GET['TAX']);
$date = time();

// save in the db
mysql_query("INSERT INTO table_call (paynr,custnr,code,tax,date)
VALUES ('$paynr','$custnr','$code','$tax','$date')");

/* databas-closed */
?>



visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-01 : 13:09:21
it seems like you're using mysql. this is ms sql server forum. post in some mysql forums like www.dbforums.com to get more help on this.
Go to Top of Page

maxbox
Starting Member

2 Posts

Posted - 2008-12-01 : 13:27:24
quote:
Originally posted by visakh16

it seems like you're using mysql. this is ms sql server forum. post in some mysql forums like www.dbforums.com to get more help on this.



ok, thank you
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-02 : 00:38:01
Cheers
Go to Top of Page
   

- Advertisement -