Jump to content


GLOBAL Variables?

  • Please log in to reply
1 reply to this topic

#1 a2bardeals

  • Members
  • PipPipPip
  • Advanced Member
  • 62 posts
  • LocationAnn Arbor, MI

Posted 13 June 2006 - 11:41 PM

So I have hit a wall. I have two problems.


I have two lists that are dependent on variables. a daily events list (daily.php) and a monthly events list (monthly.php) they both have variables to set which day or month to view.

If i am looking at monthly.php i can use html to pass variables just by
<a href="monthly.php?mo=jan">Jan</a>
manually typing in the URL

however when i try to set a default value for $mo in monthly.php
e.g. $mo = date('M') // to auto detect todays date
i cant change the variable via the URL or a link to view other months or days


I have a page called lists.php which includes the two files together
<? include 'daily/daily.php'; ?>
<? include 'monthly/monthly.php';?>

If i use links on both pages to pass variables
the URL comes out like

[a href=\"http://www.domain.com/mysql/monthly.php?mo=jan\" target=\"_blank\"]http://www.domain.com/mysql/monthly.php?mo=jan[/a]

and i get a File Not Found

i think i need to use Global variables but i have no idea how to set that up...

any help will be very sweet!

#2 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 14 June 2006 - 06:33 AM

Sounds like more of a PHP question than a MySQL question, but maybe someone else will know.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users