Jump to content

NoSalt

Members
  • Posts

    77
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

NoSalt's Achievements

Member

Member (2/5)

0

Reputation

  1. Xaotique ... I'm not sure what you mean by "span.logout a:visited there" cutielou222 ... Yes, the html is correct, thank you.
  2. Hello All Could I get a little help with this CSS? In my stylesheet I have my anchor colors defined: a:link {} a:visited {} a:hover {} Later on in the stylesheet, I have some anchors that are within a span defined: span.logout {} span.logout a:link, a:visited {} span.logout a:hover {} The only thing is, my anchor colors in the logout div are overriding my primary anchor colors. I am confused as to why this is happening. I thought only the anchors within the "logout" span would be affected by this CSS. Anyway, if anybody could help out with this, I would appreciate it. Also, am I using the term "CSS subclass" correctly? Thanks for taking the time to read, and have a great day.
  3. Thank you for the critique, I appreciate it. I will look into implementing the changes you suggested. FYI, there is a navigation menu that shows up at the bottom of every page. Have a great day
  4. Sorry, that username is bad. Try this: username: test@quickgiftlist.com password: password I apologize for the inconvenience.
  5. username: testUser@host.tld password: password
  6. No test account, but accounts are quick and free to set up. All you need is an email address and password.
  7. Hello All I have been working on a gift registry site for quite a while now. I have it up and running and I would appreciate feedback. The URL is: http://www.quickgiftlist.com/ Thank you in advance for taking the time to check it out. Have a great day.
  8. Very cool, thank you. And, thank you to all who took the time to read and reply. Now I can sit back and wait for my hair to grow back in.
  9. So, now that I have a handle on that, what does everybody recommend to check if a variable has a value associated to it in a GET or POST?
  10. So, what you're telling me is that just the existence of the myVar variable means that it is "set", even if it is empty?
  11. But ... I thought if you attempted to GET or POST something that wasn't there, then isset would always evaluate to false. Is this not correct? When you look at the address bar, you will see "index.php?myVar=". How can isset evaluate to true if there is nothing to GET???
  12. Hello All I am not an expert PHP developer, but I thought I had a pretty good handle on the language. That is until I was goofing off yesterday, playing around with isset. All of a sudden, I feel like I have lost my mind. I will get straight to the point. Why does this display the message "THE VARIABLE WAS FOUND!" when no input is submitted? <html> <head> <title> form test </title> </head> <body> <div> <form action="" method="GET"> <table> <tr><td>enter myVar: </td><td><input type="text" name="myVar" id="myVar"></td></tr> <tr><td><button type="submit">submit</button></td><td><button type="reset">reset</button></td></tr> </table> </form> <?php if(isset($_GET['myVar'])){ print("]" . $_GET['myVar'] . "[<br>"); print("THE VARIABLE WAS FOUND!"); } ?> </div> </body> </html> If you were to click the submit button without putting anything into the myVar field, the message will still show up, but it shouldn't. If you submit an empty field there is nothing sent to the "next page", so to speak. If nothing is sent, then the isset should evaluate to false because there is no myVar to "GET", therefore the message should not be displayed. But, as you can see, the message is displayed whether or not you enter anything into the field. I have many sites that use isset that appear to be working as expected, so you can understand why this is driving me crazy. Would any of you nice people please explain to me why this is "working" when it shouldn't? Thanks for reading, and have a nice day.
  13. PFMaBiSmAd ... thanks for reading and replying. I will look into adding some error checking to the site to correct for this. Although, I am suspicious as the site gets, maybe, one or two visitors a day, and mostly from bots. The reason I don't use a db is because this is a "play" site and I am not sure if I will even keep it after my years registration is up. Thanks again.
  14. Hello All I wrote a tiny piece of cookie code (to set and record cookies and hits) that works pretty well but seems to have a bug in it that I cannot figure out. First, here is the code: <?php $my_cookie = (isset($_COOKIE['my_cookie'])) ? true : false; $countFile = "./data/count.txt"; $cookieFile = "./data/cookie.txt"; $dateTime = date('Y-m-d\,H:i:s\,U\,T\,O\G\M\T'); $remoteIPAddress .= $_SERVER['REMOTE_ADDR']; $remoteUserAgent .= $_SERVER['HTTP_USER_AGENT']; $cookieVal = $dateTime; $cookieVal .= ","; $cookieVal .= $remoteIPAddress; $cookieVal .= ","; $cookieVal .= $remoteUserAgent; $cookieVal .= "\r\n"; if(!$my_cookie){ // read the visit counter $countHandle = fopen($countFile, 'r'); $visitCount = intval(trim(@fread($countHandle, filesize($countFile)))); fclose($countHandle); // incremenet the visit counter $visitCount++; // write the new visit count and cookie value to their respective files $countHandle = fopen($countFile, 'w'); $cookieHandle = fopen($cookieFile, "a+b"); if(!preg_match('/bot/',$remoteUserAgent)){ fwrite($countHandle, $visitCount); fwrite($cookieHandle, $cookieVal); } fclose($countHandle); fclose($cookieHandle); setcookie("my_cookie", $cookieVal, time()+31556926); } else{ // read the visit counter $countHandle = fopen($countFile, 'r'); $visitCount = fread($countHandle, filesize($countFile)); fclose($countHandle); } ?> What is happening is that sometimes, not every time, but, sometimes my cookie.txt count gets a 0 (zero) written back to it and I can't figure out why. Can anybody see anything in there that would have this effect? Like I said, it only gets zeroed out from time to time. Thanks to all for taking the time to read.
  15. Hello All I am working on a page that has data elements. I want the users to be able to hover over each data element and have a box pop-up/appear/materialize with more information for each element. I, obviously, don't want to use the Javascript "alert" function so I am looking for something very simple yet elegant for this. I have seen what I want out there on the net but I am not sure how they implement it. I thought I could use Javascript or CSS to change a box's visibility when hovered over, but I would like the box to be near the original, hovered over, element and I don't really know how to go about repositioning this box for each element. Like I said, I am hoping to find something simple so that I may learn and expand on the code. Does anybody have any good ideas? Thanks for reading and have a great day.
×
×
  • 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.