Re: [PHP] .vcf files and PHP Email Form(Newbie)

2002-05-11 Thread webmaster
I don't have much experiance with MIME. where could I find a tutorial or ready made class? - Original Message - From: "Miguel Cruz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, May 12, 2002 4:41 PM Subject: Re: [PHP] .vcf files and PHP Email Form(Newbi

RE: [PHP] Variable Prob

2002-05-11 Thread Jason Soza
Thanks for the debugging tip... Seems that the 'else' statement wasn't being called at all, so for some reason $last_name was evaluating to true even though there's a NULL entry for that record/field. I used a different query, where a person with a NULL last_name showed up first, and the 'else' st

Re: [PHP] Variable Prob

2002-05-11 Thread Miguel Cruz
It would seem the only way this could happen is if $last_name evaluates to true. Two suggestions: 1) Make some extra change in one of the printf statements so you can see which one is really being called. 2) If that doesn't illuminate anything, show a little more code. miguel On Sat, 11 May

[PHP] Variable Prob

2002-05-11 Thread Jason Soza
Argh! I hate it when one little annoying thing starts up right when I think I have the coding finished! I have the following code: if($last_name) { printf("%s %s's%s%s\n",$first_name,$last_name,$year,$color); } else { printf("%s's%s%s\n",$first_name,$year,$color);

Re: [PHP] .vcf files and PHP Email Form(Newbie)

2002-05-11 Thread Miguel Cruz
Use any of about 10 billion available MIME mail classes/functions (or write your own; there's really nothing to it) and attach the vcard as content-type: text/x-vcard. miguel On Sun, 12 May 2002 [EMAIL PROTECTED] wrote: > I want to create an e-mail form that writes a (person's name).vcf(vCard)

[PHP] .vcf files and PHP Email Form(Newbie)

2002-05-11 Thread webmaster
I want to create an e-mail form that writes a (person's name).vcf(vCard) file and attaches it to the message. This would allow me to eaisly add people to my address book. The source of a sample .vcf(vCard) file is shown below: BEGIN:VCARD VERSION:2.1 N:Harrison;JJ FN:Harrison, JJ ORG:TecEco Pty.

Re: [PHP] Printing line "x" in a file

2002-05-11 Thread Austin Gonyou
On Sun, 2002-05-12 at 00:10, Miguel Cruz wrote: > On Sat, 11 May 2002, Andrew Conner wrote: > > I have a script where I need to get the text from line number > "$line" in > > file "$filename" then save it to a var ($text) and then print it. > For > > example, in the file lamb.txt (just an example

[PHP] [FYI] DNS resolver library

2002-05-11 Thread Moriyoshi Koizumi
Hello, I wrote a DNS resolver library in pure PHP script. The library can be run both on windows and on *nix variants. (I have not tested on BeOS) The package contains a wrapper library that provides almost the same functionality of getmxrr() and checkdnsrr(), so if you would like to run PHP scr

Re: [PHP] Printing line "x" in a file

2002-05-11 Thread Miguel Cruz
On Sat, 11 May 2002, Andrew Conner wrote: > I have a script where I need to get the text from line number "$line" in > file "$filename" then save it to a var ($text) and then print it. For > example, in the file lamb.txt (just an example file): > "Mary was > a little lamb, whose > fleece > was as

Re: [PHP] Send html email

2002-05-11 Thread Miguel Cruz
On Sat, 11 May 2002, Alex Shi wrote: > Thanks for all of you who answered my question. But another of > my stupid question is: what is RTFM? RTFM == Read The Flurking Manual miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] setcookie()

2002-05-11 Thread Miguel Cruz
On Sat, 11 May 2002, jtjohnston wrote: > This is a bug "Feature/Change Request" I made to: > http://bugs.php.net/bug.php?id=17158 > > setcookie() states "cookies must be sent before any other headers > are sent (this is a restriction of cookies, not PHP). > > I argue this is a restriction of PHP

RE: [PHP] Serialize/URLencode query...

2002-05-11 Thread Glenn Sieb
At 12:11 AM 5/12/2002 -0700, John Holmes posted the following... >You should use sessions. All you have to do is call session_start() at >the beginning of your code. Then, any variable you want to save to the >session, you simply use: That did the trick! Thanks for the explanation, John! Now I ha

[PHP] Re: Yahoo/Cobalt servers/PHP

2002-05-11 Thread Austin Marshall
Todd Cary wrote: > One of my clients signed up for service at Yahoo for space on a Cobalt server. > The specs say that it has Php and Interbase. I go to the server and do a > phpinfo() and find out that Interbase is not compiled into PHP but MySQL is. > Then I find out that MySQL is *not* install

RE: [PHP] Yahoo/Cobalt servers/PHP

2002-05-11 Thread John Holmes
> Am I missing something here? If one wants to have dynamic pages and uses > PHP, > then *some* DB has to be available, correct? Ideally, yes, you'd want a database. But you could do it with text files... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

RE: [PHP] Serialize/URLencode query...

2002-05-11 Thread John Holmes
You should use sessions. All you have to do is call session_start() at the beginning of your code. Then, any variable you want to save to the session, you simply use: $_SESSION["name"] = $name; Then, on the next page, call session_start() again, and you'll have the value of $name from the previo

[PHP] Yahoo/Cobalt servers/PHP

2002-05-11 Thread Todd Cary
One of my clients signed up for service at Yahoo for space on a Cobalt server. The specs say that it has Php and Interbase. I go to the server and do a phpinfo() and find out that Interbase is not compiled into PHP but MySQL is. Then I find out that MySQL is *not* installed on the server. Am I m

[PHP] Serialize/URLencode query...

2002-05-11 Thread Glenn Sieb
I'd like to pass a bunch of variables to another PHP page for processing there... I think serialize() and urlencode() will do what I'm looking for.. can I pass multiple strings through this? I'm also not clear on how I can decode the separate strings out... Can someone point me in the right di

Re: [PHP] Authentication with register_globals OFF

2002-05-11 Thread Mike
Thanks, Stuart. I'll admit I don't "fully" I understand register_globals. Beyond that, I am sure I am not clear on the value of NOT using register_globals. I am wading through the docs constantly. Haven't quite finished. Regardless, thanks for the assist. Mike - Original Message -

Re: [PHP] Authentication with register_globals OFF

2002-05-11 Thread Stuart Dallas
On Sat, 11 May 2002 21:21:27 -0400, you wrote: >Trying to get accustomed to PHP 4.2.0 and PHP's preference for >register_globals off, I have register_globals off. > >However, when I try to use $PHP_AUTH_USER and $PHP_AUTH_PW, my script fails >(attempting to validate username and password credectia

[PHP] Printing line "x" in a file

2002-05-11 Thread Andrew Conner
I have a script where I need to get the text from line number "$line" in file "$filename" then save it to a var ($text) and then print it. For example, in the file lamb.txt (just an example file): "Mary was a little lamb, whose fleece was as white as snow." I need to get line number 3 ("fleece") a

[PHP] Authentication with register_globals OFF

2002-05-11 Thread Mike P
OK, this is an "authentication with PHP newbie" question... Env: WinNT 4.0, SP6a PHP 4.2.0 Apache 2.0.36 MySQL 4.0.1 Development/sandbox Trying to get accustomed to PHP 4.2.0 and PHP's preference for register_globals off, I have register_globals off. However, when I try to use $PHP_AUTH_USER an

Re: [PHP] Send html email

2002-05-11 Thread Alex Shi
Thanks for all of you who answered my question. But another of my stupid question is: what is RTFM? Alex "Michael Geier" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > While I understand the necessity in not answering every question that a newbie > may post,

[PHP] preg_grep Help (Regular expresion)

2002-05-11 Thread Brian C. Doyle
Hello all, I have a file that has ip address in it.. I need to pull those ip addresses out. Currently I am trying: $ips=preg_grep("/^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/",$file); print_r(array_values ($ips)); And well i am getting nothing! Anyone? -- PHP General Mailing List (http://ww

Re: [PHP] Send html email

2002-05-11 Thread Michael Geier
While I understand the necessity in not answering every question that a newbie may post, a more pleasant approach would have been: "the following is documented at http://www.php.net/manual/en/function.mail.php"; or "see the Content-Type: header for instructions on how to do this". Do you th

Re: [PHP] Send html email

2002-05-11 Thread Liam MacKenzie
RTFM http://www.php.net/manual/en/function.mail.php - Original Message - From: "Alex Shi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, May 12, 2002 10:00 AM Subject: [PHP] Send html email Hi! How can I send a html email with just the build-in function mail()? Is this r

Re: [PHP] Send html email

2002-05-11 Thread Nookie
On Sunday 12 May 2002 02:00, Alex Shi wrote: > Hi! > > How can I send a html email with just the build-in function mail()? > Is this required to put some infomation in "header" field? Thanks > in advance! > > Alex mail("[EMAIL PROTECTED]",$subject,$content,"Content-type: text/html"); Greeitngs,

[PHP] Send html email

2002-05-11 Thread Alex Shi
Hi! How can I send a html email with just the build-in function mail()? Is this required to put some infomation in "header" field? Thanks in advance! Alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] read all files in directory

2002-05-11 Thread Lars Torben Wilson
On Sat, 2002-05-11 at 15:52, olinux wrote: > $dirPath = "C:\somepath"; > $dhandle = opendir($dirPath); > > while ($filename = readdir($dhandle)) { This will bail on the first directory entry which has a name which evaluates to false. Try it after 'touch 0' in the directory you're scanningth

RE: [PHP] MySQL and RH 7.2

2002-05-11 Thread David Freeman
> I tried "locate" and "find" and both come up empty for mysqladmin. > Am I missing something stupid here? How did you install it? Did you build from source or use rpm's? If you installed from rpm's which ones did you install? From memory there's about four rpm's that you'll need to have ev

Re: [PHP] read all files in directory

2002-05-11 Thread olinux
$dirPath = "C:\somepath"; $dhandle = opendir($dirPath); while ($filename = readdir($dhandle)) { echo $filename . ""; }// end read filenames --- Andreas Indahl <[EMAIL PROTECTED]> wrote: > Hi! > > How can I read all files in a directory, when I > don't know which files are > there? > > Sin

Re: [PHP] read all files in directory

2002-05-11 Thread Lars Torben Wilson
On Sat, 2002-05-11 at 15:39, Andreas Indahl wrote: > Hi! > > How can I read all files in a directory, when I don't know which files are > there? > > Sincerely > Andreas Indahl Try some of the examples from the manual: http://www.php.net/manual/en/function.opendir.php http://www.php.net/manua

Re: [PHP] Best way for date/time

2002-05-11 Thread olinux
Have a look at ADDDATE() and SUBDATE() mysql> SELECT DATE_ADD("1997-12-31 23:59:59", -> INTERVAL 1 DAY); -> 1998-01-01 23:59:59 DATE_FORMAT(date,format) will also be very helpful to use in your queries, allowing you to return your mysql date in a human friendly forma

Re: [PHP] read all files in directory

2002-05-11 Thread Stuart Dallas
On Sun, 12 May 2002 00:39:21 +0200, you wrote: >How can I read all files in a directory, when I don't know which files are >there? http://www.php.net/manual/en/class.dir.php -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] read all files in directory

2002-05-11 Thread Rasmus Lerdorf
See http://php.net/readdir for a full example. On Sun, 12 May 2002, Andreas Indahl wrote: > Hi! > > How can I read all files in a directory, when I don't know which files are > there? > > Sincerely > Andreas Indahl > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, vis

[PHP] read all files in directory

2002-05-11 Thread Andreas Indahl
Hi! How can I read all files in a directory, when I don't know which files are there? Sincerely Andreas Indahl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP can't access txt files (but TCL can..??)

2002-05-11 Thread Phil Powell
Swell, I found the error, and it was a STUPID one.. I misconfigured fread()! Thanx though Phil TCL 1, PHP 2 - Original Message - From: "Lars Torben Wilson" <[EMAIL PROTECTED]> To: "Phil Powell" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, May 11, 2002 6:13 PM Subject: Re:

[PHP] PHP can't access txt files (but TCL can..??)

2002-05-11 Thread Phil Powell
TCL 1, PHP 0 Ok, I am frustrated.. here is my code and this portion has to be done in PHP. I have a frame that can only be accessed if 1 of 2 things occur: 1) if $HTTP_REFERER has a specific value 2) if your nickname passed in the query string is found in the existing nicknames.txt file found i

Re: [PHP] PHP can't access txt files (but TCL can..??)

2002-05-11 Thread Lars Torben Wilson
On Sat, 2002-05-11 at 14:53, Phil Powell wrote: > TCL 1, PHP 0 > > Ok, I am frustrated.. here is my code and this portion has to be done in > PHP. I have a frame that can only be accessed if 1 of 2 things occur: > > 1) if $HTTP_REFERER has a specific value > 2) if your nickname passed in the qu

