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>
Echoing ASCII code
I have a php page that splits a string into chars and then echoes the ASCII code for each char. I'm trying to get it print the original value => ASCII code, splitted by :, like:A => 65:
Need help urgant
why down my code ony return one item instead of all the items selected. $arr =
C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.What libraries can I link into my project to make this work?I read about the OCI - but I cannot find any
Sufficient protection from bad input?
I am writing a simple script to let people upload 'pages' of their own content, be it simply a few bits of HTML, pictures and whatnot, and recieve their own url.. I've without testing, wrote this part
Javascript form submit and radio buttons?
When this form is submitted, it is automatically resubmitted using JS.All my fields are carried over in the $_post except for total, and state which are radio buttons and a drop down.Code:
IDOC error
Hi,
newbie question
Hi out thereIm totaly new in this forum and to .net and vb so here is a totaly newbie question.I want to make a couter display how many times ive clicket a buttonWhy does my code alwas start over at 0
re calling a function without including file
Hi,i am new to programming in php, i was just checking the wordpress code and found out in the wordpress code they are calling the function get_header(); at the top of every page but above calling
simple script won't work. Please help
I'm new to php, and I am having trouble displaying a simple script in my web browser. My php code executes fine but the html tags in my script are treated as text and displayed on the page. This is
problem with sql querry in php script
Hello guys, What I want to do is I want to read out a csv file and then but te conent ot the file in a msql datbase . So far it works but the problem I haven that if I want to let te script to the