[PHP] Returning Newbie (Disoriented)

2004-01-11 Thread Freedomware
I've been lurking on this list for quite some time. I did a little 
homework, downloaded a preconfigured package (Apache, PHP and MySQL), 
and was beginning to learn the ropes when I had a rather severe hard 
drive crash, along with other computer and website problems. (Actually, 
I had only installed Apache and was trying to get it to work.)

I'm now back up and running and would like to give it another shot. I'd 
like to ask a few questions. Some may be a bit redundant, but I want to 
make sure I'm starting out right.

My operating system is Windows XP Pro, and I've already begun using the 
.php extension on my webpages in preparation for using PHP. (See 
http://www.geobop.org/test/index.php )

Which PHP do you recommend I download - 3.0, 4.0 or 5.0? Your PHP 
tutorial at http://www.php.net/tut.php offers a link to preconfigured 
packages (Apache, PHP and MySQL). I noticed that the package that got 
the most votes by far is FoxServ (over 4,000 votes) - 
http://www.hotscripts.com/Detailed/9942.html  Therefore, I'm tentatively 
choosing it, due to its popularity.

According to their website, at http://www.foxserv.net/portal.php, 
"FoxServ is an Apache / mySQL / PHP installer package for Windows. 
Unlike NuShpere or PHPTriad, FoxServ features the latest version of all 
included pacakges, user defined configuration during installation, PHP 
as a module, PEAR, and the Zend Optimizer" Thus, I assume this downloads 
PHP 5.0.

I'm also browsing an article about PHP4 Installation at 
http://hotwired.lycos.com/webmonkey/00/44/index4a_page7.html, which 
says, "Usually Windows users use the CGI version of PHP . . ."

So I'll probably be downloading a preconfigured package from FoxServ and 
setting up a CGI version of PHP. Does that sound OK?

Another question: I think I have a Microsoft IIS server (included with 
Windows XP Pro). If so, will I have to disable or uninstall it before I 
install an Apache server?

Also, I hope to eventually get an Apple/Mac computer and a Linux hard 
drive (on either my PC or Apple). If I install Apache/PHP/MySQL on an 
Apple, will I be in familiar territory, or is it quite different from 
using PHP with Windows? Would I be able to work on my website with 
FrontPage on a PC and publish some PHP pages to the web, then add some 
functions with Dreamweaver on a Mac and republish them to the web, or 
would the two PHP programs (Windows and Apple) have a conflict?

Here's one last question that's a bit of an aside: When I work on a 
webpage with a .php extension in FrontPage, it only opens the page in 
Notepad, and I can't preview it in Internet Explorer (though I can view 
it in IE once it's online). Do you have any idea how to fix it?

Thanks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Returning Newbie (Disoriented)

2004-01-11 Thread Freedomware
Ryan A wrote:

"It installed pretty easy and the guy who makes it is real cool
and will help you via the forum. Also options to run other things like
PERL"
Thanks for the tip. You raised one other question I have - PERL.

I know nothing about it, but I just wondered how it fits into the big 
scheme of things. Am I correct in understanding that PHP is, in the 
broadest sense, a more user friendly PERL equivalent, and that people 
who have mastered PHP still use PERL for doing certain advanced 
functions that PHP can't handle?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Returning Newbie (Disoriented)

2004-01-12 Thread Freedomware
OK, here are three more questions:

1. I visited Apache's download page at 
http://httpd.apache.org/download.cgi  It says the best version to 
download is 2.0.48.

Then it lists the following:

Unix Source: httpd-2.0.48.tar.gz [PGP] [MD5]
Unix Source: httpd-2.0.48.tar.Z [PGP] [MD5]
Win32 Source: httpd-2.0.48-win32-src.zip [PGP] [MD5]
Win32 Binary (MSI Installer): apache_2.0.48-win32-x86-no_ssl.msi [PGP] 
[MD5]
Other files

My operating system is Windows XP Pro, so I assume I want to download 
Win32 Source or Win32 Binary - but which one? What's a MSI Installer?

2. Do you know of any instructions for disabling the Windows IIS server 
before I install Apache? I remember going through this process before, 
and it was quite a hassle.

3. What's the best PHP program to download, and would I download it from 
 www.php.net?

Thanks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Returning Newbie (Disoriented)

2004-01-12 Thread Freedomware
Scratch the first two questions - I figured out the MIS Installer and 
downloaded it, and it looks like the IIS server isn't installed on my 
computer.

But a couple other questions popped up when I began installing Apache:

What do I type in for "Network Domain" and "Server Name"?

I have over a dozen websites, or are they asking for information that 
relates to my computer?

Or should I just pick my biggest website and list www.geobop.org under 
"Network Domain," then get the "Server Name" from my ISP?

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Returning Newbie (Disoriented)

2004-01-12 Thread Freedomware
Dvdmandt wrote:

If you got dozens domains, mod_l33t is highly recommended, but it's only for
Apache 1.3 which I use under both Me, 2k and XP btw... Apache 2.0 just cause
problems with PHP... Well, I haven't really confirmed it yet, but if you
read on the php.net manual page, you'll see it's not recommended yet...
Unless you run as CGI which I wouldn't recommend for anything in this
world... It's much slower, and the computer is slowed down noticably after
about 50 requests... At least it was like that for me with my old setup...
Thanks for the tips, but there's one thing I should point out - I won't 
actually be using Apache with my online domains (at least, I don't think 
so). I'm just going to use it on my computer to preview and test web 
pages before I publish them to my websites, which are hosted by ISP's 
that use Apache servers.

But if I'm using it only locally, and I also have PHP on my computer, 
then I should probably take your advice and download Apache 1.3.

I'm not really sure what I'm talking about (yet), but it should become 
clearer once I get Apache installed!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Returning Newbie (Disoriented)

2004-01-12 Thread Freedomware
Dvdmandt wrote:

Also, I feel like I wanna tell yo some about myself, so you don't make your
descissions cause of me.. I'm 14 years old, live in sweden, learning
programming in C right now (made my first PHP module a week ago.. :)) I also
play around some with Apache 1.3 Api... I've been using PHP since 4.1.. I've
helped lots of friends with installation though...
Holy cow, you know more about computers than I do, speak two languages, 
and you're safe from President George W. Bush.

I'm jealous! :)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Did I choose the correct download?

2004-01-12 Thread Freedomware
My operating system is Windows XP Pro. I was advised to download Apache 
1.3 if I want to work with PHP, so I went to 
http://httpd.apache.org/download.cgi and found the Apache 1.3 download 
section.

It offered the following choices:

* Unix Source: apache_1.3.29.tar.gz [PGP] [MD5]
* Unix Source: apache_1.3.29.tar.Z [PGP] [MD5]
* Win32 Binary (Self extracting): 
apache_1.3.29-win32-x86-no_src.exe [PGP] [MD5]
* Other files

I assumed Win32 was for all Windows programs, but the first line of the 
README file says, "Apache is an HTTP server, originally designed for 
Unix systems. This is the version of Apache for Microsoft Windows 2000, 
NT, 98, and 95 systems."

Why doesn't it mention Windows XP? Do I need to download another program?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Did I choose the correct download?

2004-01-12 Thread Freedomware
OK, thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Apache - Previewing Pages with Dreamweaver

2004-01-12 Thread Freedomware
Well, I downloaded Apache and PHP, installed Apache, and was had a bunch 
of questions to ask - until I tested Apache and discovered it's already 
working!

I go into Start Programs, then click Control Apache Server > Start, and 
the little black window opens. I click  to close it.

But before I wade through all the documentation, I thought I might speed 
things up by cutting to the chase. My first goal is to be able to 
preview web pages made with Dreamweaver on my new Apache server. Then 
I'll install PHP and get it up and running.