Re: [PHP] Using function in PHP script n DOCROOT in PHP script in subfolder

2002-05-11 Thread Phil Powell
Found a MUCH MUCH simpler solution that works across the board.. change $HTTP_HOST to $DOCUMENT_ROOT and it works! Phil "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Phil: > > On Fri, May 10, 2002 at 08:01:46PM -0400, Phil Powell wrote

[PHP] Re: an sql_layer

2002-05-11 Thread Austin Marshall
Http://Www.Promoozz.Org wrote: > i'm sweating on this one : > > function sql_fetch_row($res, $nr) > { > global $dbtype; > switch ($dbtype) { > > case "MySQL": > $row

[PHP] RE:[PHP]PHP Hosting....

2002-05-11 Thread r
Hey Tim, I'm using 321go.biz for my hosting needs. Not a single problem so far and around 30-90 minutes for each support question to be solved which i think is pretty good. They are slightly expensive though but i joined for the Java part, got PHP free! Now that i'm into PHP I see they also offer

Re: [PHP] PHP 5??

2002-05-11 Thread Rasmus Lerdorf
He has no clue. There is no PHP 5. The next version will be 4.2.1 next week and probably 4.3 after that. -Rasmus On Sat, 11 May 2002, Tim Thorburn wrote: > Hi, > > In my seemingly never ending search for a decent hosting company, I've > contacted some customer service people from Verio who te

