Re: [PHP] Probs with a form

2003-07-05 Thread Lars Torben Wilson
On Fri, 2003-07-04 at 15:02, LPA wrote: > Hey, > > I must send datas threw a form, but I dont want to have a submit button.. Is > there a way to 'simulate' the click of a submit button? > > Thnx for your help > > Laurent Hi there, This is really an HTML question, and not a PHP question, but us

Re: [PHP] looping through values from a field? Need hellp.

2003-07-05 Thread Lars Torben Wilson
On Sat, 2003-07-05 at 15:55, Micah Montoy wrote: > I have this javascript that enables browsing and selecting of a file. This > file location and name are then transferred further down in the form as an > . Multiple files may be chosen as they are just added one below the > other. Anyway, when t

Re: [PHP] looping through values from a field? Need hellp.

2003-07-05 Thread Lars Torben Wilson
On Sat, 2003-07-05 at 17:13, Micah Montoya wrote: > Ok. I gave it a shot but have run into one other question that I wasn't > able to find that was addressed by the article. > > My select statement looks like this: > > > > When I create the php file, I am trying something like below but it isn

Re: [PHP] error on array loop through foreach?

2003-07-07 Thread Lars Torben Wilson
On Mon, 2003-07-07 at 00:16, Micah Montoy wrote: > I'm using the foreach to loop through a array that is passed from a form. > The form has a multiple select field and the field sends a list of selected > image locations (i.e. c:\\myimages\\rabbit.gif). All the fields are > selected by use of Java

Re: [PHP] what licence for documentation ?

2003-07-07 Thread Lars Torben Wilson
On Mon, 2003-07-07 at 05:49, E.D. wrote: > Hi, > > I'd like to know which licence has the documentation. > PHP licence ? free licence ? public domain ? other ? > > In other words, I want to include some parts in a commercial product, > can I ? > > Please answer only if you *know*, I can't go wi

Re: [PHP] error on array loop through foreach?

2003-07-08 Thread Lars Torben Wilson
On Mon, 2003-07-07 at 21:31, Micah Montoy wrote: > It did help and I altered the script a bit. It now reads as: [snip] > Now I am receiving the error message of: > > Warning: Invalid argument supplied for foreach() in > c:\inetpub\wwwroot\webpage10\example\u_images\act_load_imgs.php on line 43

Re: [PHP] Retaining formatting problem

2003-07-08 Thread Lars Torben Wilson
On Tue, 2003-07-08 at 02:29, [EMAIL PROTECTED] wrote: > Hello everyone, > > I have a long running problem that i just want to get covered, I have a standard > text box for people to insert long lengths of text. > > This text box is in a standard but when I insert it into the > database the lin

Re: [PHP] What did I do wrong to cause a parse error?

2003-07-10 Thread Lars Torben Wilson
Hi there, On Thu, 2003-07-10 at 21:53, Phil Powell wrote: > foreach ($profileArray[$i][attributes] as $key => $val) { ^^ You should quote the word 'attributes': http://www.php.net/manual/en/language.types.array.php#language.types.array.donts Sorry...that link

Re: [PHP] Array key names - can they be called as strings?

2003-07-17 Thread Lars Torben Wilson
On Thu, 2003-07-17 at 14:38, Mike Morton wrote: > Perhaps I was not that clear on the subject :) > > I have the following array: > > $SAVEVARS[headerimage]=$_POST[headerimage]; > $SAVEVARS[backgroundimage]=$_POST[backgroundimage]; > > I want to iterate through it to save to a database config: >

Re: [PHP] Too much of $GLOBALS[] a problem??

2003-07-17 Thread Lars Torben Wilson
On Thu, 2003-07-17 at 18:35, Ow Mun Heng wrote: > Hi All, > > Just a quick question on this. In my scripts, I'm using A LOT Of > $GLOBALS['my_parameter'] to get the declared values/string. 1 example below > : The only real problem is if you ever want to use that code in anything else. Usin

RE: [PHP] Too much of $GLOBALS[] a problem??

2003-07-17 Thread Lars Torben Wilson
On Thu, 2003-07-17 at 21:10, Ow Mun Heng wrote: > > 'Loosely-coupled' code relied much less on the environment around it. > > It would typically receive its values through an argument list, array > > of values it needs, or perhaps by being a method in a class which has > > attribute values for all

Re: [PHP] list server problem

2003-07-20 Thread Lars Torben Wilson
On Sun, 2003-07-20 at 11:04, Andu wrote: > --On Monday, July 21, 2003 01:34:11 +0800 Jason Wong > <[EMAIL PROTECTED]> wrote: > > > On Monday 21 July 2003 00:39, Andu wrote: > > > >> > The executive summary is that there is nothing to be fixed. If you're > >> > using a less than adequate mail cli

