Implementing a PHP based Calendar Problem

X

X10

Guest
Hello all,
In my effort to continue learning how PHP works and updating my website, I am trying to implement a PHP based Calendar.
I have used the code from:

http://www.devshed.com/Server_Side/PHP/MilesToGo/page1.html

And I also tried the updated code from:

http://www.burney.ws/software/library.php?tech=1

Which is actually an updated version of the former link.
Both use MySQL to implement the Data Storage aspect of the Calendar.
My problem is that trying to use the Previous Month, Next Month or Edit/Delete features I run into a problem.
When looking at the links for any of these items it reads like this:

http://www.clan7072.barrysworld.net/clan7072/blahblah

But there is no 'clan7072' Directory in my structure.
On further inspection, the PHP_SELF string returns this value:

/clan7072/phpselftest.php

So is there something in the way that the MySQL and WebSpace from Game.Net/BarrysWorld that won't let me use the code that I am trying to use, or am I missing something fundamental in the PHP code that I need to adapt to get it working.

Many thanks in advance for your help,

X10

Edit ~ URIs fixed ~ Jonty :)
 
X

X10

Guest
Additional Information

In case you actually want to see the Calendar running as it is:

http://www.clan7072.barrysworld.net/month.view.php

To get a better idea of the error problem and the links I am talking about that don't exist.

This is all just a test website for any new code I attempt to implement, just in case you find anything else on the site that is messed up ;)

X10

Edit ~ URIs fixed ~ Jonty :D
 
J

Jonty

Guest
Hi X10

Basically, BarrysWorld/GAME.net employs something called absolute and virtual addresses for its hostees. Your absolute address is http://hosted.barrysworld.net/yoursitename/ .Since that isn't very 'pretty', you are also given a virtual address which essentially redirects to your absolute address. Your virtual address is configurable, but usually takes the form http://www.yoursitename.barrysworld.net

Problems arise when you try and run scripts using the virtual address, as PHP gets a little confused. The easiest way to fix all this is simply to use your absolute address whenever you're configuring a script (e.g. use http://hosted.barrysworld.net/clan7072/). If this doesn't help, however, feel free to post again.

Kind Regards
 
X

X10

Guest
Hello Jonty,
Firstly, thank you for putting in the URI's for my link, much appreciated.
Secondly, as I'm very new to PHP and still trying to learn it all, I am a bit confused by all the code that I'm working with.
I understand what you are saying with regards to virtual addressing, but the ony times when either of the PHP scripts I have mentioned above actually refers to a PHP file is via the $PHP_SELF 'function', which has the afformentioned problem of adding in the 'clan7072' which I understand comes from what you have said.

So my question is, with a piece of code for example like this:

<a href="<? echo $php_self; ?>?currMonth=<? echo $nextMonth; ?>&currYear=<? echo $nextYear; ?>">

Should I just replace the:

<? echo $php_self; ?>

With just the name of the file (in this case month.view.php), or with the complete URL:
hppt://hosted.barrysworld.net/clan7072/month.view.php
?

I have tried the latter with no avail. I'll give the former a try as soon as I can.

X10
 
J

Jonty

Guest
Hi X10

In theory, both methods should work, but if you want to try just adding the file name, then do so.

Your given code would then look something like:

Code:
<a href="month.view.php?currMonth=<? echo $nextMonth; ?>&currYear=<? echo $nextYear; ?>">

Good luck!
 

Users who are viewing this thread

Similar threads

S
Replies
6
Views
626
wyrd_fish
W
W
Replies
8
Views
1K
wyrd_fish
W
S
Replies
5
Views
735
L_Plates
L
S
Replies
2
Views
541
wyrd_fish
W
P
Replies
13
Views
1K
wyrd_fish
W
Top Bottom