[PHP] PHP 5??

2002-05-11 Thread Tim Thorburn
Hi, In my seemingly never ending search for a decent hosting company, I've contacted some customer service people from Verio who tell me a very interesting story ... they're currently upgrading their PHP to version 5 ... which I find odd as there's only mention of 4.2.0 on php.net ... So my q

[PHP] PHP Hosting ...

2002-05-11 Thread Tim Thorburn
Hi, I've about had it with my current hosting company as they've turned off SSH for the past month due to "security reasons" which means I can no longer add/remove tables from my MySQL database. Looking at two other hosting companies - SBC Webhosting - www.webhosting.com and Verio - www.verio

[PHP] an sql_layer

2002-05-11 Thread http://www.promoozz.org [*]
i'm sweating on this one : function sql_fetch_row($res, $nr) { global $dbtype; switch ($dbtype) { case "MySQL": $row = mysql_fetch_row($res); return $row;

RE: [PHP] setcookie()

2002-05-11 Thread Mark Charette
You've just pointed out that you're a clueless newbie, that's' all, and can't read a spec worth a whit. -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 11, 2002 4:50 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] setcookie() Rasmus server-side / client-si

Re: [PHP] setcookie()

2002-05-11 Thread Rasmus Lerdorf
And you can do so if you turn on output buffering. Having PHP send off JavaScript to do this is a massive hack that has no place in PHP. Write your own setcookie wrapper function if that is what you want. -Rasmus On Sat, 11 May 2002, jtjohnston wrote: > Rasmus > server-side / client-side, tha

