Code: <input name="doLogin" type="image" src="images/loginsubmit.jpg" id="doLogin3" value="Login">
ON FIREFOX it works fine
but on Opera/IE it just refreshes and goes to login.php?
Here is my full thing:
Code: if (isset($_POST['doLogin'])=='Login')
{
include 'dbc.php';
$user_email = mysql_real_escape_string($_POST['usr_email']);
$md5pass = md5(mysql_real_escape_string($_POST['pwd']));
if (strpos($user_email,'@') === false) {
$user_cond = "user_name='$user_email'";
} else {
$user_cond = "user_email='$user_email'";
}
$sql = "SELECT `id`,`user_name`,`approved` FROM users WHERE
$user_cond
AND `pwd` = '$md5pass' AND `banned` = '0'
";
$result = mysql_query($sql) or die (mysql_error());
$num = mysql_num_rows($result);
// Match row found with more than 1 results - the user is authenticated.
if ( $num > 0 ) {
list($id,$full_name,$approved) = mysql_fetch_row($result);
if(!$approved) {
$msg = "Account not activated. Please check your email for activation code";
header("Location: ./?God=Login&msg=$msg");
exit();
}
// this sets session and logs user in
session_start();
// this sets variables in the session
$_SESSION['user_id']= $id;
$_SESSION['user_name'] = $full_name;
//set a cookie witout expiry until 60 days
if(isset($_POST['remember'])){
setcookie("user_id", $_SESSION['user_id'], time()+60*60*24*60, "/");
setcookie("user_name", $_SESSION['user_name'], time()+60*60*24*60, "/");
}
Redirect( "Thanks you have Successfully Logged in!", './?' );
exit;
}
else
{
$msg = urlencode("Invalid Login. Please try again with correct user email and password. ");
header("Location: ./?God=Login&msg=$msg");
}
}
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE'))
{
echo "hey";
}
?>
<form action="login.php" method="post" name="logForm" id="logForm" >
Code: <?php
/******************** ERROR MESSAGES*************************************************
This code is to show error messages
**************************************************************************/
if (isset($_GET['msg'])) {
$msg = mysql_real_escape_string($_GET['msg']);
echo "<div class="msg">$msg</div>";
}
/******************************* END ********************************/
?>
<center>
<div id="main_content">
<div id="login">
- <input name="usr_email" type="text" class="required" id="txtbox" size="25" style="background-color: transparent;
filter: alpha(opacity=50):
moz-opacity: .50;
opacity: .50;z-index:1;
">
</div>
<div id="password">
- <input name="pwd" type="password" class="required password" id="txtbox" size="25" style="background-color: transparent;
filter: alpha(opacity=50):
moz-opacity: .50;
opacity: .50;z-index:1;
">
<b><i>Remember Me?</i></b> <input name="remember" type="checkbox" id="remember" value="1">
</div>
<div id="submit">
- <input name="doLogin" type="image" src="images/loginsubmit.jpg" id="doLogin3" value="Login">
</div>
Getting number of affected rows in SQLPLUS..
Hi everyone,
upload control not working with update panel
Hi,I am working with Asp.Net FileUpload control with ajax update panel,if i use the AsyncPostBackTrigger,i am unable to get the filename in serverside,but if i use PostBackTrigger its working fine
Disable html within defined tags
I have a mysql database that allows users to enter content with html, but I also want to have a tag that will disable the html between it for example:<a
1,000 select boxes with 100 options?!
I have 1 drop down select box with 1,000 options.In some case, there will be 100+ of these select boxes, with absolutely identical options.Is there any way to avoid repeating 1,000 options for 100
extract a file from zip file
hi,i know how to unzip a zip file in php, but is there a way to just extract a certain file only?
Get dump of MySQL DB from Live Site
I'm after an easy, but secure way of generating and importing a MySQL dump from a remote server. The way I want to achieve this is as follows: 1) I will have a page on my localhost server with a form
this code is strange !
Hi i got this code from the web.. It checks for live and dead socksIt is working perfectly on my localhost. but does not work in any webserver ! any ideas ?<?php$filename =
php global variable
how can we create global variable so we can use its value in any form.. Please give example to
Filtering Tables
Hello Thanks for any help any one can give Im very new to PHP..I need to pull data for clients that share 2 diff services into one table.mysql_select_db($database_pull, $pull);$query_Recordset1 =
Count on multidimensional array
Hi, i got an array as below:Array( => Array ( [2009-12-08] => 1 ) [1] => Array ( [2009-12-07] => 1 ) [2]