Jump to content

GLOBAL Variables?


a2bardeals

Recommended Posts

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

First,

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>
or
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

Second,

I have a page called lists.php which includes the two files together
<? include 'daily/daily.php'; ?>
<br>
<? 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!
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.