Re: [PHP] setcookie()

2002-05-11 Thread jtjohnston
If the issue has pissed you off in tha past, complain. Vote: http://bugs.php.net/bug.php?id=17158 > Rasmus > server-side / client-side, that's not the point. > > My point is PHP can, could and should be able to set a cookie after HTML is > set. > But of course, Jan has already closed the issue,

Re: [PHP] setcookie()

2002-05-11 Thread jtjohnston
Rasmus server-side / client-side, that's not the point. My point is PHP can, could and should be able to set a cookie after HTML is set. But of course, Jan has already closed the issue, as usual. http://bugs.php.net/bug.php?id=17158 > PHP is a server-side language and as such it deals with se

Re: [PHP] setcookie()

2002-05-11 Thread Rasmus Lerdorf
PHP is a server-side language and as such it deals with server-side issues. If you want to write javascript that sets a client-side Javascript cookie, go ahead. It has nothing to do with PHP and PHP will certainly not get in your way. -Rasmus On Sat, 11 May 2002, jtjohnston wrote: > This is a

[PHP] setcookie()

2002-05-11 Thread jtjohnston
This is a bug "Feature/Change Request" I made to: http://bugs.php.net/bug.php?id=17158 setcookie() states "cookies must be sent before any other headers are sent (this is a restriction of cookies, not PHP). I argue this is a restriction of PHP, not cookies. Here is my proof: http://www.college