In preparation for using Apache/PHP, I began listing PHP/MySQL as the 
testing server in my site definitions. (Apache isn't listed as a choice.)

That screwed things up immediately, but I could access my pages by 
simply accessing a web page I created with links to all the websites on 
my computer.

Now that I have Apache installed, I need to figure out what I have to 
fix in either Apache or Dreamweaver so that I can preview pages directly 
in Dreamweaver.

The URL prefix for each of my defined websites is http://localhost/

I just discovered that if I try to preview the home page of a website 
that has NOT been defined, I get the following message:

"To preview pages containing server-side code, you need a testing 
server. Would you like to specify one now?"

If I go through the process, choosing PHP/MySQL, I get an error message. 
But if I cancel out of the process, the page defaults to the correct 
URL, such as file:///C:/sites/geobop/index.php or 
file:///C:/sites/geobop/index.php

So here are three questions:

1. Do I need to fix something in Dreamweaver or Apache?

2. When everything's correctly set up, should the URL's of web pages on 
my computer begin with file:///C:/sites/ or "localhost"?

3. Since my testing server is PHP/MySQL, does that mean I won't be able 
to preview my pages at all until I've also installed PHP?

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Apache - Previewing Pages with Dreamweaver

2004-01-12 Thread Freedomware
P.S. Should I go ahead and install PHP, or should I wait until I'm able 
to preview pages on my new Apache server?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP Installation Questions

2004-01-12 Thread Freedomware
I'm running Windows XP Pro and just installed Apache 1.3. It appears to 
be running, so I guess I'm ready to install PHP.

I visited http://snaps.php.net and downloaded the latest PHP program - 
CVS (5.0.x-dev). I'm reading the installation instructions at 
http://cvs.php.net/co.php/php-src/win32/install.txt and find them fairly 
confusing.

First, it says, "There are two main ways to install PHP for Windows: 
either manually or by using the InstallShield installer."

I definitely want to do it the easy way, but how do I access the 
InstallShield installer?

But it appears that I first have to do two other things:

1. Stop Apache

2. Decide whether I want to install PHP as a CGI or something else (a 
module?)

So how do I stop Apache, and should I install PHP as a CGI or choose the 
other option? I'm going to be using PHP on websites, primarily to make 
server side includes and, eventually, to do some work with databases.

The instructions say, "Once the installation has completed the installer 
will inform you if you need to restart your system, restart the server, 
or just start using PHP."

I assume this refers to using the InstallShield, which renders just 
about everything else on the installation instructions page moot, right?

If I use the InstallShield, will I still have to install the Windows 
extensions, or are they installed automatically?

Later, the instructions talk about Installing PHP on Windows with Apache 
1.3.x. It says, "There are two ways to set up PHP to work with Apache 
1.3.x on Windows. One is to use the CGI binary (php.exe), the other is 
to use the Apache module dll. In either case you need to stop the Apache 
server, and edit your httpd.conf or srm.conf to configure Apache to work 
with PHP. We'll refer to either of these files with httpd.conf in the text."

Is this all done automatically if I use the InstallShield?

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP Installation Questions

2004-01-12 Thread Freedomware
Dvdmandt wrote:
Errm... Just unzip the php zip, so that php.exe is located in c:\php (or D:\
or something).. For example C:\php\php.exe... Then, find your Apache config
file in the Apache\conf folder, named httpd.conf.. Open it, scroll down to
the bottom, then add
LoadFile C:/PHP/php5ts.dll
LoadModule C:/PHP/php5Apache.dll
AddType application/x-httpd-php .php .php5
AddType application/x-httpd-php-source .phps
Then restart Apache, 'NET STOP Apache', 'NET START Apache' for example...
php.net/manual/en/, click install..


H... I can't locate a file named httpd.conf, but the conf folder 
contains two files named httpd and httpd.default, which appear to be 
identical twins.

They both end with this:

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#
#ServerAdmin [EMAIL PROTECTED]
#DocumentRoot /www/docs/dummy-host.example.com
#ServerName dummy-host.example.com
#ErrorLog logs/dummy-host.example.com-error_log
#CustomLog logs/dummy-host.example.com-access_log common
#
* * * * * * * * * *

So I'm assuming you're teling me to change it to this:

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#
#ServerAdmin [EMAIL PROTECTED]
#DocumentRoot /www/docs/dummy-host.example.com
#ServerName dummy-host.example.com
#ErrorLog logs/dummy-host.example.com-error_log
#CustomLog logs/dummy-host.example.com-access_log common
#
LoadFile C:/PHP/php5ts.dll
LoadModule C:/PHP/php5Apache.dll
AddType application/x-httpd-php .php .php5
AddType application/x-httpd-php-source .phps
* * * * * * * * * *

Right? And do you think I should do it to the httpd file, the 
httpd.default file or both?

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP Installation Questions

2004-01-12 Thread Freedomware
H... The first installation ended with this message:

"Sorry, the software to automatically configure the Apache httpd.conf 
file has not yet been written. You will have to configure Apache 
manually. See the install txt file for more details."

It then occurred to me that I forgot to tell you that I'm installing PHP 
4.3.4; there was a problem with 5.0, so I downloaded 4.3.4 instead.

So instead of adding this to my conf/httpd file:

LoadFile C:/PHP/php5ts.dll
LoadModule php5_module C:/PHP/php5Apache.dll
AddType application/x-httpd-php .php .php5
AddType application/x-httpd-php-source .phps
I replaced every instance of php5 with php4, so the conf/httpd file ends 
like this:

# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#
#ServerAdmin [EMAIL PROTECTED]
#DocumentRoot /www/docs/dummy-host.example.com
#ServerName dummy-host.example.com
#ErrorLog logs/dummy-host.example.com-error_log
#CustomLog logs/dummy-host.example.com-access_log common
#
LoadFile C:/PHP/php4ts.dll
LoadModule php4_module C:/PHP/php4Apache.dll
AddType application/x-httpd-php .php .php4
AddType application/x-httpd-php-source .phps
* * * * * * * * * *

But I get the same error message.

Then I replaced the four lines I added to the conf/httpd file with three 
lines I copied from the Installation.txt:

   LoadModule php4_module c:/php/sapi/php4apache.dll
   AddModule mod_php4.c
   AddType application/x-httpd-php .php
I still get the same error message. However, on all three occasions when 
I clicked out of the error message, I got a message telling me PHP was 
successfully installed.

Do you have a hunch what I should do next? Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Installing Preconfigured Packaged Over Apache

2004-01-12 Thread Freedomware
I was able to install Apache fairly easily, and it appears to be 
working, but PHP is way over my head. So I downloaded a preconfigured 
package called XAMPP, from http://www.apachefriends.org/xampp-en.html

The specs say it includes Apache 2.0.48, which I was told is not good 
for working with PHP; I understand Apache 1.3.29  (the one I installed) 
is best.

So can I install a preconfigured package with Apache 2.0.48 over Apache 
1.3.29, without removing Apache 1.3.29? If so, what's the best way to 
proceed? Is there a simple way to switch the PHP connection from Apache 
2 to Apache 1.3, after which I would uninstall Apache 2 (after I get 
Apache 1.3 and PHP up and running)?

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Returning Newbie (Disoriented)

2004-01-12 Thread Freedomware
Chris W. Parker wrote:

* * * * * * * * * *

Wow, thanks for all the tips!

I started from scratch and installed a preconfigured package, with 
Apache 2 and PHP 4. Apache, PHP and MySQL seem to be working OK, though 
a couple other functions don't.

Now I just have to get it hooked up to Dreamweaver. But I'll take your 
advice and find out what programs my host is running.

That's a helpful tip!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Installing PHP on 2nd Windows Drive

2004-01-13 Thread Freedomware
I got a preconfigured package - Apache 2.0/PHP/MySQL - up and running, 
then I installed Apache 1.3. Everything seems to be working fine, and 
I'm ready to start tweaking it.

In the meantime, I bought a book about Apache, PHP and MySQL, which 
includes tutorials on downloading the programs individually.

I don't want to mess up what I've already installed, but I have an 
external hard drive that I use for backing up my documents. Could I 
install new Apache, PHP and MySQL programs on that drive? They wouldn't 
interfere with the equivalent programs on the C drive, would they?

In fact, is it possible to have PHP programs from two hard drives open 
at the same time? After all, I can open up documents on both drives with 
Windows Explorer.

Of course, I guess I'd have to install Dreamweaver on the second drive, 
too, so I'd be able to test PHP and make sure it's working.

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Installing PHP on 2nd Windows Drive

2004-01-13 Thread Freedomware
OK, thanks.

Dvdmandt wrote:

I have one Apache installed (well, 8 or 9, but one that I really use all
day), 4 PHP installs.. I have PHP 4 at C:\php, Apache at D:\Apache, PHP3 at
D:\php3, PHP5 at D:\PHP5, mysql at D:\mysql4, my webdocuments in c:\www,
D:\www2, G:\document..\\my documents
and so on.. No problems at all.. The only problem you'll get is that you
can't une the Apache installer twice without uninstalling the first one... I
use to just rename the Apache folder, uninstall (no files get removed), then
I rename back, then I reinstall to overwrite the files which needs to be
updated...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Renaming and Moving php.ini and php4ts.dll Files

2004-01-13 Thread Freedomware
I have PHP installed on Windows XP Pro as part of a preconfigured 
package (XAMPP). I'm reading a book about installing and configuring PHP 
which says I should rename the php.ini-dist file to php.ini and move it 
to the Windows directory and move the php4ts.dll file to Windows\System\

I found php4ts.dll and moved it, but when I try to rename php.ini-dist 
to php.ini, it says that file already exists - even though I can't see it.

So I moved it to Windows\System\, THEN renamed it - but I got the same 
message. But I can't see php.inin in Windows\System\ either.

I'm wondering if I should have left these alone since they're part of a 
preconfigured package and are supposed to be where I found them.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Installing PHP on 2nd Windows Drive

2004-01-13 Thread Freedomware
Dvdmandt wrote:

I have one Apache installed (well, 8 or 9, but one that I really use all
day), 4 PHP installs.. I have PHP 4 at C:\php, Apache at D:\Apache, PHP3 at
D:\php3, PHP5 at D:\PHP5, mysql at D:\mysql4, my webdocuments in c:\www,
D:\www2, G:\document..\\my documents
and so on..
So if I understand correctly, you could have several of each installed 
on the SAME DRIVE even?

I'm thinking of creating two new folders on my C drive, then installing 
Apache, PHP and MySQL one at a time in the first folder, then installing 
that preconfigured package that seems to work so well in the second drive.

The Apache installs would be 1.3 and 2.0, but the two installations of 
PHP and MySQL might be the same version, for all I know. That would be 
really convenient!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Can you recommend a good PHP includes tutorial?

2004-01-14 Thread Freedomware
I thought this would be the easiest thing to learn, but I'm striking out 
right and left. I bought a book about PHP, but the includes examples 
don't work for me at all. I searched several forums and www.php.net, but 
it's hard to even zero in on a good tutorial.

I think part of the problem is that the word "include" apparently covers 
a lot of territory.

I'm looking for a plain vanilla equivalent to Microsoft's "include 
pages." For example, suppose I want to have the same title and image at 
the top of every page on my website. I could put the title and image on 
a separate page, then use an include to insert it on all the other pages.

It might be especially nice to find an online working example that could 
be downloaded and picked apart.

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Can you recommend a good PHP includes tutorial?

2004-01-14 Thread Freedomware
Yikes, scratch my last post!

I think I stumbled over the answer just after I posted it.

Freedomware wrote:

I thought this would be the easiest thing to learn, but I'm striking out 
right and left. I bought a book about PHP, but the includes examples 
don't work for me at all. I searched several forums and www.php.net, but 
it's hard to even zero in on a good tutorial.

I think part of the problem is that the word "include" apparently covers 
a lot of territory.

I'm looking for a plain vanilla equivalent to Microsoft's "include 
pages." For example, suppose I want to have the same title and image at 
the top of every page on my website. I could put the title and image on 
a separate page, then use an include to insert it on all the other pages.

It might be especially nice to find an online working example that could 
be downloaded and picked apart.

Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Can you recommend a good PHP includes tutorial?

2004-01-14 Thread Freedomware
Wow, that is a lot simpler than I imagined. Thanks for the tip!

Jay Blanchard wrote:

[snip]
I thought this would be the easiest thing to learn, but I'm striking out
right and left. I bought a book about PHP, but the includes examples 
don't work for me at all. I searched several forums and www.php.net, but

it's hard to even zero in on a good tutorial.
[/snip]
http://www.php.net/include

There is no tutorial for this because it is painfully simple to use. 

Create toBeIncluded.php --


Today is 

You're all done!

Now create myIncluded.php --




Welcome!

inlclude("toBeIncluded.php");

?>


All done! Now just place these files in the same directory in your web
server and load myIncluded.php from the browser. You may have to pay
close attention to the paths of the files, but it is pretty simple
really.
HTH!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Variable PHP Includes - Is there such a thing?

2004-01-14 Thread Freedomware
Suppose you design a standard banner for the top of your web pages and 
use an include to insert it into every page on your site, like this:


But you later decide you'd like to change just one element on each page. 
For example, you might design a standard image banner, followed by a 
title and subtitle for each page, but you want to change the title to 
Alaska, Nebraska or Wyoming on each page.

Is there a way to do this with PHP? If it has a name, I can search for 
information online, but I don't even know what to call it.

I've played with something of this nature in Dreamweaver. You can design 
a template that turns out carbon copies of a page, but single out 
certain items by enclosing them with @@, which are somehow changed on 
individual pages, or something like that. I can't remember what it's 
called at the moment.

Another strategy would be to use a PHP include to insert an element on 
different pages, then modify each element with a unique style sheet on 
each page.

But I just wondered if PHP offers additional possibilities for similar 
experiments.

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Variable PHP Includes - Is there such a thing?

2004-01-15 Thread Freedomware
(Oops - I replied by e-mail; guess I should have posted my response to 
the list.)

--- Rory McKinley <[EMAIL PROTECTED]> wrote:

> A possible option  could be something like  this
>
> {calling_template.php}
>
> /*State name does not have to be set statically,
> can be set from SQL query
> etc*/
I think I understand what you're saying. I'm just getting started with 
PHP and haven't touched MySQL yet, but I can see you're setting up a 
database, or "query," and...

"> That way you can put whatever you want as the
> statenameat the top of your pages, and
> the header willalways reflect it."
Then you'd put some sort of code in the head section of each page that 
would draw on the system you set up to translate the codes for each page.

I probably didn't work it right, but I think I get the general idea. 
I'll hang on to the code you gave me and play with it just as quick as I 
can learn more about this stuff.

One question, is the example you gave me a pure PHP function, or does it 
indeed involve MySQL, too?

Thanks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Variable PHP Includes - Is there such a thing?

2004-01-15 Thread Freedomware
Rory McKinley wrote:
I hope this has clarified matters somewhat and not made things worse.

Absolutely; the only thing that has made matters worse so far is the 
book "Teach Yourself PHP, MySQL and Apache," which had me thinking 
making PHP includes was going to be a minor wrestling match. In fact, 
they were so simple even I can understand them, and the information you 
just gave me is more or less the vision I had in my mind some time ago, 
before I even heard of PHP.

Thanks for the tips!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP Includes versus sloppy Dreamweaver code and split elements

2004-01-15 Thread Freedomware
My first question is really trivial, but I noticed that Dreamweaver 
likes to display my PHP includes code like this...

   
When I do a search and replace function, it often jumps onto another 
element's line, like this:

   
I changed the code to this:



and it seems to work just fine. But I just wondered if there's some 
potential problem or convention that I should be aware of.

* * * * * * * * * *

I also wondered if it's OK to include just a portion of another element, 
like a table or layer, in a PHP include, like this:




  
First Row
  


(The include would include the remainder of the table and div main's 
closing tag, )

Again, I tried it, and it seems to work just fine. I just wondered if 
there's something I should be warned about.

Thanks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Includes versus sloppy Dreamweaver code and split elements

2004-01-15 Thread Freedomware
Marek Kilimajer wrote:
Sure you can, but I would not open a tag in one file, and close the tag 
in another. This makes code very unreadable, the errors are hard to find 
and also the code is not reusable.


Hm That's a good point.

Maybe I'll take another look at layers, as the table designs I've been 
working with don't really lend themselves to being chopped up between 
includes.

Thanks for the tips.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Freedomware
I'm having a blast with PHP includes and echo functions; I never dreamed 
they could be so simple and effective. But I have a couple questions 
relating to head sections and search engines.

Consider the following html code:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">






$statename = 'Alaska';
$postcode = 'ak';
$linkcode = 'world/na/us/ak';
?>



Welcome to !

* * * * * * * * * *

And here's the html code from the include named head.php:


$todayDate = date("m-d-Y");
?>
Freedomware > 
 versus 
Microsoft" />


* * * * * * * * * *

I discovered that includes will apparently work just about anywhere, but 
echo functions apparently don't work with the  tag and meta tags; 
at least, I can't see the word "Alaska" in those locations when I click 
View Source in my browser.

So I wondered if there IS a way to make echo functions work in meta tags.

Also, do you know if text derived from includes causes any problems with 
search engines? My guess is no, because I can see the included words 
just fine when I click View Source.

Along similar lines, I wondered if there might be potential pitfalls if 
you import links to style sheets and javascripts as includes. Everything 
seems to work just fine so far.

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Freedomware
i just changed the opening and closing tags a little (you didnt need so
many) but the main change is, now the variables come before the included
file, so that the include file can access those variables too.
Holy cow, this gets simpler all the time. Pretty soon, there'll be 
nothing left on my page but PHP includes and echo functions!

Does this cut down on a website's file size? In other words, are the php 
includes effectively inactive when no one's viewing your main pages, 
leaving them empty of the included pages?

Here's another question. I'm replacing the ../ URL prefixes with the 
echo name $periods, so I can use these includes in pages on several 
levels, such as geobop/one and geobop/one/two, simply replacing $periods 
with ../../ or ../../../.

Below is some code from my include page:

css/a1.css" rel="stylesheet" 
type="text/css" />
css/MIDDLE.css" rel="stylesheet" 
type="text/css" />
css/na/rockies.css" rel="stylesheet" 
 type="text/css" />

But suppose there's a certain page where I don't want the style sheet in 
the middle - the one I named MIDDLE. Is there a way to mark it in the 
include page, then instruct the main page to either not import it or 
replace it with nothing ("")?

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Freedomware
I wrote:

? But suppose there's a certain page where I don't want the style sheet in
? the middle - the one I named MIDDLE. Is there a way to mark it in the
? include page, then instruct the main page to either not import it or
? replace it with nothing ("")?


Luke wrote:

youd have to use a variable, so in the main page do the following

if($pagetoshow == 'withoutmiddle'){
$includemiddle = FALSE;
}else{
$includemiddle = TRUE; //(or false depending)
}
and in the include do this:

if($includemiddle == TRUE){
echo '';
}




I think I just about have it. But I replaced the "middle" in both our 
examples with the page I'm REALLY trying to exclude - na/a1.

Most pages on my site will have the following two style sheets:



But some will only have the first one:





So I applied your example to the head section of my main page and came 
up with this:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">


$statename = 'Alaska';
$postcode = 'ak';
$linkcode = 'world/na/us/ak';
$periods = '../../../../';
include ("../../../../includes/state/head.php");

if($pagetoshow == 'withoutna/a1'){
$includena/a1 = FALSE;
}else{
$includeana/a1 = TRUE; //(or false depending)
}
?>



* * * * * * * * * *

And below is all the code from the included page, head.php:

';
}
echo 'Freedomware > "$statename"';
echo '';
echo '';

