Re: [PHP] php in css not working with IF's

2001-10-03 Thread David Robley
On Thu, 4 Oct 2001 16:04, Jason Dulberg wrote: > Should I stick with > > if (($site_style!="10") && ($site_style!="9") && ($site_style!="8")) > > or > > if($site_style != ('10' or '9' or '8')) As has been pointed out, that latter won't work. What is the range of possible values for $site_style?

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Jason Dulberg
Should I stick with if (($site_style!="10") && ($site_style!="9") && ($site_style!="8")) or if($site_style != ('10' or '9' or '8')) So here's what I've gathered from the various messages and my current methods: - index.php selects $site_style from the db - header.php is included by index.php

Re: [PHP] file maniputation??

2001-10-03 Thread Mukul Sabharwal
Hi, It looks most certainly like a file permission error, however if you have concurrent users maybe it's over riding the file contents, and screwing up something somewhere. So use flock(), a tutorial : http://www.paphe.com/php/tutorials/111000.php = * Know

Re: [PHP] file reading and textarea problem

2001-10-03 Thread Mukul Sabharwal
Hi, fopen let's you read the whole file. Try this tutorials on files for a more hands on approach : http://www.paphe.com/php/tutorials/111000.php = * Know more about me: http://www.geocities.com/mimodit * _

Re: [PHP] php in css not working with IF's

2001-10-03 Thread Naintara Jain
Maybe you can try simplifying your logic. Why don't you avoid nested IFs till later, and keep to simple IFs. If you want to check for $site_style not equal to 10 and also not equal to 9 then you can say ($site_style != 10 && $site_style != 9) or even !($site_style == 10 || $site_style == 9

[PHP] venn diagram producer

2001-10-03 Thread Jack Dempsey
think before you code...something i'm quickly learning isn't such a bad mantra so before i and others jump into this, maxim, rasmus, and anyone else following this thread/interested in it, i agree that scoping the script to a max of 3 terms is a necessary choice...any other comments/thoughts o

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Rasmus Lerdorf
> Ok. Wll show you with an example: > > if (($site_style!=="10") && ($site_style!=="9") && ($site_style!=="8")) > { } > > elseif ($site_style=="10") { > } > > > Should simply be > > if($site_style != ('10' or '9' or '8')) {} Stop confusing the lad. That obviously won't work. -Rasmus -- PHP

Re: [PHP] php in css not working with IF's

2001-10-03 Thread David Robley
On Thu, 4 Oct 2001 15:25, Maxim Maletsky \(PHPBeginner.com\) wrote: > Jason, are not a dope > > As mentioned to you by Rasmus: > just move those !== off the script replacing them with != > > > That is what causes your error. > > > Maxim Maletsky > www.PHPBeginner.com No, that was Rasmus telling

[PHP] Re: passing object variable from page to page. Please disregard the previous!

2001-10-03 Thread _lallous
you can always pass objects if you serialize them in the first page and then unserialize them back in the 2nd page. check serialize() "Ming-Chieh Lee" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > > I have a question on how to pass object variable

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Ok. Wll show you with an example: if (($site_style!=="10") && ($site_style!=="9") && ($site_style!=="8")) { } elseif ($site_style=="10") { } Should simply be if($site_style != ('10' or '9' or '8')) {} Bla bla bla Maxim Maletsky www.PHPBeginner.com -Original Message- From: Max

Re: [PHP] Add $String to $Num ???

2001-10-03 Thread Alexander Skwar
So sprach »[EMAIL PROTECTED]« am 2001-10-03 um 21:28:03 -0400 : > String1(or 2,3,4,5 etc whatever the value of $Num is)|s:9:"10,47,552"; Try: session_register(${$string . $num}); And read up on variable variables in the manual. And maybe forget this idea and use arrays instead... Alexander Sk

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Jason, are not a dope As mentioned to you by Rasmus: just move those !== off the script replacing them with != That is what causes your error. Maxim Maletsky www.PHPBeginner.com -Original Message- From: Jason Dulberg [mailto:[EMAIL PROTECTED]] Sent: giovedì 4 ottobre 2001 7.43 To

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Jack Dempsey
have you thought about a switch statement? haven't looked at your code, but that would allow you a default, and then a bunch of cases, etc... jack -Original Message- From: Jason Dulberg [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 1:43 AM To: Rasmus Lerdorf Cc: [EMAIL PROT

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Jason Dulberg
Thanks for sticking with me here and for your examples!! So basically, I need to use AND instead of OR. if (($site_style!=="10") && ($site_style!=="9") && ($site_style!=="8")) { } elseif ($site_style=="10") { } hrm... it didn't work. Sorry for being such a dope about this :( Jason > O