RE: [PHP] Search Engine With Boolean Support <--Please help

2002-05-11 Thread SpamSucks86
I don't want to use a module though. I just want to take what a person types and parse it so I can put it into a mysql query and search my database of data. I share the server and I can't get mnoGoSearch compiled in with PHP, so unless there's PHP code I can borrow from it, I don't think it will h

[PHP] Re: Nitpicking - PHP 4.2.0 for windows says version is 4.1.2

2002-05-11 Thread Steve Magruder, D2 Director
Make sure that any PHP DLL's in your system32 directory are updated. If they were updated to the newest versions, then what you describe is definitely a big problem, not a nit. -- Steve (www.stevemagruder.com) "Garth Dahlstrom" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAI

RE: [PHP] Newbie needs compile

2002-05-11 Thread hassan
hi you can also use http://www.webcron.org At 13:29 06/05/02, John Holmes wrote: > > > He did say he did /not/ want to invoke it from a browser :) > > I didn't think that PHP could run w/o one though, so my idea was to >use a > > text browser, have it run the script, then exit out. As I said, I

RE: [PHP] MySQL and RH 7.2

2002-05-11 Thread Mark Charette
"find" is your friend ... Go to the install directory and type find mysqladmin -Original Message- From: Todd Cary [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 11, 2002 2:44 PM To: [EMAIL PROTECTED] Subject: [PHP] MySQL and RH 7.2 I am completely new to MySQL and I just installed it

Re: [PHP] MySQL and RH 7.2

2002-05-11 Thread Todd Cary
I tried "locate" and "find" and both come up empty for mysqladmin. Am I missing something stupid here? Todd -- Todd Cary Ariste Software 2200 D Street Extension Petaluma, CA 94952 707-773-4523 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://

Re: [PHP] MySQL and RH 7.2

2002-05-11 Thread Jason Wong
On Sunday 12 May 2002 02:44, Todd Cary wrote: > I am completely new to MySQL and I just installed it on my RH 7.2 server > and I cannot determine where the MySQL admin program is located so that I > can set my password. > > Sorry for the basic question... mysqladmin For further help please g

[PHP] MySQL and RH 7.2

2002-05-11 Thread Todd Cary
I am completely new to MySQL and I just installed it on my RH 7.2 server and I cannot determine where the MySQL admin program is located so that I can set my password. Sorry for the basic question... Todd -- Todd Cary Ariste Software 2200 D Street Extension Petaluma, CA 94952 707-773-4523 [

Re: [PHP] Remote Hosting: Trouble shooting

2002-05-11 Thread Miguel Cruz
This probably isn't the cause of any of your troubles, but your From: header is malformatted; there should be a space after the colon. miguel On Sat, 11 May 2002, David J Jackson wrote: > Let's see if I can keep this short and simple. > I'm having to problems with a hosting service. > 1. inde

Re: [PHP] changing language on fly

2002-05-11 Thread Miguel Cruz
You might want to use the format: http://www.body-builders.org/index.php.en?links=1 http://www.body-builders.org/index.php.ru?links=1 so that you can take advantage of Apache's mod_mime features, and not have to do so much complicated guesswork to determine when you are displaying in an

Re: [PHP] Search Engine With Boolean Support <--Please help

2002-05-11 Thread Miguel Cruz
On Sat, 11 May 2002, SpamSucks86 wrote: > I need to have an internal search engine for my site. It needs to > support Boolean (not, or, and). Are there any fairly simple scripts out > there that will help me with this? Even if it's just to give me an idea > of where to start. I'm using mySQL, and

Re: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Jason Wong
On Sunday 12 May 2002 01:38, Thomas Edison Jr. wrote: > WOOO.. i did not know this was possible : > file_exists("mjpalpics/$img1_name") > > And this might actually solve the whole issue!! Let me > try this.. You might find is_file() to be a 'more reliable' indicator because file_exists() works f

Re: [PHP] Remote Hosting: Trouble shooting

2002-05-11 Thread David Jackson
Jason -- In actual fact the hosting company in question is used by a friend of mine, but not my me :) And I agree he needs to "draw a line in the sand", I mean the guy uses them for 2 sites and his ISP?! It's time to say fix it by Monday at 08:00 or I'm canceling my accounts, but that's just me

Re: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Thomas Edison Jr.
Hmm.. You gave me a lot to think about, and a whole lot of work to do. I definately love your idea and logic, and yes, it would make everyone happy. well i guess by the time i figure the coding and process out, i'll keep in mind to arrange for your British Airways Gift Certificate too. Glory! T

RE: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Thomas Edison Jr.
WOOO.. i did not know this was possible : file_exists("mjpalpics/$img1_name") And this might actually solve the whole issue!! Let me try this.. Thanks a BUNCH! T. Edison Jr. --- John Holmes <[EMAIL PROTECTED]> wrote: > > > copy("$img1", "mjpalpics/$img1_name") or Die > ("Could > > > not do");

Re: [PHP] Remote Hosting: Trouble shooting

2002-05-11 Thread Jason Wong
On Sunday 12 May 2002 00:12, David J Jackson wrote: > Let's see if I can keep this short and simple. > I'm having to problems with a hosting service. > 1. index.php isn't being read as default index. > 2. Form aren't working (see a below mail_call.php). > 2A.The mail_call.php works on my localbox

Re: [PHP] Remote Hosting: Trouble shooting

2002-05-11 Thread Dennis Moore
If it is a unix/linux box use the .htaccess file and define the settings yourself.Please this file in the document root for your site... Assuming the system will allow you to do so... /dkm - Original Message - From: "David J Jackson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent:

RE: [PHP] using header ();

2002-05-11 Thread Miguel Cruz
On Sat, 11 May 2002, baldey_uk wrote: > Basically im trying to update details in a database, after the new details > are put into a form they are printed to the screen with a 'are the details > correct' scenario. From there if they click 'no' i want them to be put back > to the updateaddress.php p

[PHP] I just wanted to thank everyone.. :) (Kinda long...)

