Jump to content

form does not change after 'login'


dominic600

Recommended Posts

I have a javascript running my login boxes like the username and password boxes.

 

and when i login its supposed to look like "admin | Logout"

 

well when i log in the boxes say the same and it just gives me a readout saying i logged in.

 

theres the javascript, eventho i dont think it is wrong with that but then again idk..

function usernamebox_focus(){
var usernameboxid = document.getElementById("usernamebox");
if (usernameboxid.value == "Username"){
	usernameboxid.value = "";
	usernameboxid.style.color = "#000";
}
}

function usernamebox_blur(){
var usernameboxid = document.getElementById("usernamebox");
if (usernameboxid.value == ""){
	usernameboxid.value = "Username";
	usernameboxid.style.color = "#999999";
}
}

function passwordbox_focus(){
var passwordboxid = document.getElementById("passwordbox");
if (passwordboxid.value == "Password"){
	passwordboxid.value = "";
	passwordboxid.type = "password";
	passwordboxid.style.color = "#000";
}
}

function passwordbox_blur(){
var passwordboxid = document.getElementById("passwordbox");
if (passwordboxid.value == ""){
	passwordboxid.value = "Password";
	passwordboxid.type = "text";
	passwordboxid.style.color = "#999999";
}
}


 

and then heres the top.

<?php
session_start();
$username = $_SESSION['username'];
$userid = $_SESSION['userid'];
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>1st Gen Cummins Blog | Login</title>
<link href='main.css' rel='stylesheet' type="text/css"></link>
<script language="javascript" src="scripts/javascript.js"></script>
</head>
<body>
<div id='header'><div id='headercnt'>1990 Dodge Cummins Turbo Diesel
<div id='status'><?php require('scripts/status.php'); ?></div>
</div>

Link to comment
https://forums.phpfreaks.com/topic/244188-form-does-not-change-after-login/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.