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 Mike Lewis 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: *

  1. krappleby

    Quick question to do with sessions

    so something lont the lisnes of if ($PageID Contains "Admin/" and $sysuser <> "100001") { $PageID = "welcome"; } if ($PageID Contains "Member/" and $sysuser == "") { $PageID = "welcome"; } somthing like that
  2. krappleby

    Quick question to do with sessions

    HI all, i have a website, which i run from one index page.. i call the contents, which are located in another page.. now.. when a member logs in a session called sysuser is created containing their member id.. now the problem comes with the pages, i have three folders.. one is called...
  3. krappleby

    session timeout then redirect?

    Hi Jpadie please see my responses 1. php manual recommends expiring the session cookie as well as the session store. the method posted above is the approved version for session destruction as per the php manual. yes. however i am not using cookies on this site, so just the session destroy is...
  4. krappleby

    script to fast issue

    Hi again all, i wonder if any of you have any ideas on the following. i have a very long php script that processes several queries, as well as checks data, here is an example update blah set color = blue where member = 1 then select * from blah where member = 1 if (colur=blue) do this...
  5. krappleby

    Help..

    all i am trying to do is i have a form, where someone enters a date, say 30/12/2009 the form is processed and the date is formatted to 2009/12/30 as per the timedate in a database i then process that to add 00:00:00 now.. the field $new_np_date2 contains only 2009/12/30 i need to add 1...
  6. krappleby

    Help..

    in the case above.. the variable is just passed, via a form..
  7. krappleby

    Help..

    i havent cut anything off the middle of the code. lol. from your statement there is a load missing.. ok.. i am not very experianced with mysql statements.. and the $new_np_date2 variable is 2009/12/30
  8. krappleby

    Help..

    thanks for the info. i have read the page to do with this.. but still not doing it right.. here is the mysql code update DOWNLINES set MEMBER_ID = '" . $new_np . "', NP_REG_DATE = '" . $newdate . "', MAINT_DATE = DATE_ADD('" . $new_np_date2 . "', INTERVAL 1 MONTH), where UNIQUECODE = '" ...
  9. krappleby

    Help..

    Hi all, im not a proffessional programmer (or speller for that matter) but i do do quite a lot of programming for friends and family, one of the main things i always have problem with is times and dates.. here is my problem. i have a date/time field in a mysql database, which i need to...
  10. krappleby

    place into array and sort

    hi this is and is not working.. at the moment i have all the values in an array called $balllist i ahve used asort, and printed for each value in the array.. This works.. but when i come to echo $balllist[0] its not the lowest ball.. so its not sorting as i requre.. i need to get it to...
  11. krappleby

    session timeout then redirect?

    i use the following code, on top of each of the pages i want the timout to run $session_life = time() - $timeout; if($session_life > $inactive) { session_destroy(); header("Location: Notpermitted.php"); } $timeout=time(); Note that i have also created a variable called $inactive which...
  12. krappleby

    form value text to date

    in other words :) $sql = "INSERT INTO tvme04_tank(Liter, LDatum, refIDeig, LReg) VALUES('" . $liters . "', '" . $myDate . "', '" . $ideig . "', NOW())"; hope it helps
  13. krappleby

    place into array and sort

    hi feherke thanks for the comment, yes that is what i thought would be the best option, but question is.. how do i sort them to ascending order? is there a command within the array function that will do this.. cheers keith
  14. krappleby

    place into array and sort

    hi all, wonder if you can help me.. i have 9 variables, labelled ball1, ball2, ball3, ball4, ball5, ball6, ball7, ball8, ball9 now. im looking to sort them in order of the value of each variable.. im thinking the best way to do this would be to put them all into an array and have the...
  15. krappleby

    iframe resize

    hi, i though this had been posted but it appears not to have been i have a problem, i have an iframe that needs to be resized, to the content.. now.. is there any way, to query the iframe itself, by stating something along the lines of if iframe has scrollbar, then increase iframe height. i...
  16. krappleby

    simple time difference question

    1180306800 minus 1180343179 equals 36379 is what i am getting.. i have made a couple of changes as follows $date1=strtotime(DATE()); $date2=strtotime($resultrow['DATECHECK']); $seconds=date("U",$date2)-date("U",$date1); echo "$date1 minus $date2 equals $seconds<br>"; but its giving wat too...
  17. krappleby

    simple time difference question

    ok.. using your code above, i get teh following 1180339247 1180339247 no matter how i try to i cannot get the date to subtract.. its just printing both stamps..
  18. krappleby

    simple time difference question

    hi all., i am trying to get the number of seconds between the current date/time and a datetime stamp in a mysql database.. i am pulling the data from the database, and have tried all sorts, the lastest is echo mktime(date('Y-m-d H:i:s')) - mktime($resultrow['DATECHECK']); however all i...
  19. krappleby

    what is wrong with this

    i am trying to replace certain words in the email with replacement words, but its not working, i am getting the email but the words are staying as is.. any help would be appreciated $get_email = "Select * From Site_Emails where EMAIL_CODE = 'WELCOME EMAIL'"; $email_result =...
  20. krappleby

    question from complete newbie (know nothing)

    Thanks for your help however this is not working.. Javascript <script type="text/javascript"> function populateMe() { fname = document.form1.firstname.value; lname = document.form1.lastname.value; fullnamebill = fname + " " + lname; address1bill = document.form1.address1.value...

Part and Inventory Search

Back
Top