RE: [PHP] A powerful editor!

2001-10-03 Thread Chris Bailey
I personally use Visual SlickEdit as my primary editor for almost any coding work. But, it's commercial. Having said that, in light of this being a PHP list, another one to throw out there is Active State's Komodo (which doesn't run on the Mac, so stick with BBEdit there - which is a superb choi

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Wonderful! Update as all on your start so we can contribute! P.S: and happy birthday! Real-life story: my ex manager asked me once: "Dude, I heard you're leaving office at 2am, are you also coding on your birthdays and Christmas?" Maxim Maletsky www.PHPBeginner.com -Original Message-

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Jack Dempsey
i'll start it...will be fun and i've got some coldfusion proponents i'd love to show it to...a little swamped with work though, and monday's my 21st, so i don't think i'll be doing much coding, but hey, its opensource, you do a lil, i do a lil, it'll be done in no time... jack -Original Mess

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Do you want to do it? PHPBeginner.com and many other PHP sites would greatly appreciate it, Rasmus. Though, NOT and XOR are often unknown to beginners, I noticed it in their codes. Anyway, it is a great idea, I think. I see so many neo programmers confusing with it. Lots of PHP developers are c

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Rasmus Lerdorf
Would make a nice little PHP-GD exercise for someone to build a PHP app that took a boolean logical expression and produced a Venn diagram. Maybe limit it to 3 or less terms to not make your brain explode. -Rasmus On Thu, 4 Oct 2001, Maxim Maletsky (PHPBeginner.com) wrote: > Thanks Rasmus. > >

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Thanks Rasmus. The link you provided will become a great resource for PHPBeginner.com Cheers! Maxim Maletsky www.PHPBeginner.com -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: giovedi 4 ottobre 2001 6.58 To: Jason Dulberg Cc: [EMAIL PROTECTED] Subject: RE: [

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Jack Dempsey
nice to know demorgan's laws actually show up every now and then ;-) -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 12:58 AM To: Jason Dulberg Cc: [EMAIL PROTECTED] Subject: RE: [PHP] php in css not working with IF's > Theoretically,

Re: [PHP] A powerful editor!

2001-10-03 Thread Michael A. Peters
I personally like BBEdit 6.1 the best. 'course, since bbedit don't run on Linux, I end up using NEdit and vim quite a bit as well... On Tue, 2 Oct 2001 13:57:23 -0700 "Dean Householder" <[EMAIL PROTECTED]> wrote: > I used to use TextPad until I found EditPlus. I'm also amazed by it's > power.

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Rasmus Lerdorf
> Theoretically, either/or I'm assuming. If A isn't 10 or A isn't 9... But since A cannot be both 9 and 10 at the same time, A will *always* not be one of them. It's exactly the same as saying: if (!(A==9 AND A==10)) Obviously A cannot be both 9 and 10 at the same time so the above will be:

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Without following your logic I can give an example of how style sheets on PHPBeginner.com work: In the page we have And in the styles.php we have all the possible DB connections, browser checks by (PHP SNIFF) and so and so on. You cold even try to call the class this way with Get: That

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Jason Dulberg
Theoretically, either/or I'm assuming. If A isn't 10 or A isn't 9... So I'm assumuming that my IF's are way off base? This is definitely something that'll be helpful for my other work as well. Thanks __ Jason Dulberg Extreme MTB http://extreme.nas.net > -Original Message--

Re: [PHP] php in css not working with IF's

2001-10-03 Thread Rasmus Lerdorf
> Any other problems aside, this is not how you do 'Not Equal'. > > $site_style!="10" > > is correct syntax. No, !== is quite valid. It is the non-equality version of === See http://www.php.net/manual/en/language.operators.comparison.php -Rasmus -- PHP General Mailing List (http://www.php

RE: [PHP] php in css not working with IF's

2001-10-03 Thread Jason Dulberg
Thank you for your response. I changed my the code to the method that you suggested. Unfortunately, it still doesn't use the IF's properly. For instance, if I open a $site_style 10, the IF statement for that is the following: elseif (($BROWSER_PLATFORM == "Win") && ($site_style=="10")) {

Re: [PHP] php in css not working with IF's

2001-10-03 Thread Rasmus Lerdorf
> if (($BROWSER_PLATFORM == "Win") && (($site_style!=="10") || > ($site_style!=="9"))) { Common logic mistake. if ( A != 10 or A != 9 ) Which value of A would make that logic false? -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For add

Re: [PHP] Unable to get a dot-decimal ip address from a decimal ip address

2001-10-03 Thread David Robley
On Thu, 4 Oct 2001 13:10, [EMAIL PROTECTED] wrote: > Hi, > > decbin() is unable to handle decimal numers greater than 2147483647 and > it's a problem. That's in the docs, ok. The situation is: I have a list > of IPs in decimal format (ex: 3232235524) and I wanted to translate > them into dot deci

[PHP] Re: A powerful editor!

2001-10-03 Thread Garth Dahlstrom
I've been using HTML-Kit for about 3 year, it does highlighting for a boat load of languages, supports scriptable plug-ins, remote file editing, preview mode (using embbedded IE), and context senstive help feature that will go pull up the php.net manual page for php functions (and the Netscape o

Re: [PHP] php in css not working with IF's

2001-10-03 Thread David Robley
On Thu, 4 Oct 2001 13:49, Jason Dulberg wrote: > I have a common css file that is being used across several virtual > hosts. Basically, what I am trying to do is use the same css file even > though several text colors/sizes need to be changed depending on what > site/platform its being used on. >

RE: RE: [PHP] write to multiple sql tables

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
You can't do it through PHP. ';' - won't work Maxim Maletsky www.PHPBeginner.com -Original Message- From: Frank M. Kromann [mailto:[EMAIL PROTECTED]] Sent: giovedì 4 ottobre 2001 6.24 To: Maxim Maletsky (PHPBeginner.com) Cc: 'sc'; [EMAIL PROTECTED] Subject: Re: RE: [PHP] write to mult

[PHP] Error: Unable to open *\index.php in Unknown on line 0

2001-10-03 Thread Garth Dahlstrom
On a *nix based system this type of error is caused by the file permissions being wrong (like -rw- that is only the owner can read the file, usually its set to -rw-r--r-- so group and world can read the file too) I don't know about IIS but you might investigate wheither or not your everyone

Re: RE: [PHP] write to multiple sql tables

2001-10-03 Thread Frank M. Kromann
Some databsaes allows batches of sql statements. Thes can be passed to the db server in one query and the statements are usally separated by ; If you are executing a batch of statements each returning a result you will have to process each result in your code. This is supported by ODBC, MS SQL

[PHP] php in css not working with IF's

2001-10-03 Thread Jason Dulberg
I have a common css file that is being used across several virtual hosts. Basically, what I am trying to do is use the same css file even though several text colors/sizes need to be changed depending on what site/platform its being used on. I have my sql query (retrieves $site_style) in the file

[PHP] Unable to get a dot-decimal ip address from a decimal ip address

2001-10-03 Thread dharana
Hi, decbin() is unable to handle decimal numers greater than 2147483647 and it's a problem. That's in the docs, ok. The situation is: I have a list of IPs in decimal format (ex: 3232235524) and I wanted to translate them into dot decimal. As far as I know the formula is: [...]by converting the

Re: [PHP] RE: This is SOOOO FREAKY!!! Laughed like HELL !!! :-)

2001-10-03 Thread Ashley M. Kirchner
"Maxim Maletsky (PHPBeginner.com)" wrote: > I guessed so. But do really many know it? > I've been coding PHP for a couple of years but never seen that :-) Look in $PHP_SOURCE/ext/standard/info.h -- H | "Life is the art of drawing without an eraser." - John Gardner +---

Re: [PHP] object references lose local variables

2001-10-03 Thread Steve Strassmann
Hi, I'm the original author. I put my address in the body of the message to avoid spammers. To answer your question, nobody answered my question. However, after messing around, I found a change that did the trick. Coming from an OOP background (lisp, smalltalk, etc.) it sure seems to me that PHP h

RE: [PHP] associative array syntax question - got it!

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Yes, that does for sure Maxim Maletsky www.PHPBeginner.com -Original Message- From: Matthew Loff [mailto:[EMAIL PROTECTED]] Sent: giovedi 4 ottobre 2001 4.02 To: 'Job Miller'; 'Maxim Maletsky (PHPBeginner.com)'; [EMAIL PROTECTED] Subject: RE: [PHP] associative array syntax question -

RE: [PHP] associative array syntax question - got it!

2001-10-03 Thread Matthew Loff
Have you tried using curly brackets? print "$a[B]{$quotes[$a[B]]}" Does that work? Just cuious... -Original Message- From: Job Miller [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 03, 2001 8:44 PM To: Maxim Maletsky (PHPBeginner.com); [EMAIL PROTECTED] Subject: Re: [PHP] assoc

Re: [PHP] Add $String to $Num ???

2001-10-03 Thread SilkWebDesign
Hi, No that doesn't quite work, using your example it returned in my session file !10,47,552| If I change session_register($sess); to session_register(sess); it gives me sess|s:9:"10,47,552"; And what I want is String1(or 2,3,4,5 etc whatever the value of $Num is)|s:9:"10,47,552"; Ade --

RE: [PHP] Add $String to $Num ???

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
$sess = $String.$Num; session_register($sess); ..is your answer :-) ...you're welcome :-) Maxim Maletsky www.PHPBeginner.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: giovedi 4 ottobre 2001 2.53 To: [EMAIL PROTECTED] Subject: [PHP] Add $String to

[PHP] Add $String to $Num ???

2001-10-03 Thread SilkWebDesign
Hi, I have a variable called $String which can contain 3 random numbers like so... $String="12,94,423"; I then have $Num which is a single number from 1 - 20, I want to add $String and $Num together like this $String$Num So I would end up with $String1="12,94,423"; and then I can enter that

Re: [PHP] status of building both CGI and MODULE

2001-10-03 Thread David Robley
On Thu, 4 Oct 2001 06:27, fx wrote: > Hi > > I've read various newsgroups about the possibility of building both CGI > and MODULE at the time but haven't found a clear response > > is it possible ? Yes > if yes ... > is it possible with the same configure script ? No > do some options ma

RE: [PHP] associative array syntax question - got it!

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Well, the actual problem wasn't that. It was you not posting your code entirely ;-) Often the bugs happen right where you don't except them, just like anything in this life ;-) Maxim Maletsky www.PHPBeginner.com -Original Message- From: Job Miller [mailto:[EMAIL PROTECTED]] Sent: giove

Re: [PHP] associative array syntax question - got it!

2001-10-03 Thread Job Miller
Maxim, I figured it out. Thanks for your help PHP can't interpolate within string when nested associative array is used. the nested aa must be appended with dot notation, and if you try to print it within the outer quotes it balks! print "$a[B]".$quotes[$a[B]]."" ^ ^^^

Re: [PHP] Parsing a CSV file

2001-10-03 Thread David Robley
On Wed, 3 Oct 2001 21:25, Sharat Hegde wrote: > Hello, > > I am trying to parse a CSV (comma separated file) file to get the > separate elements. The format of each line of the file is as follows: > > R001,23,"2,5" > > Note that the 3rd field "2,5" is enclosed within quotes as it has > commas wit

[PHP] associative array syntax question

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
-Original Message- From: Maxim Maletsky (PHPBeginner.com) [mailto:[EMAIL PROTECTED]] Sent: giovedi 4 ottobre 2001 2.02 To: 'Job Miller' Subject: RE: [PHP] associative array syntax question I tried on winXP/PHP4.0.6/Apache 0); print $a[$b['b']] # prints: # pr

RE: [PHP] associative array syntax question

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
What about adding a few quotes above the problem? $row['TICKER'] = 'NTAP'; $test = 'NTAP'; $quotes[$test] = '8.30'; // $quotes[{$row[TICKER]}] = will that parse? $quotes[$row[TICKER]] = will that parse? Maxim Maletsky www.PHPBeginner.com -Original Message- From: Job Miller [mailto

Re: [PHP] associative array syntax question

2001-10-03 Thread Philip Olson
Hi Job. This works for me (and *should* always work) : $a = array('foo' => 'bar'); $b = array('b' => 'foo'); print $a[$b['b']]; // prints bar How _exactly_ are you calling it? (provide a short standalone ex) Does the above example work for you? What version of php? regards, Philip Ol

Re: [PHP] exec() system() passthru() problems. (S.u.S.E 7.2)

2001-10-03 Thread David Robley
On Wed, 3 Oct 2001 20:01, Edward Woodstarf wrote: > Hi, > I was wondering if someone could HELP I'm very new to php and I am > trying to get the application functions to start an instance of a > program. However no matter what I do the functions return -1. Even if I > add the absoulte path it

RE: [PHP] associative array syntax question

2001-10-03 Thread Job Miller
here is sample output from my script: win98/Apache 1.3.19/php4.0.5 variable being displayed = value $row[TICKER] = NTAP $test = NTAP $quotes[$test] = 8.30 $quotes[{$row[TICKER]}] = will not parse $quotes[$row[TICKER]] = will not parse any ideas? --- "Maxim Maletsky (PHPBeginner.com)" <[EMAIL

Re: [PHP] Getting the right hour?

2001-10-03 Thread David Robley
On Thu, 4 Oct 2001 07:38, Jay Paulson wrote: > I am trying to get the right hour using php's date() function. > However, I don't know how to set the clock on my redhat machine via > command prompt. I keep getting 18 for the hour and it should be 17. > Anyone know how to set the time on the mac

RE: [PHP] write to multiple sql tables

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
PHP can only handle a query at a time. If the database in question allows you to construct a such query where you can write to multiple files then you can. Go to the manual of your DB and look for the answer there. For instance; look at the syntax of INSERT. Maxim Maletsky www.PHPBeginner.com

[PHP] write to multiple sql tables

2001-10-03 Thread sc
Hi; Is there any easy way of writing to multiple mysql tables in the one database? ie. putting it all in the one query etc? instead of writing a heap of code... Any help would be great... thx. -sc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: [PHP] associative array syntax question

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Strange, I always though it should be working. Have you tried $a[{$b['b']}] ? What version of PHP are you running? Maxim Maletsky www.PHPBeginner.com -Original Message- From: Job Miller [mailto:[EMAIL PROTECTED]] Sent: giovedi 4 ottobre 2001 1.41 To: [EMAIL PROTECTED] Subject: [PHP

[PHP] associative array syntax question

2001-10-03 Thread Job Miller
why does: print $a[$b['b']] return: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' but if I do it in two steps like: $c=$b['b']; print $a[$c]; it works fine. I have tried dozens of syntax combinations using quotes, no quotes, on one or both and can't get anything to work.

[PHP] RE: This is SOOOO FREAKY!!! Laughed like HELL !!! :-)

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
I guessed so. But do really many know it? I've been coding PHP for a couple of years but never seen that :-) Very cool! Should be expecting it from such dudes :-) Cheers, Maxim Maletsky www.PHPBeginner.com -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: giove

RE: [PHP] Re: This is SOOOO FREAKY!!! Laughed like HELL !!! :-)

2001-10-03 Thread Dan Harrington
The real question is . . . . what OTHER secret codes are out there? > -Original Message- > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 03, 2001 4:58 PM > To: Maxim Maletsky (PHPBeginner.com) > Cc: 'PHP'; [EMAIL PROTECTED] > Subject: [PHP] Re: This is S

[PHP] Re: This is SOOOO FREAKY!!! Laughed like HELL !!! :-)

