Jump to content

Archived

This topic is now archived and is closed to further replies.

corneillie

need some help please

Recommended Posts

I do not know where in which forum I had to put this question, please move if not ok

 

PHP is not my thing, the following i found with tutorials on google:

 

<?
$conn = new COM("ADODB.Connection") or die("Cannot start ADO");

// Microsoft Access connection string.

$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=E:\\inetpub\\vhosts\\mydomainname\\private\\database\\C-HOST.mdb");

// SQL statement to build recordset.
$rs = $conn->Execute("SELECT Transfert FROM 1JaarGratis ");

// Display all the values in the records set
while (!$rs->EOF) {
    $fv = $rs->Fields("Transfert");
    if($fv == true) {
echo ("Promotie is ingeschakeld");

} else {

echo ("Promotie is uitgeschakeld");

}
    $rs->MoveNext();
}
$rs->Close();
?>

 

I want to have when the checkbox transfert is checked it says "promotie is ingeschakeld", when not checked "promotie is uitgeschakeld", but is does not work.

 

Connection to the database is ok.

The problem must be in the if statement. 

 

thanks for your help!

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.