Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: pollock77
  • Content: Threads
  • Order by date
  1. pollock77

    Checking Login Status

    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...
  2. pollock77

    Problem with Recalling Recent Messages

    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...
  3. pollock77

    PHP/MySQL Syntax Issues

    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]'...
  4. pollock77

    Syntax Question

    I'm not sure why this code isn't working. $data="('$_POST[username]', '$_POST[PASSWORD]', '$_POST[handle]', '$_POST[rank]', '$_POST[group]', '$_POST[gender]', '$_POST[av]')" $result3 = mysql_query("INSERT INTO users $data") or die(mysql_error()); echo "Account successfully updated...
  5. pollock77

    Branching

    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?
  6. pollock77

    mysql_num_rows();

    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...
  7. pollock77

    Fetching Data File

    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...
  8. pollock77

    Printing HTML in Conditional

    if($group eq admin) { print <<ENDHTML; <img src="main.png"> ENDHTML } I'm getting a 500 error, can I not do this?
  9. pollock77

    Chatroom Help

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

Part and Inventory Search

Back
Top