Jump to content

shoombooltala

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

shoombooltala's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. in the database where you store the user's information add a field called last_posting. now everytime they post a job, update that field with the current time.  and then in the page where you process the posting, get the value from that field, check to see if it's more than 5 minutes and if it is then proceed with the posting. if not then display a message telling them to STOP SPAMMING and wait 5 minutes LOL
  2. [quote author=obsidian link=topic=109538.msg441650#msg441650 date=1159278429] are you storing it as a DATE datatype? if so, just do something like this: [code] <?php $yesterday = date('Y-m-d', strtotime('yesterday')); // SQL format for yesterday (24 hours ago) $sql = mysql_query("SELECT * FROM table WHERE myDate >= '$yesterday'"); ?> [/code] hope this helps [/quote] ok i'm trying to do this but I don't exactly understand what  strtotime('yesterday') does!! i have a php script that gets executed every 10 mins. the point of it is to send a report only ONCE a day. in it i need to compare today's date and time to the record in the database which holds the date and time of the last time an email was sent. if it was yesterday then send the email, update the lasttime sent in the database to the current time so that whole day it wont send another email until tomrrow. any ideas?
  3. i'm running SQL Server 2000! i think that may be the problem :(
  4. hello, thanks for your help. i'm trying the second one with the SQL but i get this error: 'CURDATE' is not a recognized built-in function name. any suggestions?
  5. I'm storing a date in an SQL database. I need to compare that to today's date and time and see if it's more than 24 hours or not. How would I do that? cheers
  6. [img]http://e-docs.bea.com/wls/docs61/snmpman/images/overvia5.gif[/img] that is the structure of a SNMP Trap packet. In php i'm making a UDP connection and it's working fine. I just need to know how to structure a packet like that. i have all the information as well just don't know how to strucutre a similar packet in php. Any help would be appreciated.
  7. "PHP has encountered an Access Violation at 7C82FA21" I get this error around 5-6 times during a day at random times and after a minute it goes away and the page loads fine. I read somewhere it has to do with php not having permission to allocate memory or something. Any ideas?
  8. [quote author=obsidian link=topic=107220.msg429958#msg429958 date=1157642800] shoombootala, you [b]do not[/b] want to assign your session variables as you have shown. if you do that, the session variable 'fname' will actually hold the value "$firstName" and so on. you never want to try to assign variables from within single quotes. [code] <?php // change this idea: $_SESSION['fname'] = '$firstName'; // to this: $_SESSION['fname'] = $firstName; // or this: $_SESSION['fname'] = "$firstName"; ?> [/code] [/quote] you are totally correct. I edited and fixed it now. Thanks :)
  9. i think what you need to do is the following: top of page2 you put: [code] <?php session_start(); //in the middle of the page where the user gets authenticated and you get their first, middle and last name you would use this: $_Session['fname'] = $firstName;  //where $firstname is the variable containing the name you got form the database of the user. $_Session['mname'] = $middleName;  //where $middleNameis the variable containing the name you got form the database of the user. $_Session['lname'] = $lastName;  //where $lastNameis the variable containing the name you got form the database of the user. ?> [/code] then on top of page 3 also you put: [code] <?php session_start(); //then you would retreive the values using this: echo $_Session['fname']; echo $_Session['mname']; echo $_Session['lname']; ?> [/code]
  10. Hello, Is there anyway I can send SNMP traps through a PHP script? Cheers
×
×
  • 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.