2001-10-03 Thread Rasmus Lerdorf
That would be Thies, and this isn't exactly a new thing. Has been there for a couple of years. -Rasmus On Thu, 4 Oct 2001, Maxim Maletsky (PHPBeginner.com) wrote: > > I hope I wasn't just left over by not knowing that. > > Listen what I just came across on an Italian PHP mailing list (ok, > cr

[PHP] This is SOOOO FREAKY!!! Laughed like HELL !!! :-)

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
I hope I wasn't just left over by not knowing that. Listen what I just came across on an Italian PHP mailing list (ok, credit belongs to the founder of Italian largest PHP portal Michel 'ZioBudda' Morelli @ www.ziobudda.net). According to him, if you add '?=PHPE9568F36-D428-11d2-A769-00AA001

[PHP] Getting the right hour?

2001-10-03 Thread Jay Paulson
I am trying to get the right hour using php's date() function. However, I don't know how to set the clock on my redhat machine via command prompt. I keep getting 18 for the hour and it should be 17. Anyone know how to set the time on the machine correctly? Thanks, jay -- PHP General Mailing

Re: [PHP] cookie not set anymore by IE5 (localhost)

2001-10-03 Thread Richard Baskett
I wrote this cookie script to work with every platform and every browser.. since I was having the same cookie problems you were having and a lot of people have had in this forum. So far I have found it to work with everything. Give it a try, if anybody finds that it does not work with a platform

