Jump to content

neverett

Members
  • Posts

    60
  • Joined

  • Last visited

    Never

About neverett

  • Birthday 05/17/1985

Profile Information

  • Gender
    Male

neverett's Achievements

Member

Member (2/5)

0

Reputation

  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.
×
×
  • 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.