PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
You appear to be writing to the file in the format "&$day$period=$name - $subject \r\n"; ... but reading in and exploding on , ? There's no comma in that format.
Also, you write to the file before checking if it's taken?
if($username == &$day$period){ looks like it should be at least if($username == "&$day$period"){ .. and are you sure username is a copmbination of &$day$period ? Sounds weird for a username, and you also have a $name variable..what's that if it's not a username?
The layout and variable names make it hard to work out exactly how it's supposed to work, maybe add some more comments explaining what's going on?