Jump to content

psychohagis

Members
  • Posts

    80
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

psychohagis's Achievements

Member

Member (2/5)

0

Reputation

  1. Unfortunately for me my web host uses an unusual format for its logfiles which means I have to tell analog how to intrepret them. I have tried this but it didnt work so I was hoping someone on here could help me. Here is one line from a logfile: This is what I tried (this didnt work): This is the relevant page from the read me: http://www.analog.cx/docs/logfmt.html I hope someone has a better knowledge of this sort of thing than me
  2. oh ok ill try that im only doing it like that because thats the way i learnt to do it
  3. Ok Ive changed that but now when I run the following: $check = @mysql_query("SELECT id, username FROM users WHERE rank=$rank"); if (!$check) { $mysql_error = mysql_error(); exit('<p>~ Error performing query: ' . $mysql_error . '</p>'); } it says "Error performing query: Unknown column 'chairman' in 'where clause'" which makes no sense cos i dont ask for column 'chairman' This query is asking it to find $rank (which happens to be 'chairman' here) in column rank
  4. I have the following query/code thing. $check = @mysql_query("SELECT id, username FROM users WHERE rank='$rank'"); if (!$result) { $mysql_error = mysql_error(); exit('<p>Error performing query: ' . $mysql_error . '</p>'); When i run it it tells me theres an "error performing query:" but then does print out the mysql_error I dont understans this cos I use this sam bit of code on other pages (except with different querys) and if theres a problem with me query it tells me what it is.
  5. Does anyone have anymore knowledge on this because I have explored the function mentioned above but I have on problem. According to the manual it will convert any english date into a time() type format. but thats not quite true. In england dd/mm/yyyy is standard but if you put in a date that is formatted like that it assumes it is mm/dd/yyyy which is the american format. Is their anyway I can tell strtotime() that its dd/mm/yyyy instead of mm/dd/yyyy ?? thanks in advance
  6. I want to convert a date in the format (dd/mm/yyyy) into a time() style format so I can compare it against the current time and only use information where its date is ahead of the current time.
  7. oh thanks - i new it had to something obvious, i just couldnt spot it
  8. Im sure this is something obvious but I can't see it. I have used the folowing bit of code before but I just changed the message and it doesnt work and gives me a "parse error: unexpected T_STRING" error. While ($row = mysql_fetch_array($result)) { $email = $row['email']; $emto = $email; $emsubject = 'BCMA - A new event has been posted; $emmessage = 'Details of the event - "' . $event . '" on ' . $sdate . ' have just been posted. Please click on the adress below to view this, and other events: <br> http://www.MYSITE.org.uk/events.php'; $emfrom = 'noreply@MYSITE.org.uk'; $emheader= 'From:' . $emfrom; mail($emto, $emsubject, $emmessage, $emheader); }
  9. use ereg() or eregi() http://www.php.net/ereg http://www.php.net/eregi
  10. yh ive got session_start() on every page. events.php is for both authorised and unauthorised users depending on what part of it youre in. I just dont see the logic behind using AND when i only need one of the statements to evaluate to true
  11. Well i tried that and it works but i dont understand why. Surely AND would require all of them to evaluate to true where as OR only needs one of them to evaluate to true - which makes more sense to me because $_SESSION['rank'] can't have multiple values.
  12. I have the following if statement: if ($_SESSION['rank']!='webmaster' OR $_SESSION['rank']!='chairman' OR $_SESSION['rank']!='secretary' OR $_SESSION['rank']!='treasurer') { exit('<meta http-equiv=refresh content=0;URL=http://www.MYSITE.org.uk/events.php>'); } I dumped the variable $_SESSION['rank'] and it came out as "webmaster" but I still get redirected away? Can anyone help?
×
×
  • 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.