2002-05-11 Thread Glenn Sieb
Hey everyone! After some futzing about, and using techniques you guys all helped out with, I now have a nice, portable, fully-commented-for-future-maintenance script for doing *all* of my SQL queries to our MSSQL server, and outputting a nice, easy-to-read table. I only have to change one comm

Re: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Miguel Cruz
On Sat, 11 May 2002, Thomas Edison Jr. wrote: > If i have a filename "room.jpg" in my Upload > Directory, and someone else comes and uploads a file > by the same name, the previous "room.jpg" is > overwritten by the new one. Any suggestions? In the long run, I think the best plan is to name your

Re: [PHP] protecting downloads with php

2002-05-11 Thread Miguel Cruz
On Sat, 11 May 2002, Nick Wilson wrote: > Does anyone know of somewhere that lists content-type's? Apache comes with a file in conf/mime.types that lists a lot of standard ones. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] protecting downloads with php

2002-05-11 Thread Miguel Cruz
If you don't tell anyone what the secret path is, it's as good as a password. miguel On Sat, 11 May 2002, John Holmes wrote: > Store your files outside of the webroot if you use this method. Then > they can't type in the address directly (otherwise this doesn't fix > anything). > > ---John Ho

Re: [PHP] protecting downloads with php

2002-05-11 Thread Steve Overall
Nick Wilson wrote: > Does anyone know of somewhere that lists content-type's? > > Many thanks :-) > - -- > Nick Wilson // www.explodingnet.com > See http://www.ietf.org/rfc/rfc2183.txt for handling file types in headers. Also see the PHP manual http://www.php.net/manual/en/function.heade

[PHP] changing language on fly

2002-05-11 Thread Yura
I'm looking for possibility to change language of my site on fly you may take a look at http://body-builders.org and see yourself - now when I press language button I can get to the main page in sertain language but what I want it to do is if I'm for example at 'Links' page and click on langua

Re: [PHP] protecting downloads with php

2002-05-11 Thread Steve Overall
Nick: As John H. suggested earlier, storing files outside ("above") the webroot makes those files inaccessible directly from the user's browser-- a good thing-- in which case the script serves as a gateway to these files-- also a good thing. I have a similar need. Here's one way to do it in tw

Re: [PHP] Newbie question to everybody....PHP

2002-05-11 Thread Olexandr Vynnychenko
Hello r, Sunday, May 12, 2002, 4:25:37 AM, you wrote: r> Greetings people, r> Special greetings to all of you who have helped me in the past. r> As most of you know i am a newbie, I learned a bit of PHP via webmonkey and r> a few other places, seeing the power of PHP i decided to convert from J

