just found the php.db group... wrong place... sorry
"Londonvibe" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> new to php so be nice :)
>
> win2k.... iis5.....ms access..
>
> what is the order for adding var's to a access DB ??
> i can read data form the DB ok.. even print it out in a nice table :)...
but
> not sure how i write to the DB... it's driving me mad... any help or faq's
> would be cool...
>
> code i tried... with data from form don't work...
>
> // connect to system dsn odbc name login and password or die
> $connect = odbc_connect("DB","name","pword") or die (" not connected");
>
> $sql="INSERT INTO basket (Item,Amount,Price) Values
> ('$id','$amount','$price')";
> // prepare SQL statement
> //$sql_prepare = odbc_prepare($connect,$sql) or die("Couldn't prepare
> query.");
> // prepare SQL statement
> $sql_result = odbc_prepare($connect,$sql) or die("Couldn't prepare
query.");
>
> // execute SQL statement and get results
> odbc_execute($sql_result) or die("Couldn't execute statement1.");
>
> odbc_free_result($sql_result);
> odbc_close($connect);
>
>
>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to