[PHP] Please Help!!!! - Really BASIC stuff!

2001-03-06 Thread Martin Hughes

Hi,

Could someone please help me? If I have links on my page:

Link 1 Here
Link 2 Here

And then side.php is the following:


  
  Blah
  
  

  



Where the files to be included are: audio.txt and visual.txt respectively,
what php code should I put in my side.php? (the extention of the files does
not have to be .txt)

This seems to be a basic thing EVERY website done with php achieves -
HOW

(I am NOT familiar with php!! - English please :0))

Many Thanks :0),

Martin
==
Musical Director
University of York Gilbert & Sullivan Society
177 Hull Road, York YO10 3JY
01904 427 537 / 07951 015 220
[EMAIL PROTECTED]
http://www.mixermanic.co.uk
==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Please Help!!!! - Really BASIC stuff!

2001-03-06 Thread Martin Hughes

My God!!

You're all stars!!! (This is the **fastest** mailing list I've ever joined)


If I have *loads* of links (not just audio & visual) is there a way to
create a file to include them all?

Basically - what I've got is a frameset with side & main frames (side is for
nav, main is for... well, main stuff!) and all my links are in a .js file:

===
var navAudio="side.php?page=audio"
var mainAudio="main.php?page=audio"
function openAudio(){
  parent.main.location=mainAudio
  parent.parent.side.location=navAudio
  }
===

and the link LINK

..but with audio, visual, act 1, act 2, orchestra, cast, and loads of other
"pages". Do I put:



etc. in every page? Or is there a way of doing the whole link thing and
changing several frames with one link in php (just by the .php?page=foo
action)

I hope this makes sense!!!

Thanks LOADS,

Martin :0)

==
Musical Director
University of York Gilbert & Sullivan Society
177 Hull Road, York YO10 3JY
01904 427 537 / 07951 015 220
[EMAIL PROTECTED]
http://www.mixermanic.co.uk
==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Including file...

2001-03-10 Thread Martin Hughes

I seem to be making a mistake somewhere...


# Define the navigation bar array
$navbar = array("navmain", "info", "music", "orch", "synth", "syntype",
"audio", "recordings");

# Define the pages in arrays by section
$main = array("home");
$info = array("infomain", "about", "contact", "guestbook");
$music = array("musicmain", "musprologue", "mus1", "mus2", .., "mus28",
"musepilogue", "musbows", "musplayout");
$orch = array("orchmain", "strings", "brass", "woodwind", "percussion",
"rhythm");
$synth = array("synthmain", "part", "patches");
$synthtype = array("synthtypemain", "dx7", "k2000", "k2vx", "k2500");
$audio = array("audiomain", "synth");
$recordings = array("recordingsmain", "reccompare", "olc", "obc", "csr",
"tac", "lon97");

# Store the arrays in an array
$sections = array("&$main", "&$info", "&$music", "&$orch", "&$synth",
"&$synthtype", "&$audio", "&$recordings")

# Create the name of the .inc file
$pagename = $sections[$sect][$page]; # ***THIS LINE IS CAUSING A PARSE
ERROR***
$navname = $navbar[$nav];


I then want to include the file $pagename.inc in the main frame, and
$navname.inc in side.php


Cheers,


Martin :0)

==
Musical Director
University of York Gilbert & Sullivan Society
177 Hull Road, York YO10 3JY
01904 427 537 / 07951 015 220
[EMAIL PROTECTED]
http://www.mixermanic.co.uk
==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Crashing in Win2K with IIS and latest PHP installed when loading an open page...

2001-12-18 Thread Martin Hughes

Help!!! If I'm editing a php file & have it open (or have recently done so)
in notepad sometimes when i do "reload" or open the file in IE6 my computer
pauses for a second, then shuts itself off with a resounding click of the
hard disks and promptly restarts.

I don't think it's a disk problem - it ONLY happens when I'm loading a php
file via http://localhost

I'm confused... help!!

Thanks

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] JavaScript & php question - mainly JS though so slightly OT but hep needed!!! :o)

