I see what this trying to do. However, I'm not trying to create custom login to coppermine only. I have a login to my site, link posted above, that logs you into the rest of the site. the user database is my coppermine photogallery user database, however I would like my site login to, not only create a user session for my site, but also login that user into coppermine. my login page script is
<?php
include 'dbc.php';
$user_name = mysql_real_escape_string($_POST['user_name']);
if ($_POST['Submit']=='Login')
{
$user_password = addslashes($_POST['user_password']);
$sql = "SELECT user_id,user_name FROM cpg_users WHERE
user_name = '$user_name' AND
user_password = '$user_password'";
$result = mysql_query($sql) or die (mysql_error());
$num = mysql_num_rows($result);
if ( $num != 0 ) {
// A matching row was found - the user is authenticated.
session_start();
list($user_id,$user_name) = mysql_fetch_row($result);
// this sets variables in the session
$_SESSION['user_name']= $user_name;
if (isset($_GET['ret']) && !empty($_GET['ret']))
{
header("Location: $_GET[ret]");
} else
{
header("Location: index.htm");
}
//echo "Logged in...";
exit();
}
header("Location: login.php?msg=Invalid Login");
//echo "Error:";
exit();
}
?>
<title>Our Family Website Login</title>
<p align="center">
<img border="0" src="images/CHROMElogoshadow.jpg" width="399" height="50"></p>
<link href="styles.css" rel="stylesheet" type="text/css">
<br>
<table width="280" border="1" align="center" cellpadding="3" cellspacing="0">
<tr>
<td bgcolor="#AAAA84" class="mnuheader" height="30" width="280" >
<div align="center"><font face="Arial" style="font-size: 17pt">
<strong style="font-weight: 400">Our Family Website Login</strong></font></div></td>
</tr>
<tr>
<td bgcolor="#C2C2A7" class="mnubody" height="100" width="280">
<form name="form1" method="POST" action="" style="word-spacing: 0; line-height: 90%; margin-top: 0; margin-bottom: 0">
<p align="center"><br>
<font face="Arial">Username:<sp></font>
<input name="user_name" type="text" id="user_name" size="26"><font face="Arial"><br>
<br>
Password:
</font>
<input name="user_password" type="password" id="user_password" size="26">
</p>
<p align="center" ><input type="submit" name="Submit" style="height: 25px; width: 100px"value="Login"></p>
<p align="left"><a href="forgot.php">Forgot your password?</a></p>
</form></td>
</tr>
</table><br>
<?php if (isset($_GET['msg'])) { echo "<div class
I will also upgrade my coppermine to the current version....thanks for the help