473,473 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Link

65 New Member
Hi friends,
Is it possible to link the same page with in itself using '<a>' tag?
what i'm asking is if i'm creating a login form, when i run it and i mistype the pwd, it shows "Plz, Try again, Wrong Password",
then how can i go to the back page?
If i'm giving like the following, it doesn't works:

code:(php)
(login.php)

if ($_POST['pass'] != $info['password'])
{
echo 'Incorrect password, please try again.';
echo "<a href="login.php"> Go Back </a>"; //This shows me error
}

Plz....Help me..!!!

Thanx n regards.
Feb 14 '08 #1
3 1262
harshmaul
490 Recognized Expert Contributor
Hi friends,
if ($_POST['pass'] != $info['password'])
{
echo 'Incorrect password, please try again.';
echo "<a href="login.php"> Go Back </a>"; //This shows me error
}

Plz....Help me..!!!
Thanx n regards.
Two solutions... firstly you can use the escape charachter....

Expand|Select|Wrap|Line Numbers
  1. if ($_POST['pass'] != $info['password'])
  2.    {
  3.     echo 'Incorrect password, please try again.';
  4.     echo "<a href=\"login.php\"> Go Back </a>"; //This shows me error
  5.    }
Or you can do it like this....


Expand|Select|Wrap|Line Numbers
  1. if ($_POST['pass'] != $info['password'])
  2.    {
  3.     ?>
  4.      Incorrect password, please try again.
  5.     <a href="login.php"> Go Back </a>
  6.    <?php
  7.    }
Hope they help :)
Feb 14 '08 #2
yasmine
65 New Member
Two solutions... firstly you can use the escape charachter....
Expand|Select|Wrap|Line Numbers
  1. if ($_POST['pass'] != $info['password'])
  2.    {
  3.     ?>
  4.      Incorrect password, please try again.
  5.     <a href="login.php"> Go Back </a>
  6.    <?php
  7.    }
Hope they help :)
Yah! Its working..........
Thanx harshmaul....
Feb 14 '08 #3
harshmaul
490 Recognized Expert Contributor
No problems. Glad i could help!
Feb 14 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

26
by: Harrie | last post by:
Hi, After Brian mentioned the use for <link rel=..> for navigational purposes in another thread, I've been looking into it and found that HTML 3.2 has two other recognized link types than HTML...
4
by: Franklin | last post by:
WITHOUT KNOWING ANYTHING ABOUT THE CURRENT COLORS, I want to swap the foreground/background colors of a link when someone hovers over it. Is this possible with HTML, CSS, DOM, & JavaScript? If...
8
by: sudhirlko2001 | last post by:
How to swap two nodes of doubly Linklist
14
by: Steve McLellan | last post by:
Hi, Sorry to repost, but this is becoming aggravating, and causing me a lot of wasted time. I've got a reasonably large mixed C++ project, and after a number of builds (but not a constant...
7
by: Kurda Yon | last post by:
Hi everybody, I cannot understand the following thinks. The last line of the fillowing code produces a message about mistake (not a valid MySQL- Link resource): $link = mysql_connect(...
0
marktang
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,...
0
Oralloy
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,...
0
jinu1996
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...
1
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...
0
agi2029
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,...
1
isladogs
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.