echo '';
echo '';
if($includena/a1 == TRUE){
echo '';
}
echo '';
?>

I haven't been able to exclude na/a1 yet, but everything in the included 
page was working right up until about the end, when I did something that 
knocked it out of action.

Also, I got a "division by zero" error. Is that something that's caused 
by a mistake I made in writing code? I read a couple articles online 
that suggested it's a problem with Apache.

Finally, is there a way to "validate" php, similar to validating pages 
for html and css?



and if you are echoing a variable, quotes around it arent needed

you can just use
echo $variable;
instead of
echo "$variable";
I got a little confused; did I do it right in the example above?

Thanks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Freedomware
Oops, I spotted some big errors in my included page already. Here's the 
new page:


$todayDate = date("m-d-Y");
echo 'Freedomware > "$statename"';
echo '';
echo '';
echo '';
if($includena/a1 == TRUE){
echo '';
}
echo '';
?>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP Includes and Echoes (Sorry; read this post first!)

2004-01-15 Thread Freedomware
I should have played with this some more before I posted more questions. 
After fixing an error on the included page, I replaced every instance of 
na/a1 on both pages with a1. That seemed to fix everything; the first 
style sheet comes through, but the second one is blocked - and I don't 
see any error messages.

I have a couple more questions, though. First, how do I turn this 
exclude function off on a page where I do NOT want to ban style sheet na/a1?

