PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
class MyCalendar extends Calendar
{
public $ms_ID; [b]value not getting assigned[/b] function getCalendarLink($month, $year)
{
// Redisplay the current page, but with some parameters
// to set the new month and year
$s = getenv('SCRIPT_NAME');
return "$s?month=$month&year=$year";
}
function getDateLink($day, $month, $year)
{
$query=mysql_query("SELECT * FROM temp_course_dates");
if(mysql_num_rows($query)==0){
$query=mysql_query("SELECT * FROM on_site_course_date");
}
[b]echo $this->ms_ID; //Value Not coming[/b]
...............
$cal=new MyCalendar;
$calId=new MyCalendar;
$cal=$cal->getMonthView($month, $year);
//echo $ms_details_id=1;
$calId->ms_ID=$ms_details_id;
You've commented out the line where you echo and assign a value to $ms_details_id though. So $ms_details_id is going to be empty. Furthermore, you're not calling getDateLink() anywhere, so how do you expect it to display anything?