[PHP] Remote Hosting: Trouble shooting

2002-05-11 Thread David J Jackson
Let's see if I can keep this short and simple. I'm having to problems with a hosting service. 1. index.php isn't being read as default index. 2. Form aren't working (see a below mail_call.php). 2A.The mail_call.php works on my localbox (apache-2.0.36 +PHP4.2.0) 2B. Hosting company,for reason they

[PHP] To all who replied to :Newbie question to everybody...PHP

2002-05-11 Thread r
Hey Guys, I thank each and everyone one of you who replied, yeah, i got flamed a couple of times from some of you for the "sleep" bit but need i remind you that i am a newbie? Hey, dont get me wrong i thank you too even though you flamed me, coz you read the post and replied to me. As for the peop

Re: [PHP] Problme with PHPMyAdmin.

2002-05-11 Thread Rasmus Lerdorf
Apache2+PHP has a number of issues. At this point it is only suitable for testing purposes. I suggest using Apache 1.3.x if you want a stable working server. -Rasmus On Sat, 11 May 2002, vins wrote: > My phpMyAdmin keeps caching it'self. > > How do i disable it. > > I'm using apache 2 and php

[PHP] variables attached to url

2002-05-11 Thread jyrgen
a few weeks ago there was a discussion about how to get variables attached to a url like http://server.com/script.php?var1=value1&var2=val ue2&var3=value3 the easiest way to do this is possibly: $vars = explode("&", $argv[0]); parse_str($vars); with these two lines you will have the variable

[PHP] Re: Newbie question to everybody....PHP

2002-05-11 Thread Austin Marshall
R wrote: > Greetings people, > Special greetings to all of you who have helped me in the past. > > As most of you know i am a newbie, I learned a bit of PHP via webmonkey and > a few other places, seeing the power of PHP i decided to convert from Java > servlets and JSP (JSP coz its expensive to

RE: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread John Holmes
> > copy("$img1", "mjpalpics/$img1_name") or Die ("Could > > not do"); > > > > Sends the images to the mjpalpics Directory! > Possibly. But one thing that is definitely a problem is: > > if(file_exists($img1_name)) { > $img1_name = "n"+$img1_name; > } > > should be: > > if(file_exists

RE: [PHP] Best way for date/time

2002-05-11 Thread John Holmes
> Okay so I've then got > > 2002-05-08 > and whats then the best way to manipulate it regarding > plus 3 days or plus 4 weeks ? I definitely agree to use the MySQL format for your dates. It makes it easier to use the built in functions. You can convert the timestamp to a unix style if you have t

[PHP] PhpMyAdmin

2002-05-11 Thread Michigan Connect, LLC
I am using the latest phpMyAdmin and MySQL 2.23.37. I have installed and compiled it on a Sun Cobalt RAQ4r. I need to have it set up so that customers with different websites cannot see or work on other cutomers DB's, but each virtual site has its one phpMyAdmin So each user needs to have his

RE: [PHP] Newbie question to everybody....PHP

2002-05-11 Thread John Holmes
> 1)How many of you have seriously dug into arrays and has it been important > in your programming? > 1.1)Do you think you could have done the same thing you did with arrays > WITHOUT arrays? > (The reason i ask this is theres a whole chapter dedicated to arrays in > the > book & its pretty frustr

RE: [PHP] Cookies

2002-05-11 Thread John Holmes
Set a cookie, redirect to same page, and see if cookie is sent to you. ---John Holmes... > -Original Message- > From: Nookie [mailto:[EMAIL PROTECTED]] > Sent: Saturday, May 11, 2002 4:21 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Cookies > > Hi. > > Is there any way to check is it co

RE: [PHP] protecting downloads with php

2002-05-11 Thread John Holmes
Store your files outside of the webroot if you use this method. Then they can't type in the address directly (otherwise this doesn't fix anything). ---John Holmes... > -Original Message- > From: Miguel Cruz [mailto:[EMAIL PROTECTED]] > Sent: Saturday, May 11, 2002 2:23 AM > To: PHP-Gene

RE: [PHP] protecting downloads with php