I tried deleting the following on the main page:

if($pagetoshow == 'withouta1'){
$includea1 = FALSE;
}else{
$includeaa1 = TRUE; //(or false depending)
}
Then I changed TRUE and FALSE in various combinations, but it didn't work.

Next, what am I doing wrong with $statename, in the example below? I 
tried quotes (""), single quotes ('') and no quotes at all.


$todayDate = date("m-d-Y");
echo 'Freedomware > "$statename"';
echo '';
echo '';



BELOW IS THE FINAL VERSION:

Freedomware > "$statename"';
echo '';
echo '<br>
<tt><br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"<a  href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</a>;><br>
<html xmlns="<a  href="http://www.w3.org/1999/xhtml"">http://www.w3.org/1999/xhtml"</a>; xml:lang="en" lang="en"><br>
<head><br>
<?php<br>
$statename = 'Alaska';<br>
$postcode = 'ak';<br>
$linkcode = 'world/na/us/ak';<br>
$periods = '../../../../';<br>
include ("../../../../includes/state/head.php");</tt><br>
<br>
<pre style="margin: 0em;">if($pagetoshow == 'withouta1'){
$includea1 = FALSE;
}else{
$includeaa1 = TRUE; //(or false depending)
}</pre><br>
<pre style="margin: 0em;">?>
</head></pre><br>
<tt></tt><br>
<br>
<tt>INCLUDED PAGE"</tt><br>
<br>
<tt><?php<br>
$todayDate = date("m-d-Y");<br>
echo '<title>Freedomware &gt; "$statename"</title>';<br>
echo '<meta name="description" content="ZXZX versus Microsoft" />';<br>
echo '<script src="' . $periods . 'js/swapclass.js" 
type="text/javascript">';
echo '';
if($includea1 == TRUE){
echo '';
}
echo '';
?>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP Includes and Echoes (Sorry; read this post first!)

2004-01-15 Thread Freedomware
Sheez, I spotted my error regarding "$statename." I changed it to the 
following, and it fixed that problem.


$todayDate = date("m-d-Y");
echo 'Freedomware > ' . $statename . '';
echo '';
echo '';
echo '';
if($includea1 == TRUE){
echo '';
}
echo '';
?>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: PHP Includes and Echoes (From the top...)

2004-01-16 Thread Freedomware
Thanks for all the tips. It's getting generally getting clearer, but I'm 
a little confused somewhere.

Can I give you a better explanation of what I'm trying to do, along with 
my latest code?

The pages on this site focus on various nations and states, with lots of 
links like this:

[LOCAL] ../world/na/us/wy/index.php (World/North America/United 
States/Wyoming)

[REMOTE] www.politix.org/world/na/us/wy/

Each page will feature several prominent instances of the name of a 
country or state, which I can facilitate by using 'MyName', such as the 
title (MyName = Canada, or Wyoming), along with several instances of its 
abbreviation, which is used in several URLs and in the top banner; for 
example, this is the top banner for Alaska: 

Below is the entire head section from the main page. Notice that it's 
mostly a series of variable statements ('MyName', 'MyCountry', etc.), 
followed by an included page (head), which is essentially the REAL head 
section.

I inserted one of the functions you suggested - $includea1 = TRUE; - 
after the include, but I'm sure I did it wrong.

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">


$myname = 'MyName';
$mynickname = 'MyNickname';
$mycontinent = 'North America';
$mycountry = 'United States';
$mystate = 'MyState';
$postcode = 'wy';
$linkcontinent = '/na';
$linkcountry = '/us';
$linkstate = '/wy';
$periods = '../../../../';
$linkwebring = '/world/na/us/wy/';
include ("../../../../includes/head.php");
$includea1 = TRUE;
?>


* * * * * * * * * *

And here's the included page:


$todayDate = date("m-d-Y");
echo 'Freedomware > ' . $statename . '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '<br>
<!--<br>
function MM_openBrWindow(theURL,winName,features) { //v2.0<br>
  window.open(theURL,winName,features);<br>
}<br>
//--><br>
';
echo '';
if ($includea1) echo '';
echo '';
echo '';
echo '';
echo ''
?>

Note that two of my style sheets are named css/a1.css and css/na/a1.css 
(na is short for North America). Maybe I should rename the second a1 to 
avoid confusion, though I'd prefer to tackle it head on and learn how to 
deal with this situation. (Does $includea1 = TRUE; refer to css/a1.css 
or css/na/a1.css?)

So here's what I have at present:

* * * * * * * * * *

The first line denotes style sheet css/a1.css, preceded by ". $periods 
.", which can be replaced by ../../ or ../../../, depending on the 
folder level:

echo '';

* * * * * * * * * *

The second line denotes style sheet css/na/a1.css, preceded by "if 
($includea1)," which I'm probably using incorrectly:

if ($includea1) echo '';

Note, also, that I inserted ". $linkcontinent .", which will be replaced 
by na/ (North America) on this particular main page.

In summary, it looks like I need to fix two things:

MAIN PAGE

$linkwebring = '/world/na/us/wy/';
include ("../../../../includes/head.php");
$includea1 = TRUE;
?>

INCLUDED PAGE

echo '';
if ($includea1) echo '';
echo '';

* * * * * * * * * *

I hope that isn't too confusing. It's actually becoming a lot clearer 
for me; I'm just temporarily confused.

Thanks!

* * * * * * * * * *

I wrote,

>> ? Holy cow, this gets simpler all the time.>>

>> ? But suppose there's a certain page where I don't want the
>> style sheet in
>> ? the middle - the one I named MIDDLE. Is there a way to mark
>> it in the
>> ? include page, then instruct the main page to either not import it or
>> ? replace it with nothing ("")?
On 15 January 2004 22:39, Luke wrote:

>> youd have to use a variable, so in the main page do the following
>>
>> if($pagetoshow == 'withoutmiddle'){
>> $includemiddle = FALSE;
>> }else{
>> $includemiddle = TRUE; //(or false depending)
>> }
Mike Ford wrote,

Euch! Very long-winded and inefficient.  Much better is:

   $includemiddle = $pagetoshow!='withoutmiddle';

