Jump to content

neverett

Members
  • Posts

    60
  • Joined

  • Last visited

    Never

Everything posted by neverett

  1. Can anyone help? If I should elaborate more, please tell me. Thanks!
  2. I can get that to work just fine. One last question though. How can I get a similar idea to work only this time to display a table row that contains that textarea? Basically, if item option2 is selected (clicked), then I want a table row to be displayed that contains that textarea. Hope that makes sense! Thanks for all your help!
  3. Just a regular list. The user will only be able to select one item.
  4. Here's what I'm trying to do. I have a select list in an HTML form (in a PHP file). If a person selects 2 for instance, I want a new table row to appear and a textarea to appear in that row. If a person deselects 2, the new row and textarea should disappear. I was planning on using onchange, but I'm up for using javascript if that is more efficient. Also, if the person selects 2, the row and textarea appear, I'd like to automatically put the cursor in the textarea. Hope that makes sense. If anyone has any suggestions, I would like to thank you in advance. Thanks!
  5. My guess is that the strtotime() function is taking the current time and returning that because you don't enter a second argument. Take a look at this site (if you haven't already)... http://us3.php.net/manual/en/function.strtotime.php I don't really know a work around though, unless you can get the in unix time (i.e. - $row['dateTime'] is in unix time instead of a string). If I think of something else I'll let you know, in the meantime... good luck!
  6. Why did the solved feature disappear???
  7. What is the servers timezone? If you call time() does it equal your current time in your timezone? Just a thought.
  8. No problem! Don't forget to mark this topic solved!
  9. What I would do is this: if($_POST['level'] == "dragon"){ $userlevel = 1; // set userlevel = 1 if they selected Dragon }else{ $userlevel = 0; // set userlevel = 0 if they selected Entrepeneur } in place of this: I think that's the answer you're looking for.
  10. Are you meaning like a variable that can be called up on any page? You might want to look into using sessions if that's the case. And do something like: if($level == "Dragon"){ $_SESSION['userlevel'] = true; }else{ $_SESSION['userlevel'] = false; } Or something along those lines. You might want to be a little more specific as to what variables you want set to what (as I'm slightly confused). Also this is incorrect: It should be something like this: if($_POST['level'] == "dragon")
  11. I have a question for everyone to think about. I've posted some code below. Here is the situation... You have a server that is hosted in some unknown timezone. This was the only way I knew possible to always return the current time in the Eastern Timezone (or which ever one you program). Are there any other ways to do this? I don't have root access to the server so I think this is the best way. Let me know if you have any ideas! I look forward to hearing from you. <? $sql = "select year(curdate())"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_array($result); $year = $row['year(curdate())']; //echo $year; $march = 14 - (floor(1 + $year * 5 / 4) % 7); $november = 7 - (floor(1 + $year * 5 / 4) % 7); //echo $march; //echo $november; $dst_starts = mktime(2, 0, 0, 3, $march, $year); $dst_ends = mktime(2, 0, 0, 11, $november, $year); //echo $dst_starts; //echo $dst_ends; $sql = "select unix_timestamp(utc_timestamp())"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_array($result); $dt = $row['unix_timestamp(utc_timestamp())']; //echo $dt; if( ($dt >= $dst_starts) && ($dt <= $dst_ends) ){ // DST is in effect (Eastern time zone = UTC -04:00) $newtime = $dt - (3600 * 4); }else{ // DST is NOT in effect (Eastern time zone = UTC -05:00) $newtime = $dt - (3600 * 5); } //echo $newtime; $format = "Y-m-d H:i:s"; $datetime = date($format, $newtime); echo $datetime; ?>
  12. I'm using a meta-refresh redirect [i.e. - sendredirect("http://www.domain.com");]. Are you saying to do something like sendredirect("checklogin.php"); then sendredirect("loggedin.php");?
  13. Well when you login for instance, it starts the session with the domain of domain.com. However when it checks your login, the session isn't set so it forces you to login. This is because the session didn't have www.domain.com. So you have to login twice because the session domains do not match and therefore won't send the information to the server. I hope that makes sense.
  14. Is there any way I can set the session domain. If so, how do I go about doing this? Do I need to require it only once? If you could give any help, I would greatly appreciate it.
  15. My bad... I took out the domain in the code posted. In my actual code it's the full address. If you'd like... I could email (or if you'd like another method) my source files. I just didn't want to post all of my code here. The test function is just a sample I made to test things. The problem I'm having is a checklogin function. This is to test for access levels, but I know that the session variables aren't getting to that function... hence my test function. Let me know if you could take a look at my source files. Again, I greatly appreciate all of your help with this!!
  16. Do I have any other options to make this work (i.e. cookies?)? I'm fairly new at sessions and cookies, so any input is appreciated!
  17. I always use sendredirect("http://www.domain.com/mypath/mypage.php"); The only thing that changes is the page name (the domain and path is the same). The sendredirect() function is above in functions.php. Is there something I should change? Should I use header() instead? I don't know how to change the session cookie domain to be different. I appreciate all of your help... it's been extremely helpful!
  18. Well my default browser is FF (b/c I use Linux). I don't have any security enabled that would cause that sort of problem (at least that I'm aware of). I added these lines and came up with the following... I tried on another computer with Windows and it worked fine in IE, but not FF. So it's across both operating systems and I've tried on other machines previously. I'm not doing any .htaccess work here. The URL remains the same everywhere (with the exception of the php file). I have two cookies stored for the URL. Their contents are different (which is what looks to be an MD5 string). Both cookies are named PHPSESSID. Let me know if you have anything else. I'm pretty stumped.
  19. The new results... This is in FF still... if you want I can post the results in IE7. Thanks!
  20. My results are... in FF of course. It still works in IE7. Let me know if you have any insight. Thanks!
  21. Works in IE7 but not FF (and FF is my preferred browser). Even more puzzling. ??? I've tried on multiple computer as well. I'll try what you said and post back soon. Thanks again for everything!
  22. I'm using Ubuntu Linux (7.10 - Gutsy) and I'm using FF version 2.0.0.11. I do have cookies enabled, but I'll try with another browser and post back. Thanks for all the help!
  23. I removed session_start() from functions.php. I have the two lines of error reporting code in all 3 files (checklogin, functions, and test). I don't believe that the header.php file would be resetting any session variables. I've included the header file below. <?php include("functions.php");?> <head> <title>Member Management System</title> <link rel="stylesheet" type="text/css" href="<? echo $stylesheet ?>"> </head> <table cellspacing="0" cellpadding="3" width="762" align="center" style="border: 2px solid green;"> <tr><td colspan="2" style="border-bottom: 2px solid green;"><img src="/images/website_header5.jpg" width="756"></td></tr> <tr valign="top"><td width="160" align="right" style="border-right: 2px solid green;"> <a href="/"><img src="/images/website_tab-home.jpg" width="160px" alt="Home" border="0"></a><br> <a href="/about/"><img src="/images/website_tab-about.jpg" width="160px" alt="About" border="0"></a><br> <a href="/executives/"><img src="/images/website_tab-executives.jpg" width="160px" alt="Executives" border="0"></a><br> <a href="/news/"><img src="/images/website_tab-news.jpg" width="160px" alt="News" border="0"></a><br> <a href="/resources/"><img src="/images/website_tab-resources.jpg" width="160px" alt="Resources" border="0"></a><br> <a href="/services/"><img src="/images/website_tab-services.jpg" width="160px" alt="Services" border="0"></a><br> <a href="/events/"><img src="/images/website_tab-events.jpg" width="160px" alt="Events" border="0"></a><br> <a href="/links/"><img src="/images/website_tab-links.jpg" width="160px" alt="Links" border="0"></a> </td><td width="602">
×
×
  • 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.