Jump to content

Recommended Posts

Excellent, that fixed that and I now have the following on the page source of css

 

color: '#ffffff';

background-color: '#00CCCC';

 

Which is the correct values taken from the databse BUT the page is still displaying white and not those actual colours!!

 

Thanks

Fixed that!

I was stupid and put 'color'!

 

Its changed now  ;D

 

Last problem is that when I changed my query back to '$id' it stopped working again and when I viewed the source of CSS the values for colour and text were blank!

 

Yeah it did say body, sorry forgot to copy and paste that bit!!

index.php

<?php
if ($u && $p) {
$query = "SELECT user_id, club_id, validate FROM users WHERE username='$u' AND password=PASSWORD('$p')";
$result = @mysql_query($query);
$row = mysql_fetch_array ($result, MYSQL_NUM);

/* If they match create session */
if ($row) {
	$validate=$row[2];

	if ($validate == 1) {
		/* Redirect to main.php when logged in */
		$_SESSION['user_id']=$row[0];
		$_SESSION['club_id']=$row[1];
		header ("Location: http://" .$_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "main.php");
		exit();
?>

 

session_start() is written inside header.html which is called in every page.

 

Thanks

But you still need session_start() on that page. Try putting it in at the top but under <?php of course. :D If that doesn't work, I'll check up on this later.

 

Dinnertime for me, so I'll check back later. Maybe someone else can fill in for me while I'm satisfying my tummy. :D

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.