2001-12-18 Thread Martin Hughes

How could I write the function windowPopup(XX) where XX is a variable that
can change from link to link, for a popup info window to load a php file
with the variable XX in the url?

So the link would look like:
Link Text

and I want that link to open the page info.php?patch=XX in a new popup
window

Do I do it something like this, or is there a faster/better way??

Cheers & Merry X-Mas!

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] JavaScript & php question - mainly JS though so slightly OT but hep needed!!! :o)

2001-12-19 Thread Martin Hughes

Many Thanks everyone!!

Mart



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] How should I do this site...?

2001-12-19 Thread Martin Hughes

Heya,

OK - I have a site I've been working on on and off for a while. It started
as a static page, then I changed it so it uses php. This was great - until I
started putting content in the design. I now have about 300 *.inc files for
the site, and updating them is a joke!

The site is designed in a heirachical way:

Top
  Section 1
id 1
id 2
id 3
id 4
  Section 2
id 1
id 2
id 3
  Section 3
id 1
id 2
id 3
id 4
etc...

I'm using 1 file for the code - index.php?sect=XX&id=XX and the nav menus
are dynamically generated and populated on the page along with the content
which is filled by an inc file in directory: root/php/"sectname"/"id".inc
where "sectname" is the name of a section defined in an array in index.php
(eg, section 6 is "synthesizers"). The images and headings on the page are
also dynamically generated (images have a number eg "2.jpg" for the heading
of section 2 etc.)

In sections 6 though, ids 2-6 are based on one template, so i have 5 files:
2.inc, 3.inc, ... 6.inc all exactle the same, just containing 
This seems somewhat stupid.

Oer X-Mas & New Year, I want to entirely recodethe site so it is more "user
friendly" for me to maintain. I am slowly getting better and better at php
so it should be good.

Does ANYONE have any pointers as to how to start and do this thing. Any
ideas for how my site should be layed out (directory-wise etc - is it easier
to have 1 directory per section and hold everything in it - images included,
or is it best to have a separate img/ directory??).

many thanks all - Seasons greets!!

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] RE: How should I do this site...?

2001-12-19 Thread Martin Hughes

Thank you!

What is the point of using "unset" here (sorry - newbie question I know but
I'm learning all the time :o))

Is it possible therefore to create more than 2 levels this way? If my
heirachy goes 3 or 4 levels deep in some places? And could I also get a
navbar to be generated dynamically from it (on my site the  of the
page, , the  text for the heading image, and the nav bar
entry will all be the same, with the exception of the  also having
the other levels in it, for example (3 levels deep):
The Music of Les Miserables | Synthesizers | Korg Triton

Thanks,

Martin

=
Assistant Musical Director "Crazy For You" - February 2002
177 Hull Road, York YO10 3JY
07815 151 970 / 01904 427 537
[EMAIL PROTECTED] / [EMAIL PROTECTED]
=


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP & XML

2001-12-19 Thread Martin Hughes

Heya,

Is it possible to integrate XML with PHP - ie get data out of an XML file
and format it in html using php? Or alternatively, use php within an XSL
file...?

Cheers

Mart



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PHP & XML

2001-12-19 Thread Martin Hughes

Sorry - I should perhaps say that I'm only intending to code this site for
IE(5/6) - there are too many issues with NetS - I **KNOW** that that's bad
and lazy, but that's the way it's gonna be :o)

M



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP & XML

2001-12-19 Thread Martin Hughes

Thanks! Much appreciated.

M

"Bas Van Rooijen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> For XML use parser: http://www.php.net/manual/en/ref.xml.php
>
> PHP in .xsl file is possible, edit your httpd.conf
>
> find this line:
> AddType application/x-httpd-php .phtml .php .php3
>
> and add extensions that should be parsed by PHP, like so:
>
> AddType application/x-httpd-php .phtml .php .php3 .xsl
>
> be carefull, anything between  will be executed by
> default. if this may conflict with the nature of the output (like .xml
files)
> you can edit your php.ini to force long open tags 
> find this line:
> short_open_tag = On
>
> change On to Off
>
>
> bvr.
>
> On Thu, 20 Dec 2001 01:34:58 -, Martin Hughes wrote:
>
> >Heya,
> >
> >Is it possible to integrate XML with PHP - ie get data out of an XML file
> >and format it in html using php? Or alternatively, use php within an XSL
> >file...?
> >
> >Cheers
> >
> >Mart
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Php & Directory structures

2001-12-22 Thread Martin Hughes

Heya,

Can PHP count the number of a certain ftile in a directory and then print
the result to the screen? I have articles on my site that are in XML/XSL
format like:

root/articles/00_head.xml
00_body.xml
01_head.xml
01_body.xml
02_head.xml
02_body.xml
etc... (with appropriate XSL stylesheets too...)

and I want to have a main "article page" with the head.xml info on it:

Article 00:
By: 
Date: 
Subject: 

and then a link to the article itself (which will be an XSL stylesheet
loading both the header info and the article body.xml).

Can php count the number of articles etc in the dir and then automatically
create the page? (or can anyone think of a better way of doing this :-))