Re: [PHP] Global variable question question

2003-07-23 Thread Lars Torben Wilson
On Wed, 2003-07-23 at 12:19, Jason Giangrande wrote: > When registered globals is set to off this does not effect the $PHP_SELF > variable right? In other words I should be able to call $PHP_SELF with > out having to do this $_SERVER['PHP_SELF'], right? > > Thanks, > Jason Giangrande Without goi

Re: [PHP] I'm really getting annoyed with PHP

2003-07-23 Thread Lars Torben Wilson
On Thu, 2003-07-24 at 12:41, Beauford.2005 wrote: > Yes, I'm still screwing around with this stupid redirection thing, and > either I'm just a total idiot or there are some serious problems with > PHP. I have now tried to do it another way and - yes - you guessed it. > It does not work. I doubt ra

RE: [PHP] I'm really getting annoyed with PHP

2003-07-23 Thread Lars Torben Wilson
On Thu, 2003-07-24 at 15:12, Beauford.2005 wrote: > action="post" name="seasons"> Try ACTION="/season_write.php" instead. What happens? -- Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www

RE: [PHP] I'm really getting annoyed with PHP

2003-07-23 Thread Lars Torben Wilson
On Wed, 2003-07-23 at 18:21, Daryl Meese wrote: > Well, I know I am not running the latest version of PHP but I don't believe > this is accurate. I believe PHP case sensitivity is based on the os that > processes the file. Can anyone clear this up. > > Daryl OK: you're mistaken. If you're corr

RE: [PHP] I'm really getting annoyed with PHP

2003-07-24 Thread Lars Torben Wilson
On Thu, 2003-07-24 at 20:24, Beauford.2005 wrote: > It's obvious though that PHP can not handle it. This is why I am forced > to use javascript. I have already spent a week on this and am not going > to waste any further time. I have posted all my code and if someone can > see a problem I'll look a

Re: [PHP] I'm really getting annoyed with PHP

2003-07-24 Thread Lars Torben Wilson
On Thu, 2003-07-24 at 04:18, Comex wrote: > <[EMAIL PROTECTED]> > Lars Torben Wilson: > > On Wed, 2003-07-23 at 18:21, Daryl Meese wrote: > >> Well, I know I am not running the latest version of PHP but I don't > >> believe this is accurate. I believe PHP

Re: [PHP] PHP should know my data!

2003-07-24 Thread Lars Torben Wilson
On Thu, 2003-07-24 at 15:04, John Manko wrote: > I just wrote a web app, but I'm completely disgusted with PHP. The > application works great, but PHP is not smart enough to know what data > belongs in my database. Really, I have to enter the stuff in myself. I > spent 2 long days writing thi

Re: [PHP] PHP should know my data!

2003-07-24 Thread Lars Torben Wilson
On Thu, 2003-07-24 at 15:24, John Manko wrote: > LOL :) - Now that's funny! > > Robert Cummings wrote: > > >Unfortunately I don't think some people "got" the joke. Next thing you > >know their going to complain that PHP should have told them the > >punchline ;) > > > >Cheers, > >Rob. Oh fer Pet

RE: [PHP] List Administrator

2003-07-30 Thread Lars Torben Wilson
On Wed, 2003-07-30 at 11:11, Chris W. Parker wrote: > Johnny Martinez > on Wednesday, July 30, 2003 11:07 AM said: > > > Google spidered the web view to the list and is indexing our email > > addresses. Any chance you can edit the code to change > > "[EMAIL PROTECTED

Re: [PHP] List Administrator

2003-07-30 Thread Lars Torben Wilson
On Wed, 2003-07-30 at 11:07, Johnny Martinez wrote: > List Administrator, > Google spidered the web view to the list and is indexing our email > addresses. Any chance you can edit the code to change "[EMAIL PROTECTED]" to > show as "user at domain dot com" as many of the public message boards do? >

Re: [PHP] Using register_globals

2003-06-05 Thread Lars Torben Wilson
On Thu, 2003-06-05 at 01:09, [EMAIL PROTECTED] wrote: > One thing that hasn't been mentioned explicitly about register_globals > turned to off is the readablity of the code and thus the reuse of code. > When you use GET, POST, etc... everybody reading your script knows exactly > where the data i

Re: [PHP] Morph an object

2003-06-05 Thread Lars Torben Wilson
On Wed, 2003-06-04 at 17:18, [EMAIL PROTECTED] wrote: > You have the problem right. What do you mean by a "server push"? Sounds > interesting... > > Anyway I have to display something. Since its a login, the user needs their > interface. I think I'll have to introduce another page... I'd love

RE: [PHP] Using register_globals