>>
>> and in the include do this:
>>
>> if($includemiddle == TRUE){
Likewise -- this can be written more efficiently and more readbly as simply:

   if ($includemiddle)

(Since $includemiddle will be TRUE or FALSE, you can use it directly in the
if () -- retrieving its value and  comparing it against TRUE gives TRUE if
$includemiddle is, er, TRUE, and FALSE if it's FALSE, so doing the
com

[PHP] Using PHP with Style Sheets

2004-01-19 Thread Freedomware
I just learned that you can even use PHP on style sheets. Can anyone 
here tell me how to set it up?

I found a page at http://www.webdeveloper.co.nz/forum/topic/50 that 
apparently cites two different methods. The first is to put a php 
heading at the top of a style sheet, then alter a document so that your 
server will recognize the style sheet as a php page.

But someone else said all you have to do is change the page's extension 
from .css to .php. I tried that, but it didn't work for me.

Are you aware of any good tutorials on using PHP with style sheets?

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Using PHP with Style Sheets

2004-01-19 Thread Freedomware
"Sorry but you haven't really stumbled onto a pot of gold here or
anything."
Hmmm... it sounds like using PHP with style sheets isn't a recommended 
practice.

John Nichel wrote:

If you want PHP to parse your *.css files, you need to tell your 
webserver software to do so.  In Apache

AddType application/x-httpd-php .php .css
But I'd like to give it a try. Thanks for the tips.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Using PHP with Style Sheets

2004-01-19 Thread Freedomware
OK, it looks like there are at least three ways to do this. I now have 
an original style sheet with a .css extension and copies with .php and 
.css.php extensions.

All three style sheets have the following code at the top:


For the original style sheet, I pasted the following text into a 
.htaccess file:


ForceType application/x-httpd-php

I haven't worked with .htaccess files before. I found one in a folder at 
C:/xampp/webdav/, but it sounds to me like this is something that has to 
be uploaded with your website, so I made a new .htaccess file with 
Notepad and pasted it right next to my home page.

I haven't checked to see if PHP is working with any of these strategies 
yet, but my regular styles are still working, with the following caveats:

A few styles were apparently knocked out of commision on the original 
style sheet - the one with the .css extension. Specifically, the appear 
to have lost the font-families assigned to them; they display as plain 
text, rather than Arial. One is on the main page, and the other two are 
on separate PHP includes. I suspect the problem might just be a bug with 
Dreamweaver; my style sheets act up every now and then.

Everything looks fine with the other two style sheets, but they remove 
the color coding from my style sheet, except for the PHP heading at the 
top. That's probably not a really big deal, but it would be nice to 
preserve the color codes.

Now I'll give all three pages a test run, after I think up a PHP 
function to use in them.

Thanks for all the tips!

Brian V Bonini wrote:

Just name you style sheet with a php extension.

site.css.php

and put a Content type header at the top of you style sheet.

header("Content-type: text/css" );

Then call the style sheet in one of the usual methods, link rel or
@import


On Monday, January 19, 2004, at 06:18  PM, Justin wrote:

Add this to your .htaccess file:

ForceType application/x-httpd-php

Add this to the top of your CSS file:

Then you can use it to do all sorts of stuff:

---

body {
background-color: #;
color: #;
}

p {
font-size: 110%;
}

/*etc etc*/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Can this head section, which loads many style sheets, be improved or simplified?

2004-01-19 Thread Freedomware
I now that have a system that works beautifully. I just wondered if it 
could be simplififed or improved even more.

The head section on every page consists of an included page, which I 
appended below. But the most important part is the style sheet section, 
which begins with two or three default style sheets (World, North 
America), followed by several conditional "regional" style sheets (e.g. 
the North, Southwest, Great Plains, etc.) and a few alternate style sheets:

echo '';
if($includenorth == TRUE){
echo '';
}
if($includesw == TRUE){
echo '';
}
echo '';
echo '';

Here's the matching head section from the main page (Alaska, in this case):

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">


$myname = 'Alaska';
$mycode = 'ak';
$mylink = '/ak';
$mynickname = 'Land of the Midnight Sun';
$mycontinent = 'North America';
$mycountry = 'United States';
$mystate = 'Alaska';
$countrycode = 'us';
$linkcontinent = '/na';
$linkcountry = '/us';
$linkstate = '/ak';
$periods = '../../../../';
$linkwebring = '/world/na/us/ak/';
$includenorth = TRUE;
$includesouth = FALSE;
$includesouthwest = FALSE;
[Plus about a dozen more]
include ("../../../../includes/state/head.php");
?>


This same head section appears on pages for the Northwest Territories 
and Yukon Territory, and the style sheet all three are linked to - 
north.css - features styles that modifies page elements (e.g. div#title) 
that have been modified by PHP (e.g. div#titleak, div#titlenwt, 
div#titleyt).

The head section for the Southwest states accepts the southwest style 
sheet and bars the northern style sheet.

As I said, it works great. I just wondered if anyone had any suggestions 
for improving it further. It would be kind of nice if I didn't have to 
paste a string of FALSE statements into the head section of every page...

$includenorth = FALSE;
$includesouth = FALSE;
$includesouthwwest = FALSE;
Below is the entire code. Thanks!




$todayDate = date("m-d-Y");
echo 'Freedomware > ' . $myname . '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '<br>
<!--<br>
function MM_openBrWindow(theURL,winName,features) { //v2.0<br>
  window.open(theURL,winName,features);<br>
}<br>
//--><br>
';
echo '';
if($includea1 == TRUE){
echo '';
}
if($includenorth == TRUE){
echo '';
}
if($includesw == TRUE){
echo '';
}
echo '';
echo '';
?>



http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">


$myname = 'Alaska';
$mycode = 'ak';
$mylink = '/ak';
$mynickname = 'Land of the Midnight Sun';
$mycontinent = 'North America';
$mycountry = 'United States';
$mystate = 'Alaska';
$countrycode = 'us';
$linkcontinent = '/na';
$linkcountry = '/us';
$linkstate = '/ak';
$periods = '../../../../';
$linkwebring = '/world/na/us/ak/';
$includea1 = TRUE;
$includenorth = TRUE;
$includequon = FALSE;
$includemar = FALSE;
$includene = FALSE;
$includemat = FALSE;
$includeapp = FALSE;
$includesouth = FALSE;
$includemw = FALSE;
$includegp = FALSE;
$includetx = FALSE;
$includerm = FALSE;
$includesw = FALSE;
$includeca = FALSE;
$includehi = FALSE;
$includemex = FALSE;
include ("../../../../includes/state/head.php");
?>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] What a difference a / makes!

2004-01-20 Thread Freedomware
I have a relatively trivial problem that's driving me up a wall. I've 
tracked it down to a specific character - / - , and I still can't solve 
it! I think it's a relatively simple problem, though my explanation is a 
bit lengthy.

I'm working on a site with pages for each of the 50 states that uses PHP 
includes and echo statements. The problem seems to derive from one of 
four types off pages:

1. The head section on each main page
2. A single included page that's inserted in each head section
3. another included page (state/top) inserted in each page
4. A series of style sheets specific to state regions (north, south, etc.).
Below is a snippet of code from the page that's included in the head:

echo '';

In the main page, three echo values are used to form links to style sheets:

' . $periods . ' is replaced with ../../../../,
' . $continentcode . ' is replaced by na (for North America)
' . $mycode . ' is replaced by each state's postal code (ak, wa, etc.)
This is an example of a style sheet URL they form:



Below is a copy of a main page's head section, which ends with the include:




Below are the URLs of the head include, the top include I'll mention 
next, an example of a state page (Alaska) and an example of a regional 
style sheet (the North):

http://www.freedomware.us/includes/state/head.php
http://www.freedomware.us/includes/state/top.php
http://www.freedomware.us/world/na/us/ak/
http://www.freedomware.us/css/na/north.css
This is all the code from a top include. Just skim to the the lat few 
lines, where it says "banner":


$todayDate = date("m-d-Y");
echo 'Freedomware > World > ' . 
$mycontinent . '
   > ' . $mycountry . ' > 
' . $myname . '';
echo '
' . $myname . '

  ' . $mynickname . 
'
  
“There are two 
lasting bequests we can give our
  children: One is roots. The other is wings.”
Hodding Carter, 
Jr.
  
  ';
echo '';
echo ''
?>

"banner" is a layer (div) with an invisible spacer image. It is replaced 
by various background images defined by the regional style sheets.

Below is all the text from one regional style sheet, North:

/* CSS: Freedomware > CSS > NA > NORTH (The Far North) */

div#title { color: #009; }
#subak { background: #009; color: #ff0; }
td#tdcenter { background: #fff; }
h1 { background: #009; color: #fff; }
div#banak { background: url(../../../images/banners/na/ak.gif) no-repeat 
50% 0; }
div#bannt { background: url(../../../images/banners/na/nt.gif) no-repeat 
50% 0; }
div#bannu { background: url(../../../images/banners/na/nu.gif) no-repeat 
50% 0; }
div#banyt { background: url(../../images/banners/na/yt.gif) no-repeat 
50% 0; }
.subtitle { color: #009; border-top: 1px solid #009; border-bottom: 1px 
solid #009; }

Notice that this code from the top include:

echo '

id converted from id="ban" + $mycode to id="banak" (Alaska), id="banyt" 
(Yukon Territory), etc.

So here's the problem. The top banners don't show up on some pages 
unless I add the character / to the head section. An example is Alaska, 
which requires a / before "north":

$mycode = 'ak';
$mywebring = '/world/na/us/ak/';
$myregion = '/north';
But the head section for Yukon Territory works the way it's supposed to, 
with no / before north:

$mycode = 'yt';
$mywebring = '/world/na/us/ak/';
$myregion = 'north';
All three states linked to the Pacific Northwest top include won't work 
without the extra / - Washington, Oregon and the province of British 
Columbia, illustrated below:

$mycode = 'bc';
$mywebring = '/world/na/can/bc/';
$myregion = '/pnw';
Another weird example is Idaho, which appears to work as it should 
online, but I can't see the top banner on my local site unless I add the /.

Also, I don't necessarily have to add a / before the continent code; 
I've also fixed it by adding a / to the state postal code ("mycode").

I thought the problem could be traced to this snippet from my head 
include, specifically to the code between continent code and my region - 
'/'.

echo '';

That particular / should be included in every style sheet URL. By adding 
an extra url before "north" in Alaska's head section, my URL should wind 
up with two forward slashes - css/na//ak.css Yet I only see one when I 
view the source code.

Thanks in advance to any tips, as I may be gone for most of the day.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] What a difference a / makes!

2004-01-20 Thread Freedomware
Robert wrote:

I personally use print  " href=\"/css/continentcode/$myregion.css\" rel=\"stylesheet\" 
type=\"text/css\">" for things like that, no having to join the 
information together, the server does the work for me.
Thanks for the tip. (My errands were cancelled, so I'm still here!)

Isn't "print" a function used to make printable web pages? I'm not sure 
how to plug it in. Below is a snippet from my head section include:

if($includea1 == TRUE){
echo '';
}
echo '';

Would I change it to something like this?:

if($includea1 == TRUE){
echo '';
}
""

Someone else suggested that MySQL would be a big help with a project 
like this. I haven't touched that yet, but I'll have to get it connected 
to Dreamweaver and jump in.

Thanks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] How do I regain the ability to create databases (phpMyAdmin)?

2004-01-23 Thread Freedomware
I've finally got both PHP and MySQL up and running, and I've learned how 
to create new users and databases (at least the basics).

But I was told I should add a password to root/localhost, and that's 
been a major pain in the butt. First, it knocked out phpMyAdmin. Then I 
learned how to edit a file (phpMyAdmin.config.inc, or something like 
that), which restored phpMyAdmin. But I next discovered that I can no 
longer create databases.

When I open up phpMyAdmin, near the top of the page is a function for 
creating new databases. It now says "No Privilieges," just under "Create 
New Database."

I tried to retrace my steps in creating a password. I clicked on 
Privileges, then clicked Edit in the root/localhost row.

Then I went down to where it says "Change Password," clicked the 
Password radio button and typed in my password twice. I don't think I 
did anything else.

So why would that knock out my databases? More important, how do I get 
them back?

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How do I regain the ability to create databases

2004-01-23 Thread Freedomware
Martin Luethi wrote:

check if the user you defined in phpMyAdmin/config.inc.php
($cfg['Servers'][$i]['user'] = ???)
has the right to create new databases
(db: mysql / table: user / field: Create_priv='Y')
restart the mysql-server after altering the database mysql
H... I'm a little confused. I don't find that particular code in my 
phpMyAdmin config file. But I suspect I may have done an unorthodox 
maneuver.

If I remember correctly, it instructed me to replace "user" with my user 
name on line 81 (see below) and type in a password on the next line.

* * * * * * * * * *

4.3.0)
$cfg['Servers'][$i]['controluser']   = '';  // MySQL control 
user settings
// (this user must 
have read-only
$cfg['Servers'][$i]['controlpass']   = '';  // access to the 
"mysql/user"
// and "mysql/db"
tables)
$cfg['Servers'][$i]['auth_type'] = 'config';// Authentication 
method (config, http or cookie based)?

[LINE 81] $cfg['Servers'][$i]['user']  = '';  // MySQL user
$cfg['Servers'][$i]['password']  = '';  // MySQL password 
(only needed
// with 'config'

auth_type)
$cfg['Servers'][$i]['only_db']   = '';  // If set to a 
db-name, only

* * * * * * * * * *

HOWEVER, it said the better method was to type in either "http" or (I 
can't remember the second choice offhand). I think I did it on line 133 
(see below.

$cfg['Servers'][$i]['controlpass'] = '';
[LINE 133] $cfg['Servers'][$i]['auth_type']   = 'http';
$cfg['Servers'][$i]['user']= 'root';
* * * * * * * * * *

It sounds like I need to go back and change these two lines:

[LINE 81] $cfg['Servers'][$i]['user']  = '';  // MySQL user
$cfg['Servers'][$i]['password']  = '';  // MySQL password 
(only needed
// with 'config'

inserting my username ("root") between the first = '';
then typing in my password between the next = '';
Then I need to go back and delete http; does that sound right?

I copied the original config file, so I could start from scratch.

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How do I regain the ability to create databases

2004-01-23 Thread Freedomware
Sheez, maybe you fixed it already...

I typed in the username and password, but did NOT delete http on line 
133. I saved the page, but didn't restart MySQL, and it still works - I 
think.

I haven't created a new database yet, but it's inviting me to!

Thanks for the tip.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Importing Text into Database - Can you recommend a tutorial?

2004-01-23 Thread Freedomware
I'm wading through some of the MySQL literature (whew!), but I'm looking 
for the quickest way to create some tables and get them online.

I just downloaded a software program called EMS MySQL Manager, which 
appears to work well with phpMyAdmin and makes some functions even 
easier. Especially useful is a function that imports text from another 
file, such as a spreadsheet.

I haven't been able to finish an import yet, because I'm still learning 
how to make the tables to import it into; all of my tables have errors 
of one kind or another.

I just wondered if anyone on this list is aware of a particularly 
helpful tutorial or strategy for doing this sort of thing - or do you 
just have to wade through all the tutorials and construct your tables, 
one row/column/function at a time? I have a number of spreadsheet 
databases, and I'm just looking for the quickest way to get them into a 
MySQL/PHP database.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Importing Text into Database - Can you recommend a tutorial?

2004-01-23 Thread Freedomware
Jay Blanchard wrote,

"Ooops, sorry. Google for 'import CSV into MySQL' or hit the MySQL web
site"
Humberto Silva wrote:

You can pick the headers from the speadsheets to construct the tables,
export from the spreadsheets to .csv and import it to the new tables
Wow, thanks for the tips. I wasn't even aware of CSV - something that 
will be very useful for me.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Why we love Microsoft (0t)

2004-01-23 Thread Freedomware
Ryan A wrote:

Hey all,
heres something really interesting about that lovely company called
microsoft...(heard of them?)
Anyway, a 17yr old kid by the name of Mike Rowe opens up a webdesigning
company and names
it MikeRoweSoft . . . a couple of days later he gets an email from microsoft's
lawyers to hand over the
domain for 10$...he refuses and says no way, how about 10,000? a couple of
days later he gets
a legal document of around 25 pages from the lawyers!! They are going after
him extortion!!
I have some thoughts about Microsoft. First, I don't go along with the 
argument that Microsoft is just protecting its coypright, tradename, 
etc. Sheez, this is the company that thinks it owns the rights to the 
word WINDOWS. (Let's hope they don't bring out more security flaws 
packaged as software named Doors, Ashtray, etc.) The key word here is 
PARODY. For examples, visit some political sites.

Even if Mike Rowe WAS stepping on Microsoft's toes, so what? Microsoft 
deserves it.

I worked for the Seattle School District for about sixteen years. I was 
horrified by the corruption in the district (which I later discovered 
afflicts Seattle in general) and began speaking out. One day I even 
decided to run for a seat on the Seattle School Board.

I was astounded when I received my first computer virus ever, on the day 
of the election, from a well known affiliate of the Seattle 
Times/Seattle Weekly/Microsoft who said he was sending it to me on 
behalf of Bill Gates Senior! It wiped out all the jpgs on my computer 
and came with the message, "It just goes to show, you can never be too 
careful."

It was especially amazing, because, at that time, I wasn't even a 
Microsoft critic; I was too focused on education issues. But that was a 
powerful piece of evidence to support what I know now: That Bill Gates 
effectively controls the Seattle School District (and everything else in 
 Seattle). Last year, Gates' partner in crime, Paul Allen, bankrolled a 
charter school initiative. This yeare, Gates is the most powerful 
charter school supporter. But these creeps don't give a damn about kids; 
it's just business for them.

Anyway, I heard through the grapevine that Bill Gates wanted to get rid 
of a bunch of teachers, and I wondered what trick they'd come up with 
for accomplishing that deed. They basically exploited the bad economy, 
then claimed they had simply lost more than $30 million dollars, then 
said, "Gee, we're going to have to let some people go."

That's how I lost my job, more than two years ago.

Sending me a computer virus was not a smart thing to do. Most people 
would have been intimidated. But if Gates had done a little research on 
me, he would have discovered that dirty tricks like that only make me 
angrier - and I go for the jugular. Losing my job doesn't make me any 
happier, but screwing children is WAY over the line. As far as I'm 
concerned, it's all war, all the time.

My latest present for Mr. Gates is taking shape at 
http://www.freedomware.us/ And he'll get yet another gift if I decide to 
run for public office again this year - state office this time around.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] "Additional Features for working with linked Tables have been deactivated."

2004-01-23 Thread Freedomware
It looks like all the databases I view with phpMyAdmin feature the 
following error message:

"The additional Features for working with linked Tables have been 
deactivated. To find out why click here."

When I click the link, I get this:

Database mysql  running on localhost
$cfg['Servers'][$i]['pmadb'] ...not OK [ Documentation ]
$cfg['Servers'][$i]['relation'] ... not OK [ Documentation ]
General relation features: Disabled
$cfg['Servers'][$i]['table_info'] ...   not OK [ Documentation ]
Display Features: Disabled
$cfg['Servers'][$i]['table_coords'] ... not OK [ Documentation ]
$cfg['Servers'][$i]['pdf_pages'] ...not OK [ Documentation ]
Creation of PDFs: Disabled
$cfg['Servers'][$i]['column_info'] ...  not OK [ Documentation ]
Displaying Column Comments: Disabled
Bookmarked SQL-query: Disabled
MIME ...not OK [ Documentation ]
$cfg['Servers'][$i]['history'] ...  not OK [ Documentation ]
SQL-history: Disabled
Rather than troubleshoot all seven of these, can you see any evidence of 
a central problem that might be causing it? Or is there some way to work 
around it?

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] How do you set up table columns for numerals?

2004-01-23 Thread Freedomware
I'm having some roblems creating a table with phpMyAdmin. I think 
they're pretty minor problems, mostly relating to numerals.

Would someone be willing to look at my notes at 
http://geowebworks.geobop.org/mysql/3.php - especially the last picture 
- and suggest what I need to do to fix it?

It's also possible the instructions I'm following are flawed, though 
they look pretty sensible. Here's the last error message I got:

#1064 - You have an error in your SQL syntax.  Check the manual that 
corresponds to your MySQL server version for the right syntax to use 
near '(20), `Area` VARCHAR(6), `Area` SMALLINT(8), `HighestAltitude`

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How do you set up table columns for numerals?

2004-01-23 Thread Freedomware
Giz wrote:

I looked at your page.  First off, you should add a primary key column that
has no information in it.  Just make this a number(4) called state_id.
OK, I gave it another try, but I don't see where I type in "4."

When I clicked Save, I got an error message: "This is not a number!" but 
it didn't specify what it was referring to.

I put a screenshot online at http://geowebworks.geobop.org/mysql/3.php - 
the last picture on the page. Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: "Additional Features for working with linked Tables have been deactivated."

2004-01-24 Thread Freedomware
Aidan Lister wrote:

How about checking the phpmyadmin documentation, where this is all clearly
explained?
I thought it made more sense to see if anyone who's been through this 
before knows of a quick fix - before I dive into SEVEN "documentation" 
links, none of which strike me as particularly "clear."

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Importing Data with EMS MySQL Manager

2004-01-24 Thread Freedomware
I'm getting closer. I find that I can work around a lot of problems by 
creating tables in EMS MySQL Manager, which also has a neat feature for 
importing data from CSV files.

Has anyone done this with EMS MysQL Manager before? If so, would you 
mind looking at http://geowebworks.geobop.org/mysql/csv/ and seeing if 
you can see where I went off track?

It looks like I'm probably just doing one or two things wrong now. Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: "Additional Features for working with linked Tables have been deactivated."

2004-01-24 Thread Freedomware
Jason Wong wrote:

 > It makes even more sense to ask on the phpmyadmin list/forum?

I thought this was a general purpose PHP list and some people who 
frequent this list had used phpMyAdmin. My mistake.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Why we love Microsoft (0t)

2004-01-24 Thread Freedomware
Stuart wrote:

As for the argument that he's only 17, what the hell does that matter? 
His motivation was clearly to cash in on either the similarity or the 
publicity from the action MS would take. The lucky fscker got the latter.


Gee, like Microsoft is such a tough sucker to hook. Frankly, I don't 
think a scumbag who abuses the law (not to mention consumers, public 
schools, etc.) as much as Bill Gates does deserves its protection.

* * * * * * * * * *

> Another case of hearing only one side of the story. The following was
> posted in the forums at mikerowesoft.com (now removed, unsurprisingly)...
>
> "I listened to your interview on CBC radio. You said, on live radio,
> that you did choose the domain name because of Microsoft's public
> profile. Then, less than a minute later, you claimed to have been
> surprised that Microsoft was suing you. But, you had admitted everything
> in the first minute of your interview. Then, you went on to say that you
> didn't expect you would be able to keep the domain. This sounds
> suspicious and I think Microsoft has every right to say that  you were
> looking for a pay off at a later date -- not to mention, the publicity."
* * * * * * * * * *

So, he's sort of a modern day Robin Hood, blackmailing the world's 
richest thief...

> His case fell apart the moment he admitted that that was the reason he
> chose that domain name. I see now that he has settled with MS which is a
> shame because I think he should be made an example of. MS are only doing
> this to save their public face.
Huh? Microsoft's public face is as far gone as Michael Jackson's!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] OT, Maybe: Question Re: Apache/Macintosh Platform

2004-01-28 Thread Freedomware
I'm  not sure if we're on the same wavelength, but this might help you.

I recently installed Apache, PHP and MySQL as part of a preconfigured 
package from "Apache Friends" (XAMPP). The entire suite was installed at 
C:/xampp, and the Apache folder is at C:/xampp/apache/

At first, I couldn't find the htdocs folder, until I realized it wasn't 
inside the Apache folder; it's at C:/xampp/htdocs/

I use Dreamweaver, and I store all my websites in this folder: C:/sites/

When I installed XAMPP, typing http://localhost/ into my broswer led me 
to XAMPP's home page. To change it to my sites folder, I went into 
C:/xampp/apache/conf/httpd, and changed DocumentRoot from whatever it 
was (C:/xampp/htdocs, I think) to the following:

DocumentRoot "C:/sites"

However, I'm using Windows XP.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Why are my style sheets all listed on one line?

2004-01-30 Thread Freedomware
I'm still fairly new to PHP, so there may be a simple fix for my 
relatively trivial complaint.

I'm using an included page as a head section. It works fine, except that 
when preview a page and view the source, all the style sheets are 
displayed on one long line, like this:



It looks like they won't scroll across THIS page, so here's a more clear 
example:



What I want is a normal style sheet display, like this:





Do you know what causes this and if there's a fix? I posted some code 
from the head section and main page below.

Thanks!

* * * * * * * * * *

HEAD SECTION (included page; ../../includes/ref/head.php)


$todayDate = date("m-d-Y");
echo 'Freedomware > ' . $myname . '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '<br>
<!--<br>
function MM_openBrWindow(theURL,winName,features) { //v2.0<br>
  window.open(theURL,winName,features);<br>
}<br>
//--><br>
';
echo '';
if($includea1 == TRUE){
echo '';
}
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
?>

* * * * * * * * * *
MAIN PAGE
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">


$myname = 'Alaska';
$mynickname = 'Land of the Midnight Sun';
$mycode = 'ak';
$mywebring = '/world/na/us/ak/';
$myregion = 'north';
$mycountry = 'United States';
$mycontinent = 'North America';
$countrycode = 'us';
$continentcode = 'na';
$periods = '../../';
$tlperiods = '../';
$includea1 = TRUE;
include ("../../includes/ref/head.php");
?>






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Why are my style sheets all listed on one line?

2004-01-30 Thread Freedomware
David Obrien wrote:

You need a \n at the end of each line inside the quote
like
echo "\n";
\n is newline
-Dave


Thanks for the tip. However, I must be doing something wrong. \n didn't 
work, so I searched Google for PHP + "new line" and found a page that 
said you have to use \r\n if you're working on a Windows platform. But 
that doesn't seem to work, either. (If you do use a special new line for 
a Windows computer, then publish your website to a Linux server, will 
that cause problems?)

Do I need to modify the new line code because my echo statements are 
enclosed in single quotes (' '), rather than double quotes (" ")?

I pasted my entire include page code below. Thanks!


$todayDate = date("m-d-Y");
echo 'Freedomware > ' . $myname . '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '<br>
<!--<br>
function MM_openBrWindow(theURL,winName,features) { //v2.0<br>
  window.open(theURL,winName,features);<br>
}<br>
//--><br>
';
echo '';
if($includea1 == TRUE){
echo '';
}
echo '';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '\r\n';
echo '';
?>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Why are my style sheets all listed on one line?

2004-01-30 Thread Freedomware
Got it. It took me a while to home in on the period.

Thanks for the tips!

Pavel Jartsev wrote:

"newline"-character should be inside double quotes ("\n").

For example:

instead of:

echo '\r\n';

use:

echo ''."\n";



Hope that helps. :)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP Style Switchers - Recommendations?

2004-01-30 Thread Freedomware
I've been using JavaScript style switchers combined with "alternate 
style sheets," allowing users to control the appearance of my web pages.

However, I recently read that you can make style switchers with PHP - 
which are allegedly superior to JavaScript style sheets. Then I found a 
PHP style switcher at 
http://www.contrastsweb.com/switcher/v2/example.php that has an added 
advantage; you can apparently choose several style sheets independently 
of one another. For example, you can change the background color, then 
change the font.

I'm working on some complex tables that I'd like to control with such a 
multi-style switcher. Suppose I have five style sheets, named One, Two, 
Thtee, Four and Five. I'd like to set it up so that a visitor can view 
the page with any one of these style sheets, or with a combination 
thereof, such as One, Three and Four or Four and Five.

At any rate, I couldn't get the PHP style switcher above to work. (See, 
also, http://www.contrastsweb.com/switcher/v2/)

I just wondered if anyone on this list has worked with PHP style 
switchers and can recommend other tutorials or different strategies.

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Why are my style sheets all listed on one line?

2004-01-30 Thread Freedomware
Wow, thanks for the tips. That makes life a lot simpler!

Mike Ford wrote:

Another way you could go, as this is mostly HTML with some PHP values thrown
in, is to write it as such -- then all your newlines are present exactly as
they appear.  This would look something like:
By the way, the test

  if($includea1 == TRUE)

should be written as just

  if($includea1)

It has exactly the same outcome, but is both more readable (if you've named
your variables suitably) and more efficient (since you've saved the
redundant comparison operation).
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: More info on MikeRoweSoft.com...

2004-01-31 Thread Freedomware
Alex King wrote:

(on MikeRoweSoft.com)...

In case you didn't know, Mike isn't an only child. He has a brother and a
sister, and his brother's name is Mac. Mac is 24, but when he was 19, he
started a media consulting company. Guess who he recieved a letter from.
Actually, Macromedia was very nice about it.
Really, Mike should have known that Microsoft wouldn't be as nice as
Macromedia, but lets just hope that his little sister, Mika, is smarter.
Alex King


So do you think he'll name his son PHP?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Is there a PHP Style Sheet Switcher that doesn't reload pages?

2004-02-04 Thread Freedomware
I have a JavaScript style sheet switcher that works quite nicely, but I 
want to make a MULTI-style switcher; one that lets you switch various 
items independently of one another.

It sounds like it can be done with either PHP or JavaScript, each with 
its own advantages. The biggest disadvantage with PHP is that switching 
styles reloads teh page.

Does anyone know if there's a PHP method that does NOT involve reloading 
the page?

Here are a couple key articles I've checked out:

http://www.antipixel.com/blog/archives/2002/11/07/a_couple_of_changes.html
http://www.mcu.org.uk/sizeswitch.php
Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Is there a PHP Style Sheet Switcher that doesn't reload

2004-02-04 Thread Freedomware
Hm... I haven't found Kumar's style sheet switcher post yet, but if 
you say it can't be done, I'll take your word for it.

Thanks for the tip.

Raditha Dissanayake wrote:
Hi,

This is explained in Kumar's mail which was sent out a little while ago. 
If you didn't see it an older version is archived here:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg128334.html

but in short it can't be done.

Does anyone know if there's a PHP method that does NOT involve 
reloading the page?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP/MySQL Tables - CSS and Sortable Columns (Newbie Questions)

2004-02-06 Thread Freedomware
I posted three questions at 
http://geowebworks.geobop.org/test/php/notes.php, if anyone is willing 
to take a look.

You could reply on this list or via the e-mail address on the URL above.

Thanks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Question About Date Function in PHP/MySQL

2004-02-08 Thread Freedomware
I'm using PHP to display a MySQL table. I've got everything working fine 
except the date function.

I designated the first two fields VARCHAR. Those columns display just 
fine when I preview my web page, as do all the other columns except the 
third. I designated that one DATE. (The field name is "Birthday.")

When I view my data in phpMyAdmin, all I see in that column is NULL. 
When I preview it in a webpage, nothing displays at all. If I change it 
to NOT NULL, I see -00-00 in every cell.

Here's a row of text from the CSV file I imported into my MySQL table:

"Alberta","Edmonton","1905-09-01",11,"NWT","AB","CAN"

As you can see, the date is listed as "1905-09-01."

I've altered my MySQL table every way I can think of, and nothing works. 
The MySQL Manual doesn't shed any light on it. So I'm wondering if 
there's something wrong with my PHP code.

Below's the source code from my web page. Do you see anything that would 
cause the third column - echo $myrow["Birthday"]; - to malfunction, 
while everything else works fine?

Thanks.

";
echo"NameCapitalBirthdayRankOriginCodeNation";
while($myrow = mysql_fetch_array($result))
{
echo "";
echo $myrow["Name"];
echo "";
echo $myrow["Capital"];
echo "";
echo $myrow["Birthday"];
echo "";
echo $myrow["Rank"];
echo "";
echo $myrow["Origin"];
echo "";
echo $myrow["Code"];
echo "";
echo $myrow["Bigcode"];
echo "";
}
echo "";
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Question About Date Function in PHP/MySQL

2004-02-08 Thread Freedomware
John W. Holmes wrote:

Freedomware wrote:

When I view my data in phpMyAdmin, all I see in that column is NULL. 
When I preview it in a webpage, nothing displays at all. If I change 
it to NOT NULL, I see -00-00 in every cell.

Here's a row of text from the CSV file I imported into my MySQL table:

"Alberta","Edmonton","1905-09-01",11,"NWT","AB","CAN"

As you can see, the date is listed as "1905-09-01."


Well, that's the right format for a MySQL date; -MM-DD, so I don't 
know why it wouldn't load from your CSV file. Can you show the command 
that you use to import the file? If the fields are NULL (or -00-00) 
in the database, then MySQL is not accepting your data (for the date 
field at least).
Wow, I think you solved it! I went to retrieve the link to the screen 
shots I put online when I was first trying to figure this stuff out - at 
http://geowebworks.geobop.org/test/php/

Towards the bottom of the page (#6) is a screen shot of something I was 
oblivious to this time around - Date and Time Formats. (I'm using a 
trial version of EMS MySQL Manager.)

I'll bet that's my problem, though I'm still a bit confused.

EMS lists the following:

Short Date: M/d/
Long Date: ,  dd, 
Day followed by month, followed by another day, then year???

I thought it was supposed to be year first, followed by month and day, 
as in the example from CSV table - 1905-09-01.

Should I change Long Date so that it reads -MM-DD, or something like 
that? Or maybe I can figure out how to do it in phpMyAdmin. I downloaded 
EMS phpMySQL because I couldn't create error-free tables with 
phpMyAdmin, but maybe I can use it to tweak my tables.

Thanks for the tip!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Question About Date Function in PHP/MySQL

2004-02-08 Thread Freedomware
John W. Holmes wrote:
Freedomware wrote:

EMS lists the following:

Short Date: M/d/
Long Date: ,  dd, 
Day followed by month, followed by another day, then year???


That format means something like "Friday, May 5, 2004"

I thought it was supposed to be year first, followed by month and day, 
as in the example from CSV table - 1905-09-01.

Should I change Long Date so that it reads -MM-DD, or something 
like that? 


Yeah, I'd try switching possibly both the long and short dates to 
-MM-DD and see if it's imported correctly.

OK, I'll add that to my experiments to do list. In the meantime, I 
imported all the dates as VARCHAR, then went into phpMyAdmin and changed 
it to DATE. It seems to work!

Thanks again for the tips.

Oh, one other thing... Do you know if dates can be sorted in various 
ways, either by absolute date or by month alone, date alone, etc.? I'm 
going to be making sortable columns (JavaScript or PHP), and I'm not yet 
sure what all you can do with dates.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] phpMyAdmin Problems

2004-02-10 Thread Freedomware
I've been using both phpMyAdmin and EMS MySQL Manager to work with MySQL 
tables and PHP. Things are generally going OK, but I'm still ironing out 
a few kinks. I suspect some of my problems might be related to an error 
message I get when I click on a Database in phpMyAdmin:

"Error: The additional Features for working with linked Tables have been 
deactivated. To find out why click here."

When I click the link, I get a page that lists six different problems, 
each linked to a pretty complex solution in the phpMyAdmin Manual. Does 
anyone here know if there's an easier solution? Would fixing one or two 
key problems automatically fix the others? Can you download files that 
have already been "fixed," add your username and password and paste them 
into the proper folders?

I put a couple screenshots that illustrate what I described online at
http://geowebworks.geobop.org/test/phpmyadmin/index.php
Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] phpMyAdmin Problems

2004-02-11 Thread Freedomware
John Taylor-Johnston wrote:

Helpful, isn't he. If you can't find it in your config file, post again and I'll show 
you what i have in mine.
John
Jason Wong wrote:

This has nothing to do with PHP. Please ask on the relevant list/forum.
Thanks. Actually, I have another question: Can someone recommend a 
relevant list/forum? I visited phpmyadmin.net and finally found their 
help forum (listed under "Feedback"), but it's temporarily out of 
commission. The relevant newsgroup appears to be out of action, too.

In the meantime, I posted my question on a general web design forum and 
was told to not worry about it because "you probably won't need those 
functions anyway." If true, then I won't complain; saves a lot of time.

I did fix the DATE problem I referenced in the URL I provided. It was 
just a matter of changing it to NOT NULL, though my table still isn't 
working properly.

I'm not sure what the "it" I'm supposed to find in my config file is, 
but I'd love to see what you have in yours! :) You could either post it 
here or e-mail me at [EMAIL PROTECTED]

I've been thinking it might be kind of cool to start a new website that 
features nothing but properly tweaked scripts that people can check out 
- the infamous Apache conf file, PHP config, etc. Most are probably 
available somewhere or other, but bringing them together under one roof 
could be a big help.

Thanks again.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] phpMyAdmin Problems

2004-02-11 Thread Freedomware
Jason Wong wrote:

On Wednesday 11 February 2004 16:42, John Taylor-Johnston wrote:


Helpful, isn't he. If you can't find it in your config file, post again and
I'll show you what i have in mine. John


It's hardly helpful asking your tailor about a problem with your leaky roof is 
it?
It is if my landlord's married to a tailor! :)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP on Apache 2.0.48

2004-02-15 Thread Freedomware
Xmg wrote:

"I know that use of PHP with Apache 2.x.x is discouraged."

Wow, thanks for the tip. I'm using Apache 2 and have had no problems, 
but I've only done very basic things with MySQL and PHP so far. I hope I 
don't have to switch to Apache 1.3 when I get in a little deeper!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php