Jump to content

Nightmareinhell

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Nightmareinhell's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you so very much!! That was most some of my concern also, having to restart apache. Thanks again!!
  2. Hello! I was wondering, is there anyway to create virtual servers using PHP? Basically what I'm trying to do is... make it so someone can fill out a forum, it will create a folder and files on the server, and then they can point their domain to the server and it will go to the folder. I'm thinking this is done with virtual servers? Is there a way to make this process automated because from my searching it looked like you had to manually edit to httpd config file. Thanks you guys so much for any help!
  3. Wow, I feel dumb now. just using the date function by itself, without the time() in there at all returns the correct time. Thanks!!
  4. I apologize as I ran it through my whole script into my database which returns it into a different format. Anyway, here is what I get. 21-06-11 20:49:59 Thanks!
  5. It gives me back 6/11/2021 Lol, odd problem. I was thinking of contacting them again. They sent me to a link that said that they will not change the server time, but I would have assumed it would only have been off by times zones, not decades. Thanks for the response!
  6. Hello! This problem has been driving me insane. Ok so I am making a news article script that stores its information into a mysql database. My script for adding information seems to be working great, with one problem. The time() function returns a time that is a decade ahead (this is on a hostgator server also, they said they cannot do anything about it). So my question is, is there a way to subtract a decade off of it, or is there a different way to get the current time other than using the servers time? $future_date = time() - (3612 * 24 * 60 * 60); $today = date("d-m-y H:i:s", $future_date); The 3612 is the exact amount of days it is off including leap years. The odd thing is this actually adds a decade to it, so it used to be 6/11/2021, now it is 7/01/31. Thanks guys for any help!!
  7. Thank You!!!! Thank You Thank You Thank You!! Worked perfectly!!
  8. Sorry I did not put enough information down Yes, Its in a loop that displays all the application names (for the purpose of this post.. i just threw in $character_name = "Nightmareinhell";, it really gets its value from a database) But... Here is more of my code i guess you could say... $character_name = "Nightmareinhell" $name = "<tr> <td><a href="admin_evaluate.php?name=$character_name">$character_name</a></td> </tr>"; echo $name; I want it to where when you click on that link, I'm able to grab name by using: $character_name = $_GET['name']; Thanks!!
  9. Hello! I was wondering if this could be done... I want to take a variable, and insert it into a URL for a $_GET on a different page? Basically Its a member website, and I want the admin to be able to "accept" or "deny" the application... So i have a page that displays all the applications, and I want it to take him to a different page with all the user's information in detail. Right now it only displays their name, but when the admin presses the link, it takes them to a more detailed page about the applicant, where they can then "accept" or "deny" the application.... Here is what i got so far... $character_name = "Nightmareinhell"; <a href="admin_evaluate.php?name=$character_name">$character_name</a> Here is the error I get from the code above Thanks to any help!!!!
  10. I found this tutorial very useful! I edited the script around abit so it displayed the database inside the cell. If anyone would like the source that I modified, just ask! Otherwise here is the awesome tutorial: http://www.dreamincode.net/forums/topic/87835-event-tracking-calendar/
  11. Hello! First I would like to say welcome to the forums! I hope one day I'll be able to give back!! Anyway, I seem to not know how to do this. I'm creating a website for my guild, and I'm very very rusty with PHP (learned it a year or two back than lost it). Anyway, I made the script to display the calendar portion of it (followed a tutorial), but I can't seem to import the feature to display events in the same cell as the date that its on. Sorry my coding is a little sloppy but I'm hoping you guys can help xD I left off with thinking that maybe i could use an array to do the job but I honestly have no clue how to go about this... <?php function calendar(){ include('connect.php'); $month = date("n"); $year = date("Y"); $query = "SELECT * FROM calendar WHERE (month='$month' AND year='$year')"; $result = mysql_query($query); $num = mysql_num_rows($result); $firstDay1 = mktime(0,1,0,$month,1,$year); $firstDay = mktime(0,1,0,$month,1,$year); $daysInMonth = date("t",$firstDay); $firstDay = date("w",$firstDay); $day1 = array(); $message = array(); $message1 = ''; $dayNumber = 1; $i = 0; while ($i < $num) { $day1[$i] = mysql_result($result,$i,"day"); $message[$i] = mysql_result($result,$i,"message"); $i++; } echo "<table width='280' border='1'>\n"; echo "<tr>\n"; echo "<td align='center'>" . date("F Y") . "</td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>\n"; echo "<table width='490' border='0' cellspacing='2' cellpadding='2'>\n"; echo "<tr align='center'>\n"; echo "<td width='70'>Sun</td>\n"; echo "<td width='70'>Mon</td>\n"; echo "<td width='70'>Tue</td>\n"; echo "<td width='70'>Wed</td>\n"; echo "<td width='70'>Thu</td>\n"; echo "<td width='70'>Fri</td>\n"; echo "<td width='70'>Sat</td>\n"; echo "</tr>\n"; # Calculate number of rows $totalCells = $firstDay + $daysInMonth; if($totalCells < 36){ $rowNumber = 5; } else { $rowNumber = 6; } # Create Rows for($currentRow=1; $currentRow <= $rowNumber; $currentRow++){ if($currentRow == 1){ # Create First Row echo "<tr align='center'>\n"; for($currentCell = 0; $currentCell<7; $currentCell++){ if($currentCell == $firstDay){ # First Day of the Month if($day1 == $dayNumber){ $message1 = $message; } else { $message1 = ""; } echo "<td width='70' height='50'>" . $dayNumber . "<br />$message1</td>\n"; $dayNumber++; } else { if($dayNumber > 1){ # First Day Passed so output Date if($day1 == $dayNumber){ $message1 = $message; } else { //$message1 = ""; } echo "<td width='70' height='50'>" . $dayNumber . "<br />$message1</td>\n"; $dayNumber++; } else { # First Day Not Reached so display blank cell echo "<td width='70' height='50'> </td>\n"; } } } echo "</tr>\n"; } else { # Create Remaining Rows echo "<tr align='center'>\n"; for($currentCell = 0; $currentCell < 7; $currentCell++){ if($dayNumber > $daysInMonth){ # Days in month exceeded so display blank cell echo "<td width='70' height='50'> </td>\n"; } else { if($day1 == $dayNumber){ $message1 = $message; } else { $message1 = ""; } echo "<td width='70' height='50'>" . $dayNumber . "<br />$message1</td>\n"; $dayNumber++; } } echo "</tr>\n"; } } echo "</table>\n"; echo "</td>\n"; echo "</tr>\n"; echo "</table>\n"; } calendar(); ?> Thank you guys so much!!! It will mean alot to me and my guild xD!! **EDIT** Forgot to add, Database looks like this id day month year message Thanks again!
×
×
  • 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.