2003-06-06 Thread Lars Torben Wilson
On Thu, 2003-06-05 at 05:28, Jay Blanchard wrote: > [snip] > Another issue I haven't read so far is that making your script work when > register_globals is off makes it to be more compatible since scripts > using GET and POST array should still work on systems that have > register_globals turned

Re: [PHP] Need help with display of results

2003-06-06 Thread Lars Torben Wilson
On Fri, 2003-06-06 at 14:32, Gloria L. McMillan wrote: > Hi, again! > > I did not see my question as yet so I will repost it. > > I have had help writing HTML code to display the results of my PHP--> McSQL actions. > > But when I attempt to show the DATE and q40 (comments) with the HTML code bel

Re: [PHP] Need help with display of results

2003-06-06 Thread Lars Torben Wilson
On Fri, 2003-06-06 at 18:45, Lars Torben Wilson wrote: [snip] > while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { > echo " > {$row['time_stamp']}{$row['heading']}\n"; > } Whoops...replace 'time_stamp' with 'added&

Re: [PHP] foreach and mysql_fetch_array problem

2003-06-04 Thread Lars Torben Wilson
On Tue, 2003-06-03 at 02:12, Bix wrote: > I'm fine with using while loops, use them for most of my listing work, but I > wanted to try using a foreach loop instead but it seemed not to work as > expected. For ym table generation, I need the $key to do some maths on in > order to get my table lookin

Re: [PHP] OK guys, thank you so far

