$session_user=session_start();
$site_path="/Users/braunwald2009/Sites/";
$db_name="Workshop_Braunwald_2009";
$db_user="Braunwald2009";
$db_password="11thCVW";
//// $db_user='root';
//// $db_password='root';
$db_table="users";
//// $db_host="127.0.0.1";
$db_host="localhost";
$charSlash="/";
$abstract_dossier = 'upload/';
$poster_dossier = 'posters/';
$pres_dossier = 'presentations/';
?>
11th geodynamics workshop, Braunwald, Switzerland
mysql_connect($db_host,$db_user,$db_password);
$db_test = mysql_select_db($db_name);
// if ( $db_test==1 ) {
// echo "Connexion to ".$db_name." OK" ;
// }
mysql_query("SET NAMES 'ISO-8859-15'");
?>
if ( $_POST['id_login'] !='' AND $_POST['id_password'] !='' )
{
$query = 'SELECT id,admin,Login,Lastname,Firstname,email,Institution,accepted FROM '
.$db_table.' WHERE Login="'.$_POST['id_login'].
'" AND passwd="'.md5($_POST['id_password']).'"';
// echo( $query );
$result = mysql_query($query);
if ($donnees = mysql_fetch_array($result))
{
$_SESSION['id_user']=$donnees['id'];
$_SESSION['admin']=$donnees['admin'];
$_SESSION['login']=$donnees['Login'];
$_SESSION['lastname']=$donnees['Lastname'];
$_SESSION['firstname']=$donnees['Firstname'];
$_SESSION['email']=$donnees['email'];
$_SESSION['institution']=$donnees['Institution'];
$_SESSION['accepted']=$donnees['accepted'];
}
else
{
$login_error=true;
}
}
?>