I am trying to login for website with autologin to forum,and vcalender
its work fine in mozilla and ie but it gives problem in safari(IN MAC)
following is the code -
-
-
if(isset($_POST['btnsubmit']))
-
{
-
//echo "<pre/>";
-
//print_r($_POST);
-
-
$username=$_POST['txtuser'];
-
$password=$_POST['txtpass'];
-
-
$flag=0;
-
$str =" ";
-
$sql = "Select * from user_mast where user_name='".$username."' and pass='".$password."'";
-
//echo $sql;
-
$result = mysql_query($sql);
-
$rec = mysql_num_rows($result);
-
$row = mysql_fetch_array($result);
-
-
if($rec>0)
-
{
-
$flag =1;
-
$str= " ";
-
//$user_role = $row[role_id];
-
$sql = "update user_mast set login_status =1 where user_name='".$username."' and pass='".$password."'";
-
//echo $sql;
-
mysql_query($sql);
-
-
$_SESSION[admin_user_id] = $row[user_id];
-
$_SESSION[admin_user_name]= $row[user_name];
-
-
$_SESSION['id'] = $username;
-
-
echo '<form id="Login" name="Login" method="post" action="../admin/vcalendar/login.php?ccsForm=Login" >
-
<input type="hidden" name="login" value="'. $username.'" maxlength="100" size="20">
-
<input type="hidden" name="password" value="'. $password.'" maxlength="100" size="20">
-
<input name="hidden" type="button" value="Login">
-
</form>';
-
-
//$password = "admin123";
-
-
echo '<form id="frmforumlogin" name="frmforumlogin" action="../Forum/login.php?login=true&admin=true" method="post" enctype="multipart/form-data" >
-
<input type="hidden" name="username" value="'. $username.'"><br />
-
<input type="hidden" name="password" value="'. $password.'"><br />
-
<input type="hidden" name="redirect" value="../">
-
<input type="hidden" name="login" value="123">
-
<input type="hidden" value="" name="login">
-
</form>';
-
-
// echo '<form name="frmadmin_check" action="home.php" method="post">
-
// </form>';
-
echo '<script language="javascript">
-
document.Login.submit();
-
document.frmforumlogin.submit()
-
document.location.href="home.php";
-
</script>';
-
-
-
-
}
-
else
-
$str = "<font color='#FF0000'>Invalid User Name or Password.!</font>";
-
}
-
Thanks
4 3679 code green 1,726
Recognized Expert Top Contributor
Does anyone face this problem befor
It may help if you state what the problem is
but it gives problem in safari
In the mean time I suggesting testing the HTML source code at W3C
@code green
ok i try to explain,
when user enter his user name and password ,user must be login to mysite as well as to the phpbb forum and vcalender (which are third party tools), i just passed the user information to the respective login pages of phpbb and vcalender but it gives some problem,
it get login in my site but not in forum and vcalender
You have 3 forms with different actions, what do you expect to see? 3 browser windows or what?
if you want to solve this problem this way i can suggest you to create 3 iframes , with different names, and target all that forms to that iframes, then you will be able to login user to all that sites on a single page.
PS. use jquery for javascript, it very easy and cross browser
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Sarah |
last post by:
Hi all.
I have a form, and several text and image links on it that should
submit the form with different actions.
I prepared a simple page with just the code that's not working.
PROBLEM: The form won't submit if the link is clicked, but will submit
if the SUBMIT button is clicked. I need to call a function to change
the form's action according to user's input before it is submitted.
|
by: ivanhoe |
last post by:
All articles and tutorials I've seen on subject of forms say that if
there's name and value for submit button(input tag with
type="submit"), they'll get submitted along with the rest of the
form...
but I've just noticed (after debugging my perl script for quite a
while :/ ) that it is true only when user clicks on submit, and if
form is submitted via hitting enter you don't get name=value for
submit buttton...
|
by: Bob Lehmann |
last post by:
Hi,
I pretty sure I've seen this problem addressed before, but I can't find any
references.
The short story is that I have I have multiple submit buttons on a page,
each providing different functionality. For example, I have a search option,
a log in option and a save text option.
I would like to handle the submits in the Click event of each button. the
|
by: Sophisticado |
last post by:
Hi
Newbie here. I am trying to have two form actions on submission using a
javascript. The first calls a php class (http://www.blah.org/test.php)
and the second adds data to a mySQL database via a php function call (<?
php echo $editFormAction; ?>. Both actions work; however, only the
second action in the fucntion runs. Here is the code:
<script language=javascript>
<!--
|
by: Dabbler |
last post by:
How do I tell wether I'm seeing autopostback vs submit button click in
Page_load?
Thanks for any clues.
| |
by: Alex Maghen |
last post by:
In ASPX 2.0 with MasterPages and all that, my entire page only has one actual
<FORM>. But there are several different sections of the page that provide
what are functionally separate forms with separate Submit buttons.
In basic HTML, I can have multiple forms on a page and the browser knows
that if any of the fields for Form A have the focus, then pressing ENTER will
send a Click to the submit button for Form A. Same for Form B, etc.
...
|
by: mosesdinakaran |
last post by:
Hi All,
I need a small clarification in submitting the forms, Ur
suggestions please.
In a page I have two form and also two submit butons.
(ie)
|
by: mrbadboy |
last post by:
Hi,
I need to submit multiple forms with using single button. I've mentioned my code below.
<?
if(isset($_POST)){
print_r($_POST);
}
?>
<script type="text/javascript">
|
by: Daniel Klein |
last post by:
I'm pretty new at php and web stuff so please be gentle with me.
I'm trying to get a form to submit when the user presses the Enter
key. I do not want to use javascript. I've googled this to death and
cant find the answer (only hints), except on the 'Experts Exhange'
page and you have to pay to get the answer :-(
Why is this such a secret in the open source world we live in?
Daniel Klein
|
by: Petr Vileta \(fidokomik\) |
last post by:
I have a form with few text inputs. Every text input is followed by image type
input. In this form I want to have 1 submit button on the top. A problem I want
to resolve is: when user type something into text input and press enter then I
want to submit form by image type button but not by submit button. I tried to
use tabindex parameter but this not work as I expect.
Any idea?
Code example:...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |