Re: [PHP] Linux PHP editor

2002-08-09 Thread Mark Gallagher

JJ Harrison\ wrote:
> I just switched over to Red Hat Linux from Win2k...
> 
> Only to find my fav editor only works on windows systems...
> 
> could someone suggest a good replacement?

Vim.  It's even got syntax highlighting:
<http://www.vim.org/>


-- 
Mark Gallagher
Desperately attempting - and failing - to stay on topic since 1999
fuddleriffic - http://cyberfuddle.com/
blog - http://cyberfuddle.com/infinitebabble/


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




Re: [PHP] Re: Not php related - php.net logo in Netscape 7?

2002-06-08 Thread Mark Gallagher

Timothy J. Luoma wrote:
> Oh, I forgot to mention that it is a different way of indicating
> that a favicon to be used, which is found in the HEAD of the HTML
> document.
> 
>  
> 
> This works in browsers other than IE, but I don't think that IE
> supports this

See <http://www.favicon.com/> for some good information on favicons.


-- 
Mark Gallagher
http://cyberfuddle.com/infinitebabble/



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




Re: [PHP] forcing file downloads

2002-06-12 Thread Mark Gallagher

Justin French wrote:


 > 1. Is this a widely accepted practice for forcing downloads (a pop-up 
window
> to download a file), given the problems with older versions of IE?

I believe so.

Sad, really :o).  Y'see, what you're doing is forcing your own 
preferences on the user (usually against their will) which is a Bad 
Thing.  Also, what are you going to do if the user's got a way of 
handling the MIME-type that you didn't expect?  They could be trying to 
open up "force/downloads" in their text editor, but *want* to have the 
file in question (say, a .pdf) open up somewhere else.

Okay, so I spend too much time involved in web design, where the f-word 
is considered rude.

> 2. Can someone tell me what the %20 is there for?

You can try typing http://www.foo.net/bar/of soap/he he he/ and it may 
work in some browsers.  The %20 (I forget the exact explanation, sorry) 
is basically code for the space.  All browsers understand 
http://www.foo.net/bar/of%20soap/he%20he%20he/

HTH


-- 
Mark Gallagher




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




[PHP] Re: beginner in PHP

2002-06-12 Thread Mark Gallagher

Phillip Perry writes: 

> Can someone tell me why this doesn't work?
> The $mycart array is fine and the $catalog array is also fine but nothing
> inside the if statement prints. I've tried other echo statements but nothing
> prints at all. 
> 
> while (list($key,$value) = each($mycart))
>   {
>if ($value == $catalog[itemcd])
>   { 
> 
>   echo $catalog[unitprice];

Try: 

 echo "$catalog[unitprice];" 

If that doesn't work, then check your if statement - what is the value of 
$value and $catalog[itemcd]? 

-- 
Mark Gallagher
http://cyberfuddle.com/infinitebabble/ 


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




Re: [PHP] MySQL Query Help!!!!

2002-06-14 Thread Mark Gallagher

Chris Kay wrote:
>>The query does not error out it just does not give any records, and I
> 
> Know
> 
> What part of "The query does not error out" do you not understand.
> 
> Why are there so many people willing to say what is wrong with a code but when it 
>comes to
> A solution that go silent.
> 
> I find that the ones most often to find flaws in someones code, are the ones who 
>never provide
> Answers.

I've been on this list for a few months (IIRC), but I don't post much. 
That's because I never provide Answers (being a newbie, and therefore 
not knowing them).

I'm on the list because I want to learn about PHP, and I've found it 
easier in the years I've been online to subscribe to mailing lists or 
(once upon a time) USENET newsgroups and just read the various solutions 
to peoples' problems.

"Where's all this going?", you impatiently ask, perhaps stamping your 
foot.  Well, pause for a second, gentle reader, for you are about to be 
shocked to your very core.

Well, maybe not.  Here goes anyway: I've learnt a lot about PHP simply 
from reading the answers provided by the more intelligent, knowledgeable 
and helpful members of this list.  Guess who's helped the most?

A young (?) man by the unusual name of "John Holmes".

Before you chew people out, Mr Kay, about being perpetually unhelpful, 
you may like to lurk on a list for a while and see if you're actually 
within a stones throw of the truth, or really just spouting off out of 
your own sense of hurt pride.


HTH, HAND!

-- 
Mark Gallagher
http://cyberfuddle.com/infinitebabble/





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




Re: [PHP] Seperating presentation from logic

2002-06-26 Thread Mark Gallagher

John Holmes wrote:
>>Wouldn't you ultimately be better off moving most of this sort of
> 
> thing
> 
>>into style sheets and then have the designers play with the style
> 
> sheets
> 
>>instead?
> 
> Sure, if all they are doing is playing with fonts, colors, sizes, etc...
> 
> What if your designer wants to change from a two column table to a four
> column table. Or change the menu from a vertical column on the left to a
> horizontal row on the bottom that's run by images instead of text. 

Theoretically this could still be done only with editing of the 
stylesheet.  Of course, it's not that simple - Mozilla comes closest to 
decent browser support for that sort of radical change, and even it's 
not there yet.

> Do you trust your designer to do all that and not mess up any of your
> PHP code that's thrown in with the HTML? That's why you use templates...

Actually, I think the idea behind what the previous poster was saying is 
that:
a) with stylesheets they don't need to touch the HTML once they've 
finished with it (and handed it over to you for PHP work)
b) you therefore won't need templates



-- 
Mark Gallagher
http://cyberfuddle.com/infinitebabble/






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




Re: [PHP] ?????????????????????????

2002-07-10 Thread Mark Gallagher

Rodolfo Gonzalez wrote:
> To the kind moderator of the list: please kick off this guy (Erik
> Hegreberg <[EMAIL PROTECTED]> ), he's really annoying. Or at least bounce
> his e-mails back to him ;) ).

Go for the bounce option ;-)


-- 
Mark gallagher



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




Re: [PHP] RE: ############

2002-07-10 Thread Mark Gallagher

Rick Emery wrote:
> lets all spam Erik

No, not spam (unless you define "spam" as what everyone else is doing - 
sending receipts).

Send reply receipts all you want ($deity knows I am ), and setting 
something up to bounce his messages back to him'd be great, but in both 
cases he "asked" for them - he specifically requested the receipts, and 
he's been spamming the list so it's only fair he receives the bounces.

But if we resort to our own, separate spamming campaign we're as bad as him.


-- 
Mark Gallagher



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




Re: [PHP] ?????????????????????????????????

2002-07-10 Thread Mark Gallagher

Lazor, Ed wrote:
> I wonder if he's using PHP to automate sending the messages. hehe

And in the blink of an eye we're back on topic :o)


-- 
Mark Gallagher




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




Re: [PHP] ??????????????????????????????????????????????????????````````````````````ØØØØØØØØØØ

2002-07-10 Thread Mark Gallagher

Ben Ramsey wrote:
> I've just joined this mailing list this afternoon.  Does this kind of thing
> happen often?  If so, I'm going to leave the list.

I've been on the list for about two months, and it's the first time 
*I've* seen it happen.  Usually the real morons stick to newsgroups :-).

The list really can be a valuable resource (I don't know much PHP, so I 
don't contribute often - but I read a lot of it), so I'd urge you not to 
unsubscribe.  Or, if you do unsubscribe, to wait out until Erik is 
likely to have finally worked out how to leave, then re-subscribe.

If you can't bring yourself to do this, then at least get into contact 
with Richard Lynch and John Holmes (if they're willing) - they seem to 
be the most helpful and knowledgeable contributors :o).


HTH, HAND

-- 
Mark Gallagher
http://cyberfuddle.com/infinitebabble/



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




Re: [PHP] Using index.php instead of index.html

2002-07-16 Thread Mark Gallagher

Sailom wrote:

>   I am a novice on PHP and web programming.  Can any one suggest me if I can
> use index.php in place of index.html?  I really need to concern about

Sure you can!

If you're using an Apache webserver, create a file named .htaccess 
containing the following:

DirectoryIndex index.php index.html
Redirect index.html http://www.bar.net/index.php

The first line says "the directory index file is index.php, not 
index.html".  The second line says "whenever you get a request for 
index.html, send them index.php instead".

> security issue too.

Umm... *what*?



-- 
Mark Gallagher
http://cyberfuddle.com/infinitebabble/



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




Re: [PHP] Question for Linux users...

2002-04-23 Thread Mark Gallagher

Jason Soza wrote:
> Don't want to start a war or anything, so e-mail me your responses 
> offlist if necessary, but I'd like to know what Linux distro you like 
> best and why.

Wouldn't you rather ask a less inflammatory question - like "which is 
better?  Emacs or vi[0]?" :o)



> Anyhow, I've used both Mandrake and Slackware distros, but am now 
> leaning toward Debian or SuSe. If you have other suggestions or 
> whatever, please share. Remember, NO HOLY WARS! Offlist is okay if you 
> think your comments might spark something. :)

Don't go for Mandrake.  Sure, it's a lot easier to use than the others, 
but... *shudder*.

