hi,....
I installed apache on :
c:\Program Files\Apache Group
and in apache group there are subdirectory,sub subdirectory,....
apache group\apache\htdocs
I must put any php file on that subdirectory "htdocs" else will not work .
for example:
If i have "standalone.php" file consist of the following code:
<?php
$dsn = "mydb";
$user = "st";
$password = "1";
$odbcid = odbc_connect ($dsn, $user, $password, "");
if($odbcid!=false)
print "connected";
$query_string="INSERT INTO users(Id,Name) VALUES('1','mmmm');";
$resultid = odbc_do($odbcid,$query_string);
echo $resultid;
?>
I have to save this file on c:\program files\apache group\apache\htdocs
so I can test it by Internet Explorer address " http:\localhost\standalone.php "
note: I used ODBC in the control pannel to use access2000 database and "mydb" is dsn name.
until now am talking about apache. ok?
you sent the following code:
I know it is different way to connect by using MySQL ( mysql_connect() )
<?php
$dbhost = "localhost";
$dbuser = "MYUSERNAME";
$dbpass= "MYPASSWORD";
$ddb="MYDATABASE";
$link_id = mysql_connect($dbhost, $dbuser, $dbpass);
if (!(mysql_select_db($ddb,$link_id))) die ("connection failed");
?>
so If I need to do all that things by using MySQL what must I do?
I meant:
the directory of MySQL that I have to save my "standalone.php" file
how can I configure my database on MySQL (my database is Access2000 database by using ODBC ? or another way?)
where must I save my database?
If I want to use my Internet Explorer should I put "http:\localhost\standalone.php" or what I have to write?
Thats all
I hope you send your Reply in details.
thanks for your help