Hello, I have this code:
<?php
/**
* @author samoi
* @copyright 2009
*/
error_reporting(E_ALL & E_NOTICE);
include ('func.php'); // this has the session_start() func!
if (isset($_SESSION["uid"])) {
$_SESSION["uid"]+= 1;
} else {
header('location: login.php'); // it's not redirecting! it gives a white page only!
die(); // I run this die() and error_reporting() to debug, but no chance!
}
echo $_SESSION["uid"];
echo '<br />';
echo '<a href="logout.php"> LogOut </a>';
?>
it works if it's in ongoing session!
but fails if no session in there, it does not work "header()" !
Thank you in advance!
Local file browser with php
Halo..So this is what i want to create. I have a folder that i share and it has many movies..So i will setup a local web browser and i want to make a .php file that after you login it will saw you the
This must be easy , pulling the last record of the day, every day, from a txt
I have a txt file logging weather data every minutes (so 1 record per minute). I want to extract the data from the (and only that one) last record for every single day in the log file. Each record as
Table colours fail when extra row added
Hey Gurus,I got a weird problem with formating the colour of a table made in php. Everything works fine when i use 5 rows each row has an alturnative colour, but when i add the 6th row the colour
Error: SQL Syntax; Line 1
Code: <?php require "global_settings.php"; ?><title><?php echo $sitetitle; ?></title><center><style
Socket problem
Hello,Earlier I posted about my problem with my socket script. It took up to 100% CPU usage.Now I found the problem. With another found simple PHP socket script, I saw it has the same problem.The code
Why is this function returning a false value when it shouldn't be??
This is in an include file. I want it to check a value in an html form and see if it's just white space, is numbers, is empty etc.Code: (text) [Select]<?phpfunction
Storing Values taken from a DB...
Using this code it will generate a short list from my database <?phpmysql_connect('localhost','root','');mysql_select_db("clients");$fname = $_POST['firstname'];$SQL = "SELECT *
unserialize help, getting errors
hi all , I got a form with 6 fields (2 input and 4 select box), when the page loads one block is shown and through javascript all the fields can be copied multiple times so I need to store the data in
Inserting into MySQL Newbie
Hi ive got a slight problem where ive made a simple web form where the customer inserts the ammount of tickets and then enters their personal details... then this form does the post method and it then
Replacing a string on click of a button
Hi! Is there a way to replace a string on a click of a text link?This is what I've come up with. It doesn't work at all ^^;;Code: <head><?php $string = Red;function changeBlue()