2003-06-04 Thread Lars Torben Wilson
On Tue, 2003-06-03 at 13:20, David Nicholson wrote: > Hello, > > This is a reply to an e-mail that you wrote on Tue, 3 Jun 2003 at 20:04, > lines prefixed by '>' were originally written by you. > > I've tried and here's the output: > > Undefined index: input > > if ($HTTP_GET_VARS['printout'] != "

RE: [PHP] Validating user input

2003-06-04 Thread Lars Torben Wilson
On Tue, 2003-06-03 at 02:46, Sichta Daniel wrote: > Another way is to do it on client side (javascript) > > DS Indeed, but then you have to be prepared for it not to work if the user doesn't have js enabled. Torben > -Original Message- > From: Shaun [mailto:[EMAIL PROTECTED] > Sent:

Re: [PHP] Change object state

2003-06-04 Thread Lars Torben Wilson
On Tue, 2003-06-03 at 14:34, [EMAIL PROTECTED] wrote: > Is there any way I can change the state of an already instantiated object? > > ex: > > $thisone = new Object(); > > $content = something; > > $thisone -> SetContent($content); > > $thisone -> Display(); > > > That creates the object. N

Re: [PHP] Doing simple math

2003-06-04 Thread Lars Torben Wilson
On Tue, 2003-06-03 at 19:49, Chris Cameron wrote: > I'm having a problem I don't think I should be having. Basically, I'm > doing some simple math, and I'm having issues in making PHP do it (with > the brackets in particular). > > An example that looks like it -should- work: > > $Math = sqrt(81)(

Re: [PHP] Doing simple math

2003-06-04 Thread Lars Torben Wilson
On Tue, 2003-06-03 at 20:02, Chris Cameron wrote: > On Tue, 2003-06-03 at 20:59, Lars Torben Wilson wrote: > > On Tue, 2003-06-03 at 19:49, Chris Cameron wrote: > > > > > > An example that looks like it -should- work: > > > > > > $Math = sqrt(8

Re: [PHP] Calling HTML pages

2003-06-05 Thread Lars Torben Wilson
On Wed, 2003-06-04 at 13:15, Daniel J. Rychlik wrote: > I was looking for a function that will take you to a html page. For instance. > > I have a function that checks for !empty values in $_POST; What I would like to do > is if the field is empty then > > go back to the form. I have a funct

Re: [PHP] Re: Migration once again

2003-06-05 Thread Lars Torben Wilson
On Wed, 2003-06-04 at 12:51, Øystein Håland wrote: > I'm sorry Dan, but it don.t make any difference. Here's almost the complete > code: The easiest way to fix it is to enclose the $_SERVER['PHP_SELF'] in curly braces when you embed it into a string. See the manual: http://www.php.net/manual/en/l

Re: [PHP] Re: Using register_globals

2003-06-05 Thread Lars Torben Wilson
On Wed, 2003-06-04 at 10:43, Rouvas Stathis wrote: > Armand Turpel wrote: > > > > > On Wed, 4 Jun 2003, Jay Blanchard wrote: > > > > [snip] > > > > Have register globals set to ON is one way of leaving your script open > > > > to being exploitable. > > > > [/snip] > > > > > > > > Please explain th

Re: [PHP] Morph an object

2003-06-05 Thread Lars Torben Wilson
On Wed, 2003-06-04 at 14:43, [EMAIL PROTECTED] wrote: > All ye noble Knights of PHP: > > Got an interesting problem, > > I am creating a login routine for my PHP website. Each page is an extension > of the root page object. I am creating a loginpage.php which is an object > with a constructor:

Re: [PHP] Need a safe way to get user supplied data into a varaible.

2003-06-08 Thread Lars Torben Wilson
On Sun, 2003-06-08 at 17:15, Simon Coggins wrote: > Hi, [snipped for brevity] > I need some way of putting a block of text into a variable without > having to read it in from a file. From the template point of view, all > that happends is a token is replaced with the body of the text. So > readin

Re: [PHP] stripping newlines from a string

2003-06-09 Thread Lars Torben Wilson
On Sun, 2003-06-08 at 22:44, Charles Kline wrote: > Hi all, > > How would i go about stripping all newlines from a string? > > Thanks, > Charles Something like this: Good luck, Torben -- Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506 http://www.thebuttlesschap

Re: [PHP] Question about current() and key()

2003-06-09 Thread Lars Torben Wilson
On Mon, 2003-06-09 at 14:38, Jim Lucas wrote: > Does anybody know any benifits to using current() and key() See below: > I will show two examples of what I mean. > > > echo ""; > > $arr1 = array(array(1 => 10), > array(2 => 12), > array(3 => 13), > ar

Re: [PHP] Is It Possible to Tell PHP To Output x Decimal Places PerFloat?

2003-06-09 Thread Lars Torben Wilson
On Mon, 2003-06-09 at 15:22, Dan Anderson wrote: > Is it possible to tell PHP when converting a number to a string (i.e. in > an echo or print command) to use x decimal places? > > Specifically, if I > >echo '$' . $some_price; > ?> > > And some_price is $1.50, it outputs: > > $1.5 > > Tha

Re: [PHP] Warning Spammer

2003-06-10 Thread Lars Torben Wilson
On Tue, 2003-06-10 at 04:33, myphp wrote: > The email address I use on this list is never used > anywhere else in the world so only a list member must > have used it to send me the message below. It did not > come through the php lists. Come again? I don't follow your logic. Anyone could have got

Re: [PHP] Questions, questions, questions...

2003-06-10 Thread Lars Torben Wilson
On Tue, 2003-06-10 at 16:34, Sparky Kopetzky wrote: > Ok - let the war begin... > > Question: Why doesn't the PHP community support using an Hungarian > style of programming if it prevents errors?? I've gotten too darn many Haven't really seen this one flamed over on this list before, but maybe s

RE: [PHP] Questions, questions, questions...

2003-06-11 Thread Lars Torben Wilson
On Wed, 2003-06-11 at 05:21, Jay Blanchard wrote: > I think that part of the problem is that many PHP developers come to > programming from the largely self-taught web community (not that there > is anything wrong with that). They have never programmed before (doing > HTML and CSS is NOT programmin

Re: [PHP] undefined variable: action

2003-06-11 Thread Lars Torben Wilson
On Wed, 2003-06-11 at 12:22, Ryan M wrote: > Thanks for the advice... The link worked Now it is saying this: > > Notice: Undefined index: action in > > It only says this if there is no action...it goes away once I click the link > and the action=someaction Is there a way to fix my php

Re: [PHP] array sort help...

2003-06-11 Thread Lars Torben Wilson
On Wed, 2003-06-11 at 12:10, Dan Joseph wrote: > Hi, > > I cannot figure this out... Need some assistance. > > I have an array: > > $jack[#] = array( > "loan_info" => 101, > "first_name" => jack, > "last_name" => mother > ); > >

Re: [PHP] undefined variable: action

2003-06-11 Thread Lars Torben Wilson
On Wed, 2003-06-11 at 13:40, Mark wrote: > Or you can simply turn off NOTICE error reporting in the php.ini file > or use ini_set or error_reporting() to not include notices. This > should not affect functionality. That's not a good idea; it's treating the symptom, not the problem. A better idea

Re: [PHP] Sending TCP/IP string using PHP??

2003-06-11 Thread Lars Torben Wilson
On Wed, 2003-06-11 at 15:58, AES Security - Brian Celenza wrote: > Okay hopefully I can explain this system well enough. > > What I am trying to do is send a tcp/ip request to a visual basic program > using php. > > Is there anyway to send raw data over tcp/ip using php, or how would i be > able

Re: [PHP] getting file contents

2003-06-11 Thread Lars Torben Wilson
On Wed, 2003-06-11 at 10:45, Matt Palermo wrote: > I would just copy the file, but I am not sure how to copy the file and paste > it in the same folder with a different name. Any advice you can give for > that? Thanks. > > Matt I may be missing something, but: copy('/path/to/origname.txt', '

Re: [PHP] 4 hours staring - can't see clear.

2003-06-11 Thread Lars Torben Wilson
On Wed, 2003-06-11 at 15:55, jtjohnston wrote: > Can someone see clearly through what I'm trying to do please? > I've been at this for 4 hours trying to see where I have gone wrong. [snipped] Might something like this work? array ( 'Description' => 'Title: (TI)', 'Option' => 'ST', ),

Re: [PHP] 4 hours staring - can't see clear.

2003-06-12 Thread Lars Torben Wilson
On Wed, 2003-06-11 at 21:00, John Taylor-Johnston wrote: > Lars, > > Thanks. I am getting this error however: > > Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in > > It does not like addslashes() because of the {}? What is a sensible work around? Or > do I ev

Re: [PHP] $_SESSION as $key=>$value

2003-06-13 Thread Lars Torben Wilson
On Fri, 2003-06-13 at 16:28, Daniel J. Rychlik wrote: > I read the document 4 times. I understand how it works and now Im excited > about applying this to my application, however Im running into a problem. > Im recieving an error on my page. > > I have this in my form. > /> > > and when running

RE: [PHP] php editor?

2003-06-14 Thread Lars Torben Wilson
On Sat, 2003-06-14 at 12:59, electroteque wrote: > boy how painfully dweebish is vi why make it harder for yourself :O Please don't start this again. If you want arguments about editors just read the old ones in the archives. It's highly unlikely that any useful new arguments will be made if we st

Re: [PHP] reverse DNS lookup with PHP

2003-06-14 Thread Lars Torben Wilson
On Sat, 2003-06-14 at 14:38, Tom Ray [Lists] wrote: > $_SERVER[REMOTE_HOST]; > > This will do a reverse lookup on their IP. > > Manual Link: > http://ca3.php.net/manual/en/reserved.variables.php#reserved.variables.server Actually, this isn't true. $_SERVER['REMOTE_HOST'] will contain the hostnam

Re: [PHP] is my server working

2003-06-15 Thread Lars Torben Wilson
On Sun, 2003-06-15 at 01:07, Alex Ciurea wrote: > try to use echo instead of print() : > > >> > echo $myString; > >> > > or, if u realy want to use the print function, try this: > > >> > print("$myString", %s); > >> > > maybe will work > > > Alex Ciur

Re: [PHP] Test message

2003-06-15 Thread Lars Torben Wilson
On Sun, 2003-06-15 at 13:28, jb wrote: > Testing news reader Please use a test group for your testing. misc.test is a good bet. -- Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid1

Re: Fwd: Re: [PHP] is my server working

2003-06-15 Thread Lars Torben Wilson
On Sun, 2003-06-15 at 19:56, Khoo Merry wrote: > Hei, everyone > My configuration is working now. Thank's for everybody helps. > My apache is able to parse the .php4 extension. > I found that i shouldn't save my .php4 in document format. I have to > use notepad instead of world pad. I dun know why

Re: [PHP] PHPFI? How to build on Win32?

2003-06-15 Thread Lars Torben Wilson
On Sun, 2003-06-15 at 06:44, DvDmanDT wrote: > Hello... Today I downloaded 'phpfi' from CVS and I was wondering how to > build it? It included no dsw/dsp files so I tried cygwin > ./configure > make > cd src > make > > but it doesn't work... Says like no rules or something... Or that it doesn't >

Re: [PHP] php editor?

2003-06-16 Thread Lars Torben Wilson
On Sun, 2003-06-15 at 22:34, M-Ali Mahmoodi wrote: > if no newer editors? > so the old messages suggest the older! I wasn't suggesting that people not suggest new editors. People just don't need to argue about it (at least, not on the list). Cheers, Torben > "Lar

Re: [PHP] need config file parsing code.

2003-06-16 Thread Lars Torben Wilson
On Mon, 2003-06-16 at 01:14, Daevid Vincent wrote: > So my question is, does anyone have some code (PHP preferred obviously, > but any language should work or be portable) that will take a file of > the form below and split it into the chunks required. Or anything even > close? For example, a 'chun

Re: [PHP] str_replace() problems actually *_replace() problems to bemore accurate

2003-06-16 Thread Lars Torben Wilson
On Mon, 2003-06-16 at 11:49, Thomas Bolioli wrote: > I am a perl/java/c++ programmer who is doing something in php and have > run accross something I am stumped with. I am trying to replace carriage > returns with or tags (p's in groups of two and br's for any > unmatched cr's). I have tried a

Re: [PHP] How to avoid Socket Post output?

2003-06-16 Thread Lars Torben Wilson
On Mon, 2003-06-16 at 13:46, Kevin Stone wrote: > Hello list, > > I'm attempting to use the PostToHost() function to send a request to a > remote script. The purpose for this is to request and retrieve information > from a remote database without the need for messy HTTP & HTML methods. I > real

Re: [PHP] How do I delete a mySQL table?

2003-06-16 Thread Lars Torben Wilson
On Mon, 2003-06-16 at 14:22, zavaboy wrote: > How do I delete a mySQL table? (Just what's in the subject) Well, this is a MySQL question, not a PHP question, but in PHP you would do it like this: mysql_query("DROP TABLE $table_name", $dbh); Just make sure that the user PHP is running as has p

RE: [PHP] need config file parsing code.

2003-06-16 Thread Lars Torben Wilson
On Mon, 2003-06-16 at 15:23, Daevid Vincent wrote: > Off the top of your head huh? Damn... That's some code you churned out > there. Just glanced through it, but I'm impressed you took that much time! > Thanks! I'll clean it up and give it a go. > > d Well, I had just finished writing the core of

Re: [PHP] String containing PHP Code

2003-06-16 Thread Lars Torben Wilson
On Mon, 2003-06-16 at 16:45, Suhas Pharkute wrote: > Hello, > > I have a php script which generates a string which has php code in it. I need to > run that code. > > For example: > > > $str = " "; > ?> > > > Is there any way that we can do it? I know I can do it by writing it to file bu

Re: [PHP] functions, opinion...

2003-06-17 Thread Lars Torben Wilson
On Mon, 2003-06-16 at 23:20, Jason Wong wrote: > On Tuesday 17 June 2003 12:50, DvDmanDT wrote: > > I was replying to "If you don't do it this way, you'll > > find yourself re-writing a function sooner or later because you need it > > to return the data instead of displaying it."... Then you don't

Re: [PHP] Email Valadation

2003-06-17 Thread Lars Torben Wilson
On Tue, 2003-06-17 at 02:42, Philip J. Newman wrote: > How would i valadate an email string to see if it has invalid charactors? > > / Philip Read RFC 822 and grok it thoroughly. Then decide exactly how lax you can afford to be in your checking, or find a checker to download-- because unless you

Re: [PHP] Email Valadation

2003-06-17 Thread Lars Torben Wilson
On Tue, 2003-06-17 at 02:54, Lars Torben Wilson wrote: [snip] > I would suggest checking on ps.sklar.com, Zend.com, phpclasses.org, etc > for some rfc822 checkers. I meant 'px.sklar.com', of course. :/ Torben -- Torben Wilson <[EMAIL PROTECTED]>

Re: [PHP] Password generator

2003-06-17 Thread Lars Torben Wilson
On Tue, 2003-06-17 at 02:45, Davy Obdam wrote: > Hi people, > > I have to make a password generator, but i have a little problem. > > - It needs to generate password 8 characters long, and including 1 or 2 > special characters(like #$%&*@). > - Those special characters can never appear as the fi

Re: [PHP] error with null $HTTP_GET_VARS['field']

2003-06-17 Thread Lars Torben Wilson
On Tue, 2003-06-17 at 11:55, Logan McKinley wrote: > right now if a the 'field' key does not exist at all in the querystring it > returns the following error: > Notice: Undefined index: Register in c:\inetpub\wwwroot\PHP\Register.php on > line 3 > I think i can use the empty function but i pass in

Re: [PHP] bcmod()

2003-06-17 Thread Lars Torben Wilson
On Tue, 2003-06-17 at 11:42, Thomas Bolioli wrote: > The docs (see below) for bcmod() are rather skimpy. Does anyone have a > clue as to how it works. Basically I want to do this (below code). PS: I > am new to PHP but not to programming in general. > Tom Unless you're using arbitrary-precision

Re: [PHP] Re: refreshing fopen

2003-06-17 Thread Lars Torben Wilson
On Tue, 2003-06-17 at 14:10, Bryan Koschmann - GKT wrote: > On Tue, 17 Jun 2003, Terje Torkelsen wrote: > > > > > PHP is server-side language, so this would be possible. Would go for meta tag > > or a javascript. > > > I know, but I thought I saw somewhere there was a way to do this using > flus

Re: [PHP] Ini_set with mutiple include directories

2003-06-17 Thread Lars Torben Wilson
On Tue, 2003-06-17 at 12:08, Mike Morton wrote: > I have an application that I set the include directory using the ini_set > (the application assumes that the client does not have access to the php.ini > files). > > I can set the first include path of course: > ini_set("include_path","/Library/Web

Re: [PHP] MySQL Connection

2003-06-17 Thread Lars Torben Wilson
On Tue, 2003-06-17 at 17:13, [EMAIL PROTECTED] wrote: > Hello, > > Would be grateful if someone couldkindly point me in the right direction. Check the MySQL documentation. You also might want to ask on the MySQL mailing list. http://www.mysql.com/doc/en/Default_privileges.html http://www.mys

Re: [PHP] MySQL Connection

2003-06-17 Thread Lars Torben Wilson
On Tue, 2003-06-17 at 18:19, [EMAIL PROTECTED] wrote: > Hello, This seems not to be working, I am using win2000 and a newbie. please > simplify this process. > > ERROR 1045: Access denied for user: '@127.0.0.1' (Using password: NO) > mysql> GRANT ALL PRIVILEGES ON *.* TO [EMAIL PROTECTED] > -

Re: [PHP] Re: Help with my code

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 08:23, Terje Torkelsen wrote: > To echo multiple lines you have to write > > echo << > > > > > > ... > .. > > END; No offense, but this is completely false. Double-quotes will work just fine. -- Torben Wilson <[EMAIL PROTECTED]>+1.604

Re: [PHP] print all variables

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 08:51, Matt Palermo wrote: > Could anyone tell me how to print all the variables and values from a submitted > form, so that I can check them? > > Thanks, > > Matt print_r($_REQUEST); ...or, depending on the method your form is using, one of: print_r($_POST); //

Re: [PHP] mySQL: Rows and columns

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 10:03, zavaboy wrote: > I know this is more of a mySQL question but, how do I delete and add rows > and columns? > > -- > > - Zavaboy > [EMAIL PROTECTED] > www.zavaboy.com Using the mysql_*() function and the SQL language. The mysql_*() functions are documented here: h

Re: [PHP] Need someone with a fresh mind on tacking this arrayproblem...

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 10:32, Scott Fletcher wrote: [snip] > if ($ArrayCheck == 0) { > $ArrayDataCount['$ODBC_RESULT'] = "0"; What happens when you remove the single-quotes? You're currently defining only one array value, with the key being the literal string '$ODBC_RESULT'--

Re: [PHP] Sessions?

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 11:06, Lee Elenbaas wrote: > Hi, > > I have failed to find the information I am looking for on session management > by PHP do they use cookies? Is there a way to use URL rewriting? How do I > find the timeout time? is there a way to close a session manually? > It seem to me

Re: [PHP] Need someone with a fresh mind on tacking thisarrayproblem...

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 11:11, Scott Fletcher wrote: > Well, the PHP Manual said we should be using the quote (single or double) > inside the array no matter what, it also reduce the side-effect problem. > It's what I read at php.net in the past. That's referring to string literals, but that might n

Re: [PHP] Need someone with a fresh mind on tacking thisarrayproblem...

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 11:45, Scott Fletcher wrote: > Bingo!! I did some PHP re-arrangement and I also do what you were saying > about taking out the quote. It doesn't work with the quote inside and it > work without the quote. What so interesting is that the year is actually a > string so I figu

RE: [PHP] Agh! Driving me crazy!

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 12:56, Michael Sweeney wrote: > Also, you might have problems with the array reference $place[1] not > expanding from within the string - you might need to concatenate the > string around it: > > ...'$cases', '". $place[1] ."', '$iice'... > > ..michael.. No, his syntax with

Re: [PHP] Re: Difference between $_POST[foo] and $_POST['foo']?

2003-06-18 Thread Lars Torben Wilson
On Tue, 2003-06-17 at 07:47, Chris Hayes wrote: > At 16:37 17-6-03, you wrote: > >On Tue, 2003-06-17 at 09:09, nabil wrote: > > > A side question along with this ,,, how can I include > > $_POST['foo'] in the > > > : > > > $sql ="select * from db where apple = '$_POST['foo']' "; > > > > > > wit

Re: [PHP] picture help

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 13:39, Edward Peloke wrote: > Hello all, I have this code that takes an image sent from a form and resizes > it for a thumbnail and for display, the problem is the pictures look nice > until this does the resizing, then the quality is horrible...can I fix it? > > Thanks, > Ed

Re: [PHP] .htaccess files

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 15:34, Steve Marquez wrote: > Hello everyone, > > Could someone point me in the direction of some info on .htaccess files? > Could someone send me one, tell me where to put it in my > server? I hope this is not a stupid question. I am running Apache on a Mac > with Jaguar OSX

Re: [PHP] User's Screen Resolution Size

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 21:13, Leif K-Brooks wrote: > You're using PHP, but not everything you do has to do with PHP! You may > use PHP, but that doesn't mean you post to the PHP list about home > decorating! I have no idea where you folks have gotten the idea that asking how to get Javascript to

Re: [PHP] User's Screen Resolution Size

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 21:42, Leif K-Brooks wrote: > Lars Torben Wilson wrote: > > >I have no idea where you folks have gotten the idea that asking how to > >get Javascript to interact with PHP would be particularly off-topic > >here. Were it the vile transgression this t

Re: [PHP] forms addslashes ?

2003-06-19 Thread Lars Torben Wilson
On Thu, 2003-06-19 at 05:27, Mukta Telang wrote: > Hi, > I want to add slashes to a string, if it contains quotation marks and > which is received as input from a form, so that I can enter it to a > database. > What I am doing is as follows: > > echo "; > $title=addslashes($title); > > But the st

Re: [PHP] [Newman] Passing an image through a php file.

2003-06-20 Thread Lars Torben Wilson
On Thu, 2003-06-19 at 20:19, Mark Tehara wrote: > > $myimage="..//..//site//images//2.jpg"; > > header("Content-type: image/jpeg"); > fopen ("$myimage", "r"); > readfile("$myimage") ; > fclose("$myimage"); > > ?> > > This seemed to do the trick for me. Thank you. > > / Mark Even better, you

Re: [PHP] [Newman] Passing an image through a php file.

2003-06-20 Thread Lars Torben Wilson
On Fri, 2003-06-20 at 12:07, Mark Tehara wrote: > Ahh, the Docs don't tell you that. > > They are a little weard wehen it comes to that How so? int readfile ( string filename [, bool use_include_path [, resource context]]) It does say 'filename', not 'resource'. Seems pretty unequivocal. H

Re: [PHP] Chomp, Chomp, Chomp

2003-06-20 Thread Lars Torben Wilson
On Fri, 2003-06-20 at 15:37, Sparky Kopetzky wrote: > Does anyone have a piece of code that emulates a Perl 'Chomp' function? I need one. > > Thanks in advance!! > > Robin E. Kopetzky > Black Mesa Computers/Internet Services > www.blackmesa-isp.net This should do it for you: http://www.php.net/

Re: [PHP] Chomp, Chomp, Chomp

2003-06-20 Thread Lars Torben Wilson
> Sparky > - Original Message - > From: "Lars Torben Wilson" <[EMAIL PROTECTED]> > To: "Sparky Kopetzky" <[EMAIL PROTECTED]> > Cc: "PHP General" <[EMAIL PROTECTED]> > Sent: Friday, June 20, 2003 16:47 > Subject: Re: [PHP] Chom

RE: [PHP] Chomp, Chomp, Chomp

2003-06-20 Thread Lars Torben Wilson
On Fri, 2003-06-20 at 16:16, Aaron Axelsen wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > The php chop function is suppose to act like the perl chomp. No, chop() is an alias for rtrim(), and is identical in every way (save for its name, of course...) http://www.php.net/chop C

Re: [PHP] Not incrementing?

2003-06-20 Thread Lars Torben Wilson
On Fri, 2003-06-20 at 17:07, Kyle Babich wrote: > I have a file, current.txt, that at the start has only the digit 1 in it. Here is > my code: Hi there, > $current = readfile('setupData/current.txt'); This will cause $current to contain the number of bytes read from the file, not the contents

Re: [PHP] securing a graphic

2003-06-21 Thread Lars Torben Wilson
On Sat, 2003-06-21 at 00:51, Justin French wrote: > I'm with Steve on this. Call them (the numerous "hacks" mentioned in this > thread) deterrents if you like, but there is NO WAY to secure images. > > You can brand them with a big watermark, and make sure your copyright and > terms of use notice

Re: FW: [PHP] How do I get the exit code of an external program?

2003-06-22 Thread Lars Torben Wilson
On Sun, 2003-06-22 at 20:19, Daevid Vincent wrote: [snip] > http://us3.php.net/manual/en/function.exec.php > string exec ( string command [, array output [, int return_var]]) > exec() executes the given command, however it does not output anything. It > simply returns the last line from the resul

Re: [PHP] Passing objects into methods or functions

2003-06-23 Thread Lars Torben Wilson
On Sun, 2003-06-22 at 23:20, Gerard Samuel wrote: > Im trying to pass an object into functions and class methods, and for some > reason, Im unable to access the object's methods. > When I var_dump() the object, its a valid object with the function or > class method. > When I check via get_class_me

Re: [PHP] set_error_handler always returns false

2003-06-23 Thread Lars Torben Wilson
On Mon, 2003-06-23 at 15:12, Jeff Stewart wrote: > I'm using PHP 4.3.1 as an Apache module. No matter what I try, I can't get > set_error_handler() to do anything other than return false. Under what > circumstances does this happen? > > function doobee($errno, $errstr, $errfile, $errline, $errc

Re: [PHP] PHP parser extension?

2003-06-24 Thread Lars Torben Wilson
On Mon, 2003-06-23 at 03:21, anzenews wrote: > Hi! > > I hope this is the right newsgroup for posting this... PHP.dev doesn't seem > to be alive anymore? > > Is there some extension or anything that would allow me to hook my code to > PHP parser? Even lex and yacc for PHP would be great... Hav

  1   2   3   4   >