PHP Classes

passing extra $_GET value thorugh mkurl

Recommend this page to a friend!

      Active Calendar  >  All threads  >  passing extra $_GET value thorugh mkurl  >  (Un) Subscribe thread alerts  
Subject:passing extra $_GET value thorugh mkurl
Summary:am trying to pass extra variables thorugh url so to write to sql
Author:DJ Millward
Date:2008-05-29 09:04:03

  1. passing extra $_GET value thorugh mkurl   Reply   Report abuse  
DJ Millward - 2008-05-29 09:04:03
Hi Giorgos

Firstly thanks for this awesome class.

I am using the year calender view

$cal=new activeCalendar($yearID,$monthID,$dayID,);

$cal->enableDayLinks($myurl); // enables day links
$thisYear=$cal->actyear; // get the current year

I have a database of users in a mysql database that I want to set a table of weeks of availability. what I need to be able to do is pass an argument $id for the function mkUrl so I can then retrieve it using $_GET

what I have tried is

$cal=new activeCalendar($yearID,$monthID,$dayID,$rid);

$cal->enableDayLinks($myurl); // enables day links
$thisYear=$cal->actyear; // get the current year

and then in the function callup

function mkUrl($year,$month=false,$day=false, $rid){

but get the message

Missing argument 4 for mkurl()

the function works if i set it to $rid=false but get no value returned. if I set '$rid=value' in the function argument it works. Also I know my value is correct as i have checked it exists before the class call up.

Thank you for any help you can give me here as I understand it might be beyond the scope of what you are doing here. As you can probably see I haven't quite yet got my head around how to use classes.

Thanks in advance