Hi.. I´m having some problem with variables..
I´m working on a calendar that gets info from a database everytime a day or month is clicked... It´s a downloaded code. So the code declares this variables.. (among others.. I just put here the ones I´m trying to work with)..
$param_d[\'link_on_day\'] = $PHP_SELF.\'?date=\';
$current_day = date(\"d\", $timestamp);
$current_month = date(\'n\', $timestamp);
$current_month_2 = date(\'m\', $timestamp);
$current_year = date(\'Y\', $timestamp);
Later on the script it makes the link with those variables for each day.
<A=\"\'.$param \'link_on_day\'].$current_year.$current_month_2.$i_2.\'\">\'.$i.\'</A>
Now I get a link that is something like this:
/calend?date=20030508
¿How can I use these to grab the rows I need from the DB... ?
I´ve tried something like this with all the variables.. but It doesn´t work
@mysql_select_db($database) or die( \"No hay base de datos\");
$query=\"SELECT * FROM agenda WHERE mes=\'.$current_month\'\";
$result=mysql_query($query);
I don´t why it doesn´t read the variables.. I´ve tried using echo to see if it´s getting the value.. but it isn´t..
I know is probably a stupid thing.. but I can´t figure it out..
And yes I´m reading the Manual and I´m getting a book next week, but until then I won´t sleep well..
Thanx..