Cheers,

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Please Help - getting a hightlight depending on selected page

2001-08-22 Thread Martin Hughes

Hi can anyone help me please!?

I have a page that has a navigation table on the left with various links:

Information
Software
Cars
Dishwashers
Paper
Contact
etc...

(not the real links ;))

and I want the cell of the section I am in to be highlighted (ie if I am in
"Cars" I want the "Cars" link to have a red background). I have set it up so
that in CSS the id "sel" is a red b/g.

How do I set the id of a certain cell to "sel" taking it from the url
(index.php?menu=cars as a very bad example of php coding :)).

Cheers

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Please Help - getting a hightlight depending on selected page

2001-08-22 Thread Martin Hughes

OK here's the code in the page:






 Welcome

Home
Introduction
Changes & Cuts
Scores
Orchestra
Synthesizers
Sound System
Articles
21st Century Les
Misérables
Information
Discussion Forums






I am using this 1 page as the php 'template' with content added depending on
the url. For example, to go to the synthesizers page the url is:
index.php?sect=5&id=0&page=31

where sect=5 is the part that sets the menu highlight (the menu is alway the
same, hard-coded into the page - all I want to do is change the css id="sel"
from Home to Synthesizers.

Cheers

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Please Help - getting a hightlight depending on selected page

2001-08-22 Thread Martin Hughes

Thanks everyone for the help!!!

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Please Help - getting a hightlight depending on selected page

2001-08-24 Thread Martin Hughes

Sorry Hugh - didn't mean to send it just to you!!

Hi!

Thanks for the help!

It works great, but I've now made the array 2 dimensional:

Les Misérables" => array ("About Les
Misérables"),
"Introduction" => array ("About Les Misérables"),
"Changes & Cuts" => array ("About Les Misérables"),
"Scores" => array ("About Les Misérables"),
"Orchestra" => array ("About Les Misérables"),
"Synthesizers" => array ("About Les Misérables"),
"Sound System" => array ("About Les Misérables"),
"Articles" => array ("About Les Misérables"),
"21st CenturyLes Misérables" => array ("About Les
Misérables"),
"Information" => array ("About Les Misérables"),
"Discussion Forums" => array ("About Les Misérables")
);
?>

(they're not all the same - it's just for quick tesing purposes!)

Now in the nav menu I get:

Warning: Undefined offset: 0 in E:\inetpub\wwwroot\index.php on line 103
>
Warning: Undefined offset: 1 in E:\inetpub\wwwroot\index.php on line 103
>
Warning: Undefined offset: 2 in E:\inetpub\wwwroot\index.php on line 103
>
Warning: Undefined offset: 3 in E:\inetpub\wwwroot\index.php on line 103
>
etc... down to "10"




the rest of the script is:

".$index[$i]."";
< LINE 103

echo "";
}
?>


is it something to do with the "count($index)"?

Thanks for all the help!

Martin-)



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]