RE: [PHP] cookie not set anymore by IE5 (localhost)

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
No formatting a developing station is a really stupid thing to do ;-) Have you looked into your C:/docs/you/cookies? It should be there. Hey, why instead don't you try to remove it? Set it to nothing - that's it. Logic: if at least a friend of yours sees it - means it works. Cookies could be a

RE: [PHP] file reading and textarea problem

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Yup. fread() Read on PHP.net/fread PHP.net/fgets ...to learn how to manipulate files. Maxim Maletsky www.PHPBeginner.com -Original Message- From: Nikola Veber [mailto:[EMAIL PROTECTED]] Sent: mercoledi 3 ottobre 2001 11.11 To: php forum Subject: [PHP] file reading and textarea

RE: [PHP] file maniputation??

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Not sure, but this 'wb' looks suspicious to me. >From the manual: "The mode may contain the letter 'b'. This is useful only on systems which differentiate between binary and text files (i.e. Windows. It's useless on Unix). If not needed, this will be ignored. " Can you ignore it as well? Maxi

RE: [PHP] Problem when displaying the $ character

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
It is the same thing. trim() is enough to make it work. Maxim Maletsky www.PHPBeginner.com -Original Message- From: Mauricio T?llez Jim?nez [mailto:[EMAIL PROTECTED]] On Behalf Of EDUMEXICO Sent: mercoledì 3 ottobre 2001 19.53 To: Dominik Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Prob

