<?php
error_reporting(E_ALL);
include ("classes/sql.php");
function check()
{
$sql = new mn_mysql();
$sql->dbase = "db_name";
$sql->host = "db_host";
$sql->user = "db_user";
$sql->passwd = "db_user_pass";
$sql_result = "";
$pri = "";
$user = $_POST['user'];
$passwd = $_POST['passwd'];
if($sql->connect())
{
$sql_result = $sql->query("SELECT * FROM login ORDER BY idx");
}else
{
die("error: " . mysql_error());
}
/*
additional there is some more missing. but ur fantasy is given an open end :)
i just wanted to show in this example how to use the class in php files.
for my example i used a root directory and a 'classes' directory in it.
hope my example could help anyone :)
*/
?>
|