I'm using Redhat currently, but just as a desktop computer (with 
theoretical links to my home network).  My site's host, though, uses 
Redhat on her servers IIRC, and has no problems.

Apparently Debian and SuSe are extremely good.



[0] Stupid question, anyway - everyone knows it's vi (well, Vim)


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




Re: [PHP] passing authorization code

2002-04-26 Thread Mark Gallagher



wm wrote:

> .htaccess file requires user and pass.
> 
> anybody know how to pass this info with a script so that the user is
> allowed into the directory? not in the url either. not
> user:[EMAIL PROTECTED]
> 
> needs to be transparent.
> 
> the reason i want to do this is so that somebody can't path directly to
> a .mov file, but so they can click on a link and a script can "fetch"
> the file from the protected directory by passing the user and pass.  the
> file needs to be
> embedded in the web page.

You could try saving a cookie?




-- 
Mark Gallagher


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




[PHP] passing variables to scripts

2002-04-28 Thread Mark Gallagher

(yes, newbie - but I *have* tried everything I know, I swear)

I'm trying to write a "comments" system for my site (because I think I 
can).  Basically, the script receives the ID of a particular entry (the 
site is a blog) via "?entry_id=".  It checks to see if there's 
a corresponding text file (.txt) and if so, it prints the 
contents of the text file and invites the user to input a comment.  If 
not, it prints "no comments" and invites the user... yadda yadda.

Now, unless I'm mistaken, passing the arguments are done like so: 
http://www.foo.com/comments.php?entry_id=test
Right?

Unfortunately, it doesn't work.  That is to say, everything about the 
script works, except recognition of the $entry_id variable.  Something 
as simple as: comments for entry "" returns "comments for entry "".

Saving the text file's URL to a variable:
http://www.foo.com/$entry_id; .txt;
?>

Doesn't work either.

I had a semi-hunch (brought on by my own inexperience, no doubt) that 
maybe I had to start a session or something on the referring page. Tried 
that (session_start();), didn't have any effect.  Bah.

Can anyone point out what I'm doing wrong?

TIA

-- 
Mark Gallagher


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




Re: [PHP] Tellwhich browser

2002-05-15 Thread Mark Gallagher

Diana Castillo wrote:
 > What is the code to tell whether the user is on IE or Netscape?

It's slightly more complicated than that (I'm a newbie too, but I know a
very little about user-agent strings), but it *will* involve using
http://www.php.net/manual/en/function.get-browser.php

As you may be aware, IE's user-agent string was originally designed to
look as similar to Netscape's as possible to avoid the idiots who block
non-Netscape users[0], but there are some differences.

Usually checking for "MSIE" in the string is enough.  Here's a sample IE 
string:

   Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 2.0)

This tells us it's IE6, running on Windows '98, and the user has Hotbar 
installed.

And here's a sample Netscape Navigator 4:

   Mozilla/4.5 [en] (Win98; I)

This tells us it's Navigator 4.5, looking for english pages, running on 
Windows '98.  Anyone who tells me what the "I" stands for wins 3 cool 
points.

Of course, sometimes browsers (like Konqueror, or Opera) are set up to 
spoof IE or Netscape, for the same reason IE was given the "Mozilla/4.0" 
string in the first place.  In the case of Konqueror, the entire 
UA-string is configurable by the user, but for Opera, the browser's name 
is always included somewhere.  Here's one for Opera:

   Mozilla/4.0 (compatible; MSIE 5.0; Linux 2.4.2-2 i686) Opera 5.0  [en]

This tells us it's Opera 5, looking for english pages, running on Linux 
(kernel 2.4.2, Intel), and pretending to be IE5.

It's easy to work out what a browser's user-agent string is.  What's 
/not/ easy is telling a computer to work out what *browser* it is.

You can just do a simple search for "MSIE" in the string, which will 
prevent you from blocking out spoofers[1] from your script and give you 
less accuracy, but would also provide relatively little work and 
successfully separate Netscape from IE-and-spoofers :o).

One thing to remember: there's more than just Netscape out there. 
There's Mozilla, there's Opera, there's Dillo, there's Lynx, there's 
Links, there's Konqueror, there may even be a few poor fools stuck on 
Mosaic or Cello.  And what if someone has no browser, and just uses wget 
and their favourite text viewer?



[0] Oh, the irony!  Look at what clueless "designers" are doing to block
 non-IE users today :o)
[1] But then, I doubt you'd want to do that anyway... right?

-- 
Mark Gallagher
http://cyberfuddle.com/infinitebabble/



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