I have searched a couple times and have tried a couple online examples but I can not for the life get PHP to write to an MS Access db via ODBC.
I have Apache and PHP installed and both appear to be running properly. I used PHPBuilder.com and the example at W3Schools literally making the system dsn and the same db that they describe but I can not for the life of me get the form to write to the tables. The forms I created show up just fine the data is just not stored properly.
I'm getting no error messages and after I use the submit button I do get to the page that is supposed to be writing to the db but no data gets saved.
Is there a thread already somewhere that discusses this?
I used the more current versions of PHP though. Step 3 is giving me an error on my home machine which didn't give me an error on my work machine. Maybe there is something wrong with there example and there's a better example elsewhere?
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Actually things as simple as this are giving me blank pages.
It appears my services are working and I see a system dsn created. This is a sample from a web page that I tried to recreate but I can't remember which one right now.
Becky
<html>
<head></head>
<body>
<? php
# connect to a DSN "my_db" with a user and password "marin"
$connect = odbc_connect("my_db", "becky", "tigger");
# query the users table for name and surname
$query = "SELECT name, surname FROM people";
echo $query;
# perform the query
$result = odbc_exec($connect, $query);
# fetch the data from the database
while(odbc_fetch_row($result)) { $name = odbc_result($result, 1); $surname = odbc_result($result, 2); print("$name $surname\n"); }
# close the connection
odbc_close($connect); ?>
</body>
</html>
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]