Click here to Skip to main content
15,349,767 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerRe: Creating file headers in php. Pin
cjoki31-Jan-11 4:56
Membercjoki31-Jan-11 4:56 
AnswerRe: Creating file headers in php. Pin
Niall Barr31-Jan-11 11:51
professionalNiall Barr31-Jan-11 11:51 
GeneralRe: Creating file headers in php. [modified] Pin
Danzy8331-Jan-11 12:49
MemberDanzy8331-Jan-11 12:49 
GeneralRe: Creating file headers in php. Pin
Niall Barr31-Jan-11 23:44
professionalNiall Barr31-Jan-11 23:44 
GeneralRe: Creating file headers in php. Pin
Danzy831-Feb-11 19:53
MemberDanzy831-Feb-11 19:53 
Questionsending a link to php script Pin
Danzy8327-Jan-11 14:15
MemberDanzy8327-Jan-11 14:15 
AnswerRe: sending a link to php script Pin
Gerben Jongerius27-Jan-11 19:54
MemberGerben Jongerius27-Jan-11 19:54 
QuestionForm not working... Pin
MacRaider426-Jan-11 7:53
MemberMacRaider426-Jan-11 7:53 
Ok been working on this for about 2 hours and I'm officially stuck.
What I'm trying to do is bild a calendar (got that part working how I want) where I can change the month.
I have the following code:
function startTable2($currentMonth,$currentYear) {
	//retreive the value of $currentMonth by name
	$month = date("F", mktime(0,0,0, date($currentMonth), date("t"), date($currentYear)));
	echo "<table border=1 align=\"center\">";
    echo "<form action=\"Calendar2.php\" method=\"post\">";
	echo "<tr>";
	echo "<td align=\"left\"><input type=\"submit\" name=\"previous\" id=\"previous\" value=\"Previous Month\" />";
	if ($currentMonth == 1) {
		$currentYear = $currentYear - 1;
		$currentMonth = 12;
	}
	else
	{
	$currentMonth = date("m", mktime(0,0,0, date($currentMonth)-1, date("1"), date($currentYear)));
	}
	echo "<input type=\"hidden\" name=\"month\" id=\"month\" value=$currentMonth /></td>";
	echo "<input type=\"hidden\" name=\"year\" id=\"year\" value=$currentYear /></td>";
	echo "<input type=\"hidden\" name=\"day\" id=\"day\" value=\"01\" /></td>";
	echo "</form>";
	echo "<td colspan=5 align=center>$month $currentYear</td>";
	echo "<form action=\"Calendar3.php\" method=\"post\">";
	if ($currentMonth == 12) {
		$currentYear = $currentYear + 1;
		$currentMonth = 1;//date("m", mktime(0,0,0, date("1"), date("1"), date($currentYear)));
	}
	else
	{
	//$newDate = mktime(0,0,0, date($currentMonth)+1, date("1"), date($currentYear));
	$currentMonth = date("m", mktime(0,0,0, date($currentMonth)+1, date("1"), date($currentYear)));//date('m', $newDate);
	}
	echo "<td align=\"right\"><input type=\"submit\" name=\"next\" id=\"next\" value=\"Next Month\" />";
	echo "<input type=\"hidden\" name=\"month1\" id=\"month1\" value=$currentMonth /></td>";
	echo "<input type=\"hidden\" name=\"year1\" id=\"year1\" value=$currentYear /></td>";
	echo "<input type=\"hidden\" name=\"day1\" id=\"day1\" value=\"01\" /></td>";
	echo "</td></form></tr>";
	echo "<tr><td align=center>Sunday</td><td align=center>Monday</td><td align=center>Tuesday</td><td align=center>Wednesday</td><td align=center>Thursday</td><td align=center>Friday</td><td align=center>Saturday</td></tr>";
}

As of now the "previous" works for every other month (i.e. December, October, August... etc) and the "next" is not working at all (blank screen). I've tried different methods for getting the new date and month but with no luck. Any help is greatly appreciated.

Thank You!
AnswerRe: Form not working... Pin
MacRaider426-Jan-11 8:33
MemberMacRaider426-Jan-11 8:33 
Questioni cant view this file Pin
ulio.pts21-Jan-11 22:24
Memberulio.pts21-Jan-11 22:24 
AnswerRe: i cant view this file Pin
Kristian Sixhøj24-Jan-11 3:57
MemberKristian Sixhøj24-Jan-11 3:57 
QuestionThe joys of PHP mail() Pin
SRJ9221-Jan-11 9:46
MemberSRJ9221-Jan-11 9:46 
AnswerRe: The joys of PHP mail() Pin
Dr.Walt Fair, PE21-Jan-11 12:01
professionalDr.Walt Fair, PE21-Jan-11 12:01 
GeneralRe: The joys of PHP mail() Pin
SRJ9221-Jan-11 15:06
MemberSRJ9221-Jan-11 15:06 
GeneralRe: The joys of PHP mail() Pin
Dr.Walt Fair, PE21-Jan-11 15:33
professionalDr.Walt Fair, PE21-Jan-11 15:33 
GeneralRe: The joys of PHP mail() Pin
Fatih P.7-Feb-11 3:10
MemberFatih P.7-Feb-11 3:10 
AnswerRe: The joys of PHP mail() Pin
chiryphp29-Jan-11 14:46
Memberchiryphp29-Jan-11 14:46 
Questionhtaccess without changing actual url Pin
salman ansari19-Jan-11 20:22
Membersalman ansari19-Jan-11 20:22 
Questionuploading file via post Pin
0b4m418-Jan-11 23:13
Member0b4m418-Jan-11 23:13 
AnswerRe: uploading file via post Pin
Niall Barr19-Jan-11 2:32
professionalNiall Barr19-Jan-11 2:32 
GeneralRe: uploading file via post Pin
0b4m419-Jan-11 3:27
Member0b4m419-Jan-11 3:27 
GeneralRe: uploading file via post Pin
Niall Barr19-Jan-11 5:10
professionalNiall Barr19-Jan-11 5:10 
GeneralRe: uploading file via post Pin
0b4m419-Jan-11 5:49
Member0b4m419-Jan-11 5:49 
GeneralRe: uploading file via post Pin
Niall Barr19-Jan-11 6:04
professionalNiall Barr19-Jan-11 6:04 
GeneralRe: uploading file via post Pin
0b4m419-Jan-11 6:11
Member0b4m419-Jan-11 6:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.