RE: [PHP] PHP Knowledge Base solution?

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
I think you can take just about any forum or other script and modify it on your own if you know how. And, what you're asking is relatively easy to do from scratch as well. You should try at least. Maxim Maletsky www.PHPBeginner.com -Original Message- From: Michael O'Neal [mailto:[EMAIL

RE: [PHP] Newlines in files

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
It did. Try opening that file with a text editor. Maxim Maletsky www.PHPBeginner.com -Original Message- From: Big5ive [mailto:[EMAIL PROTECTED]] Sent: mercoledì 3 ottobre 2001 19.10 To: [EMAIL PROTECTED] Subject: [PHP] Newlines in files My Code: $PW_LIST="../config/pw.txt"; $fp=fop

RE: [PHP] How to simulate any browser

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
So you need a browser of your own? You should be using fosockopen() php.net/fsockopen Maxim Maletsky www.PHPBeginner.com -Original Message- From: Kamil Nowicki [mailto:[EMAIL PROTECTED]] Sent: mercoledi 3 ottobre 2001 17.47 To: PHP-list Subject: [PHP] How to simulate any browser

Re: [PHP] file reading and textarea problem

2001-10-03 Thread Philip Olson
If you use fgets(), you can loop through it like the example does : http://www.php.net/fgets Or, consider the file() function which automagically assigns each line to an element of the array. http://www.php.net/file Or, you could open the file as a one string using fread(), see the exampl

[PHP] cookie not set anymore by IE5 (localhost)

2001-10-03 Thread Chris Hayes
hi, i'm having a cookie problem. Maybe you know Postnuke, anyway it requires cookies for users and the admin. At first it worked fine, i tried to add functionailty, testing it on postnuke. Then i deleted some cookies, even deleted the windows/cookies/index.dat , installed some extra versions o

Re: [PHP] chmod trouble

2001-10-03 Thread Dan Lowe
Previously, Nikola Veber said: > > What chmod value gives the read-only premission to the file ? (777 is the > read-write) 0400 would be read-only and visible only to the owner 0444 would be read-only, visible to anyone 0644 would be read-only to anyone but the owner (r/w to owner). -dan --

[PHP] file reading and textarea problem

2001-10-03 Thread Nikola Veber
Hi ! I'm having a problem with the following : I have a log file on my site, that records date, time and the user's system. Each entry is placed in a new line. Now, I can only read the first line with fgets($filename, 4096). Is there another function, or the 4096 number should be changed in

[PHP] file maniputation??

2001-10-03 Thread Gerard Samuel
Hey all. I have a script that uses that creates/manipulates files, and it works great on my end. Thats no question. There is a small percentage of my users that when they try to run the file it cannot create or modify files. I suspected file ownership may be wrong on files and directories.

[PHP] status of building both CGI and MODULE

2001-10-03 Thread fx
Hi I've read various newsgroups about the possibility of building both CGI and MODULE at the time but haven't found a clear response is it possible ? if yes ... is it possible with the same configure script ? do some options make it impossible ? TIA please forward to [EMAIL PROTECTED]

[PHP] PHP Knowledge Base solution?

2001-10-03 Thread Michael O'Neal
Hi. Anyone know of a Knowledge Base solution (Like you see from computer manufacturers on their websites) done in PHP/MySQL? Something where a user could search for entries on specific problems and such they might have? Please email me at [EMAIL PROTECTED] as I am on the digest. Thanks, mto

Re: [PHP] Best way to duplicate tables to another DB using PHP

2001-10-03 Thread David Yee
Nope- nothing useful yet anyways :-). I guess maybe the only thing to do is to select different ranges for the table (if it's too big) instead of a select with no where clause. Now to think of it I guess you can even select one record at a time sequentially if the pk is integer based. Then you

[PHP] chmod trouble

2001-10-03 Thread Nikola Veber
Hi ! What chmod value gives the read-only premission to the file ? (777 is the read-write) Thanks Nikola -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail

Re: [PHP] Best way to duplicate tables to another DB using PHP

2001-10-03 Thread David Yee
mysqldump would work pretty well if the source DB is mysql, but it's a DB I have to access via ODBC on a windows box instead. And this particular DB doesn't seem to have a command line interface to export a table that I can call from PHP. David - Original Message - From: sagar N

Re: Re: [PHP] How to simulate any browser

2001-10-03 Thread ReDucTor
What does the error page have? - Original Message - From: "Kamil Nowicki" <[EMAIL PROTECTED]> To: "PHP-list" <[EMAIL PROTECTED]> Sent: Thursday, October 04, 2001 2:55 AM Subject: Re: Re: [PHP] How to simulate any browser > > Hello again > > > I suppose I was not precise enough. >

Re: [PHP] File extension inc?

2001-10-03 Thread Sheridan Saint-Michel
Remembering, of course, to check and make sure your include statements are of the form include("/path/file.inc") rather than include("http://mysite.com/path/file.inc";) BEFORE adding the below directive (one mistake I won't ever make again =P ) Sheridan Saint-Michel Website Administrator FoxJet,

Re: [PHP] Sorry! The $ character is still making problems

2001-10-03 Thread Rasmus Lerdorf
Well, PHP is not adding the line-feed. It must be in your $copy values. Run trim() on it before displaying: echo ''.trim($copy).''; -Rasmus On Wed, 3 Oct 2001, Dominik wrote: > Ok, let me explain exactly what is happening. On a page, try printing out > this code: > > foreach($imgs as $cop

[PHP] Sorry! The $ character is still making problems

2001-10-03 Thread Dominik
Ok, let me explain exactly what is happening. On a page, try printing out this code: foreach($imgs as $copy) { echo $copy; } $imgs is of course an array. The code though goes through all the $imgs and displays as so image1 image2 image3 but I need it like this: image1 image2 image

RE: [PHP] File extension inc?

2001-10-03 Thread Rasmus Lerdorf
> Even better use mod_rewrite so that .inc files > are never displayed :-) mod_rewrite is severe overkill for this. Just use: Order allow,deny Deny from all -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: [PHP] Pesky quotes

2001-10-03 Thread Philip Olson
I don't understand this question, maybe you're looking for : http://www.php.net/addslashes http://www.php.net/stripslashes http://www.php.net/manual/en/configuration.php#ini.magic-quotes-gpc Looks like you have magic_quotes_gpc enabled. Adjust accordingly. Using addslashes() on a string

RE: [PHP] File extension inc?

2001-10-03 Thread jallen01
Even better use mod_rewrite so that .inc files are never displayed :-) Jeremy Allen elliptIQ Inc. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL P

Re: [PHP] Problem when displaying the $ character

2001-10-03 Thread EDUMEXICO
Hi, try this: Item 1 Item 2 "; ?> I hope this can help you. Cheers On Wed, Oct 03, 2001 at 11:08:27AM -0700, Dominik wrote: > Through php, I run a function that creates a list of items in a select menu > as follows: > > > ">Item 1 > ">Item 2 > > > but here is how the source code looks: >

Re: [PHP] Problem when displaying the $ character

2001-10-03 Thread Philip Olson
This assumption is incorrect, these are just variables that most likely contain unwanted whitespace, such as a \n. Consider using trim() beforehand. Maybe I misunderstand your question. Also, no need for "" when printing variables directly like that. echo $foo; Regards, Philip Olson On

[PHP] Error: Unable to open *\index.php in Unknown on line 0

2001-10-03 Thread Scott Fletcher
Hi ya all! I'm having some trouble with PHP on IIS. Yes, I know IIS suck! When I have one website, I have no problem. But when I have more than one website on IIS. This is when I have problem with PHP. I looked up on php.ini to make sure the line, "doc root = " is left blank and the othe

Re: [PHP] New York Remembrance

2001-10-03 Thread Hugh Danaher
Thank you. - Original Message - From: Irmingard Anna Kotelev <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 03, 2001 1:15 PM Subject: [PHP] New York Remembrance > Dear friends, > > the madness incarnate of September 11th, 2001 is one which will never > be > forgott

Re: [PHP] File extension inc?

2001-10-03 Thread Rasmus Lerdorf
> On Wednesday 03 October 2001 12:13, Jan Grafström wrote: > > Hi! > > How does server handle the .inc extension and for what do I use it ? > > You should be aware that if the webserver is not set up to handle .inc files > as PHP code, that it might output them as text to the user. Thus possibly >

Re: [PHP] Re: MySQL - Selecting Unique Entries

2001-10-03 Thread Sheridan Saint-Michel
Distinct is just a group by on all columns, so either of the queries you showed should be pretty much the same. The difference between the two shows up when you have multiple columns in your select. ie Select distinct id,name from table1; and Select id,name from table1 group by name; do two di

[PHP] Problem when displaying the $ character

2001-10-03 Thread Dominik
Through php, I run a function that creates a list of items in a select menu as follows: ">Item 1 ">Item 2 but here is how the source code looks: Item 1 Item 2 It looks like php takes the $ character and inserts a return for it. This though disrupts the value of the form element. Is there

RE: [PHP] Re: something like alert (javascript)

2001-10-03 Thread Brian Paulson
Here is something that I finished the other day that does what you need function MyForm_onsubmit() { bSuccess = true; if(MyForm.action[0].checked) { var x=window.confirm("Message to be displayed here") if (x) bSuccess = true

Re: [PHP] How to simulate any browser

2001-10-03 Thread Mark
On Wed, 3 Oct 2001 17:46:50 +0200, Kamil Nowicki wrote: > > Hello everyone! > > I have a problem. My webpage (say webpage_1) needs to get some >data >presented on other webpage (wepage_2). I tried to use >fopen("http://webpage_2?params","r";) and got connection and stuff, >but >I suppose that we

[PHP] passing object variable from page to page. Please disregard the previous!

2001-10-03 Thread Ming-Chieh Lee
Hello, > I have a question on how to pass object variable from page to page. Here is > something that I found, but it doesn't work. I would greatly appreciate if > someone can help: > 1. does it matter if I include first, then so session_start()? > > > file1.php > include ('class.myclass.

Re: [PHP] Sessions Variables and refresh pages

2001-10-03 Thread Karina
Yes, the result is returned... the problem is that i have to refresh the page to see it or use it in a query. Karina -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators,

[PHP] Re: Newlines in files

2001-10-03 Thread Henrik Hansen
[EMAIL PROTECTED] (Big5ive) wrote: > My Code: > $PW_LIST="../config/pw.txt"; > $fp=fopen("$PW_LIST","a"); > fputs($fp,"$username=$pw\n"); > fclose($fp); > > This should make a newline after printing $username=$pw, shouldn't it!? > But it doesn't!!! after printing where? in a browser \n

[PHP] Pesky quotes

2001-10-03 Thread René Fournier
A little problem with single quotes messing up an SQL SET statement... I can type single quotes, double quotes--it seems, any 'special' character--into a form, and so long as my PHP script tries to INSERT, UPDATE or DELETE said row into the table, no problem. But when I try to DUPLICATE a row th

  1   2   >