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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by drgenius

  1. drgenius

    setcookie() expiration

    When does a cookie expire if you omit the expires parameter? Does it live permanently or just during the current session? I would like to create a permanent cookie and I was wondering if it would be enough to just pass a name and value variable to the setcookie() function. It's not a lie if YOU...
  2. drgenius

    Extracting timestamp from a date object

    Oops, never mind... The getTime() method does what I want :-) It's not a lie if YOU believe it ;-)
  3. drgenius

    Extracting timestamp from a date object

    In PHP such a thing is trivial but the Javascript Date object apparently doesn't have a built-in method for it. I need this feature to make a countdown counter which can be used to show how many time there is left between now and a goal date (I want it to countdown in realtime with seconds...
  4. drgenius

    Bloomin Magic Quotes!

    why don't you just use the stripslashes() function? It's not a lie if YOU believe it ;-)
  5. drgenius

    newbie, PHP_SELF says not defined

    You should use $_SERVER["PHP_SELF"] to access the self variable from now on, all other methods won't work or are deprecated starting from PHP 4.2.0. It's not a lie if YOU believe it ;-)
  6. drgenius

    Escaping...

    use the stripslashes() function to get rid of the slashes It's not a lie if YOU believe it ;-)
  7. drgenius

    Session variables Question

    Don't forget to quote the names inside the brackets. So it should be $_POST["uname"] and $_SESSION["members"]. For additional data use additionial session variables. Or group everything inside an array (it's perfectly legal to have session arrays). It's not a lie if YOU...
  8. drgenius

    change text in middle file

    The easiest way would be to read the date into an array using the file() function. Then find the row containing 'john' and change it 'joe. Finally write the array back. Only drawback would be that for extremely large files you might run into memory problems when trying to read all the entries to...
  9. drgenius

    Stats Record

    Try $count = ++$number; instead of $count = $number++; In your script $count will be set equal to $number and after that $number will be increased by one. So $count will always be the same as $number. You should increment first before assigning the value to $count (pre-increment instead of...
  10. drgenius

    Problem with Voting Script

    change the read-from-file lines to: $Vote1 = trim(fgets($datei, 255)); $Vote2 = trim(fgets($datei, 255)); $Vote3 = trim(fgets($datei, 255)); and your conditions should read: if($id==1) ... etc. (notice the doubled equal sign) and make sure $id is available ;-) PS: the trim() function...
  11. drgenius

    PHP code

    It's a newline character. <?php echo &quot;Line 1\nLine 2&quot;; ?> will show up as: Line 1 Line 2 in your html source (instead of &quot;Line1Line2&quot; when omitting the \n) It's not a lie if YOU believe it ;-)
  12. drgenius

    Free PHP account with sendmail support?

    Hi, does anyone know of a free webspace hosting provider with PHP and sendmail support? The PHP accounts I have right now don't allow use of the mail() function :-( It's not a lie if YOU believe it ;-)
  13. drgenius

    problems with implode()

    Hmm, by looking closer at your post it see that you're using $tfield[i] to read the values but your variables are called $tfield0, $tfield1, etc right? So you're not accessing those variables at all, that's why you get an empty result. It's not a lie if YOU believe it ;-)
  14. drgenius

    problems with implode()

    There's nothing wrong. I just checked it and it works without a glitch. Here's the codefragment I used to test it: <?php $tfield = array('a', 'b', 'c', 'd', 'e'); $thedata = array(); $tcount = 5; $i = 0; while ($tcount != 0) { $thedata[] = $tfield[$i]; $i++; $tcount--; } $thevar =...
  15. drgenius

    menu/frames help

    Only after your second post I realized that there was a whole bunch of javascript code on your site so my first post obviously wasn't going to help you. It's not a lie if YOU believe it ;-)

Part and Inventory Search

Back
Top