Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. Google 'PHP/AJAX chat box' and you should find some useful information.
  2. If this is solved then mark as so (bottom left button).
  3. Maq

    session_id

    I believe it can but the chances are so low that it's not even worth worrying about. Realistically you can assume it will be unique.
  4. We're here to help, not write code for you. Follow BlueSky's link and try to implement something on your own, if you get stuck, we can help you at specific parts. Otherwise, you will probably receive little help.
  5. 1) Please do not double post. If the topic belongs elsewhere then someone will move it. 2) I put tags around your code, use them next time.
  6. It sounds like you want to use something like mod_rewrite but I'm really not sure what 'between a click and a land' means. Could you provide an example?
  7. You are outputting HTML to the browser prior to calling session_start, you cannot do this.
  8. It's only been 15 minutes, it's hard to believe you really tried to read/understand/fix the issue. Like BlueSky mentioned, you CANNOT have any output before session_start(). Please post the first 10 lines of your current code.
  9. Please read the sticky - HEADER ERRORS.
  10. (I put tags around your code, please use them next time)
  11. This topic has been moved to PostgreSQL. http://www.phpfreaks.com/forums/index.php?topic=322480.0
  12. Maq

    Yo!

    You already have the value, why can't you just output it?
  13. If you're checking to ensure the id is tied with the current user's account then it should be fine. You may want to sanitize your variable with mysql_real_escape_string or use prepared statements to prevent SQL injections. That goes for any value that is used in a query that the user can manipulate.
  14. Depends what you're using it for.
  15. Maq

    php probid

    Huh? What exactly do you want about Pedigree again?
  16. Please post the code.
  17. You're going to have to use a cron job to run your updating script every minute.
  18. If you want to run them on the CLI you can use shell_exec.
  19. (Please place or tags around your code next time)
  20. Maq

    Yo!

    Can you post some relevant code?
  21. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=322426.0
  22. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=322423.0
  23. When you're passing values via HTTP (through a URL) you should be using GET not POST. I would also recommend sanitizing your variables to prevent MySQL injections. $id = mysql_real_escape_string($_GET['id']); $query = "DELETE FROM newsfeed WHERE id = '$id'"; //if column id is an integer you don't need single quotes Check out these links: $_GET $_POST
  24. Then it only selects the player if his adminlevel is 1, what if i want it 1 or above? You need something a bit more dynamic. Try something like this: $result = mysql_query("SELECT adminlevel FROM accounts WHERE name = '".$_SESSION['auth_username']."'") or die(mysql_error()); $row = mysql_fetch_array($result); if($row['adminlevel'] >= 0) { echo ' Admin Area'; } else { echo 'do something'; } This way you can check against the 'adminlevel' which will allow you to perform whatever action on any level.
  25. \t shouldn't work either. Like Cagecrawler mentioned, they will both show up in view source or if you run the script in the CLI.
×
×
  • 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.