Jump to content


Photo

cOlouR mE thIs, coLOUr Me thAt <?>


  • Please log in to reply
2 replies to this topic

#1 jaic

jaic
  • Members
  • PipPip
  • Member
  • 18 posts

Posted 30 October 2006 - 07:20 PM

Hi, I am have only recently started PHP, and I have added some functions to my website, but I cant get it
to do what I want at the later stage after "LOGIN".

Can anyone help?
This is what i want to do on my site www.jaicpromotions.co.uk, go to 4DJ's, then LOGIN, using this:
User: jaicpromotions
Password: superdj

Problem 1
The next screen i want to be black background and "ACCESS DJ AREA" in orange in the middle of the page, underlined

Problem 2
If you DONT submit the correct USERID and PASSWORD, then the same with "ACCESS DENIED" in orange in the middle of the page, underlined

The Code I have at the moment, is:

<?php
session_start();
$_SESSION['username'] = $_POST['user'];
$_SESSION['userpass'] = $_POST['pass'];
$_SESSION['authuser'] = 0;

//check username and password information
if (($_SESSION['username'] == 'jaicpromotions') and
    ($_SESSION['userpass'] == 'superdj')) {
$_SESSION['authuser'] = 1;
} else {
echo "ACCESS DENIED";  exit();
}
?>
<html>
<head>
<title>Get To DJ Exclusive Page</title>
</head>
<body>
<?php
$myfavrecord = urlencode("Untouchable 3");
echo "<a href='\\/www.jaicpromotions.co.uk/4djs.htm'>";
echo "ACCESS DJ AREA";
echo "[/url]";
?>
</body>
</html>

can anyone please help me???  your help will be greatly appreciated! 

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 30 October 2006 - 07:36 PM

remove the
exit();
function after
echo "ACCESS DENIED";
in your code.

#3 jaic

jaic
  • Members
  • PipPip
  • Member
  • 18 posts

Posted 30 October 2006 - 07:47 PM

thanks for your reply but . . .  :-[ that removes the switch between the two outcomes of accept and reject, they are then strung together. . .

perhaps, is there a way of making the unsuccessful entry response show a small phrase under the login box, such as: " Not Recognised ", try again??? Or some thing like this?

Jai




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users