2002-05-11 Thread John Holmes
Either store your files in the database (I hate saying that), or use .htaccess to protect the directory. ---John Holmes... > -Original Message- > From: Nick Wilson [mailto:[EMAIL PROTECTED]] > Sent: Saturday, May 11, 2002 1:59 AM > To: php-general > Subject: [PHP] protecting downloads wi

Re: [PHP] Newbie question to everybody....PHP

2002-05-11 Thread Rasmus Lerdorf
I have never really understood why people have problems with arrays. Just think of an array as a table of values. A one-dimensional array would be a table with a single column and each row has a number (or index) assigned to it: +---++ | 0 | Apple | +---++ | 1 | Orange

RE: [PHP] Any difference between these 2 forms of syntax?

2002-05-11 Thread John Holmes
> I am wondering if there is any tangible difference between the following > two > commands: > > $x = $foo["status"]; > $x = $foo['status']; The only difference to any strings enclosed in ' or " is that strings enclosed in " may have variables embedded within them. Strings enclosed with ' will n

RE: [PHP] setcookie() in 4.2.0

2002-05-11 Thread Matthew Walker
Yes. Output buffering is good. Some people will say that you shouldn't use it, but should make sure to write all your code so that there can't be any output before any headers need to be sent. I disagree with this. While a good idea in principle, in practice it is all but impossible to keep going

RE: [PHP] Best way for date/time

2002-05-11 Thread David Freeman
> Okay so I've then got > > 2002-05-08 > and whats then the best way to manipulate it regarding > plus 3 days or plus 4 weeks ? Do it in your sql query - check out the date manipulation stuff in the sql manual - it's quite comprehensive and tells you what you need to know. CYA, Dave -

[PHP] ::::: PHPMYADMIN ERRORS-REFRESH. PHP4 or Apache 2?? :::::::

2002-05-11 Thread vins
My phpmyadmin scripts doesn't want to refresh. what could be the problem -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Search Engine With Boolean Support <--Please help

2002-05-11 Thread SpamSucks86
I need to have an internal search engine for my site. It needs to support Boolean (not, or, and). Are there any fairly simple scripts out there that will help me with this? Even if it's just to give me an idea of where to start. I'm using mySQL, and Boolean support isn't implemented until v4.0. Th

RE: [PHP] Newbie question to everybody....PHP

2002-05-11 Thread Matthew Walker
1. I have dug deeper into arrays than I care to remember. 2. Absolutely not. 3. See http://www.php.net/sleep and http://www.php.net/usleep Glad to hear you're converting to PHP! It's an amazing language, and I don't see it going away any time in the near future. Hope you have fun, and be sure t

Re: [PHP] Email updates

2002-05-11 Thread Rasmus Lerdorf
Have a look at procmail (http://www.procmail.org/) -Rasmus On Sat, 11 May 2002, Randum Ian wrote: > Hi all, > > I want to be able to allow certain people the ability to email news directly > onto a page using the address [[EMAIL PROTECTED]] but only if they are > verified on a db. Please can so

Re: [PHP] Email updates

2002-05-11 Thread Bogdan Stancescu
You can use Mr. Lemos' suggestion, or go with an alias instead. You can check out an example of setting this up by downloading http://sourceforge.net/projects/outreach/ (the full version) - read "INSTALL.email" and check out opt/include/mail_retrieve.pl. Then check out opt/include/email.php to

Re: [PHP] Newbie question to everybody....PHP

2002-05-11 Thread Bogdan Stancescu
Hi! 1. I believe every serious programmer out there uses arrays on a regular basis... 1.1. ...exactly because there are so many problems virtually unsolvable without them. Take for instance the case of a product page where people would fill in ordering quantitites. My recommendation would be

Re: [PHP] Newbie question to everybody....PHP

2002-05-11 Thread Neil Highley
Why would you want a scripting language to sleep, there is no such thing as a loop in a web page (yes, I know it would be possible, but it would lock up a users machine). I know you can set up the apache daemon to run on-demand to conserver resources, but I think you are getting mixed up between

[PHP] Re: Email updates

2002-05-11 Thread Manuel Lemos
Hello, On 05/11/2002 10:20 AM, Randum Ian wrote: > Hi all, > > I want to be able to allow certain people the ability to email news directly > onto a page using the address [[EMAIL PROTECTED]] but only if they are > verified on a db. Please can someone explain what I need to do or where I > need

  1   2   >