Okay, for this page, I need to check if the user is logged into my site or not. If the person is, $_SESSION['username'] will return a true value. If the value is true, I want to print the content of the page. If it returns false, I want to print an error message like "You are not currently...
Okay, the following code is for a type of chat room in which, either messages that are less than 15 minutes old, or the most recent 25 messages will be printed. However, all that is being printed is the HTML tag and the Backround tag, which are not in the PHP coding. And, yes, I do have a...
I have recurring issues with incorporating SQL syntax with PHP.
This is what I have, followed by the error I'm getting.
elseif ($_GET[action] == 'edit' & $_POST[username] != '') {
$query="UPDATE users SET username='$_POST[username]', PASSWORD='$_POST[PASSWORD]', handle='$_POST[handle]'...
I'm sort of confused. I'm a beginning programmer, and I first learned PERL. I'm wondering if PHP has branching for if, elsif, elsif, elsif, else type of thing where there are mulitple situations, and if so what is the syntax for it?
I can't get this function to work. A sample code:
<?
$link = mysql_connect("localhost", "users", "users");
mysql_select_db("users", $link);
$result = mysql_query("SELECT * FROM user", $link);
$num_rows = mysql_num_rows($result);
echo "$num_rows Rows\n";
?>
And I'm getting the following...
open(ACCOUNT, $data_file) || die("Could not open file!");
@raw_data=<ACCOUNT>;
close(ACCOUNT);
foreach $account (@raw_data){
chop($account);
($username,$rank,$handle,$password,$group,$word)=split(/\|/,$account);
I want the ($username,$rank,$handle,$password,$group,$word) in a separate...
Hello!
I'm a relatively new programmer and I would like to create a chat room.
I would like it to be similar to this:
http://thematrixlobby.co.uk/members/lobby/
username: chloec
password: 102030
As far as I know, this chat uses the $ENV{REMOTE_USER} to access a user file, which is simple...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.