[PHP] Re: 2 decimal places

2001-09-26 Thread Geir Eivind Mork
Kurth Bemis wrote: i'm looking for a php function to add 2 decimal place sto a number. if the number already have one decimal place then one more zero should be added to make it two decimal placesanyone know of a quick way to do this? printf(%.2f,$var); -- PHP Developer, home:

[PHP] Re: showing wrong php version after install

2001-09-26 Thread Geir Eivind Mork
Caleb Carvalho wrote: just finished installing php-4.0.6, now when writing the test.php page with the ?phpinfo();? Try again after you restarted apache ;) -- PHP Developer, home: http://www.moijk.net | work: http://www.coretrek.com tan: Tangent |

[PHP] Re: handling errors

2001-09-26 Thread Geir Eivind Mork
Joseph Bannon wrote: have this function below that if an image is not there for $url, it give a warning. $size = GetImageSize($url); Just use $size = @GetImageSize($url); but to stop display of error for all functions: error_reporting (0); the opposite, reports EVERYTHING, even bad

[PHP] Re: Making session last

2001-09-25 Thread Geir Eivind Mork
Martin wrote: The sessions-functions works really fine. But I got one Problem: How can I make the php-session last more then a browser-session? When the users Now it isn't a 'session' for nothing, for your use I guess cookies and storage of state in database is a much better thing. to make

[PHP] Re: Image manipulation

2001-09-07 Thread Geir Eivind Mork
Adam Plocher wrote: First of all, is there anyway I could have my script take a full size image and crop out a chunk of it to be used as a thumbnail - or just simply shrink the image down to be used as a thumbnail? ImageCopyResized, requires GD. Also, is there anyway to convert misc image

[PHP] PDFLib and php 4.0.5

2001-05-14 Thread Geir Eivind Mork
After a great deal of swear words, preassure from my boss and numberous tries I now cry out for help. Can anyone compile a howto on installing pdflib so tha tit works with php 4.0.5 ? I've tried so many times and neither me or our sysadmin can manage to make php understand that I really need

Re: [PHP] PHP: Variables in TITLE

2001-05-14 Thread Geir Eivind Mork
Tarrant Costelloe wrote: I have a log in script written in PHP4 which accesses a secure server. Once entered I want the the secure page to hold the users name (from variable) in the TITLE header Something along the lines of this: title$name is logged in/title Obiously I have tried that

Re: [PHP] Image Upload

2001-05-07 Thread Geir Eivind Mork
Kyle Mathews wrote: I'm looking for some code that will upload images to my server from a form submission. I'd also like it to check for a max file size of the images. Any help would be appreciated. what about reading the manual? there are variables that contain the file size.

Re: [PHP] best ide for windows

2001-05-06 Thread Geir Eivind Mork
On Sunday 06 May 2001 14:57, Alexander Bierbrauer wrote: does anyone know a good PHP developer IDE for Windows?? I'm using PHP Coder but it's a little bit to buggy. slickedit is what I preffer to use, you got syntax highlighting, api help, function tagging so that you get info about your own

Re: [PHP] how?

2001-05-04 Thread Geir Eivind Mork
On Thursday 03 May 2001 17:30, Jason Stechschulte wrote: On Thu, May 03, 2001 at 03:56:55PM -0700, elias wrote: i even tried the eval() which should work, but it didn't, scroll down to message with Subject: $hello I don't think you understand eval(). Either that or I don't. If I

Re: [PHP] HI

2001-05-03 Thread Geir Eivind Mork
On Thursday 03 May 2001 09:55, Jorge Amaya wrote: I am new user of php, I have installed apache 1.3.x, php3 and mysql, but I have a problem, My navigator doesn't recognize the files of php3, that why install php3, not php4 ? is to say it doesn't work me php in the navigator, I have

Re: [PHP] Compressing an upload

2001-05-02 Thread Geir Eivind Mork
On Thursday 26 April 2001 00:37, Michael Conley wrote: I am going to have a page that will be used for visitors to upload a file to my web server. I already use gzcompress to compress some of the pages Just state that all files should be compressed cause you can't do anything with the files

Re: [PHP] php suck

2001-04-30 Thread Geir Eivind Mork
On Sunday 29 April 2001 12:54, idban secandri wrote: i found this when surfing this morning http://www.phpsucks.net/ The site www.phpsucks.net is running Apache/1.3.17-twelveHTTP (Unix) PHP/4.0.4pl1 on Linux. is it just me or is it a mirror of the old php site with the text 'Hyped text

Re: [PHP] Problem with the HTTP_REFERER

2001-04-27 Thread Geir Eivind Mork
On Thursday 26 April 2001 13:33, Rosen wrote: main.php: A HREF=test.php target= _blankClick here/A You need a good deal of beating if you do your markup like that. there are something called a standard and that standard would make that line look like this: a href=test.php but

Re: [PHP] Why is it dangerous to have register_globals on?

2001-04-24 Thread Geir Eivind Mork
On Monday 23 April 2001 11:56, Greig, Euan wrote: I have read in several places that is dangerous to have register_globals on, but I have not understood the (short) explanations given. Can anyone enlighten me? keep it a rule to either unset any variable that you use or set them with a

Re: [PHP] Fatal Errors and Error Handling

2001-04-24 Thread Geir Eivind Mork
http://www.php.net/manual/en/features.error-handling.php have you taken a deeper look into this? Well, I have tried... And what kind of problem did you encounter? My problem is that not displaying anything in case of an error is a completely unacceptable solution. I *MUST* return a

Re: [PHP] Connecting to a MS Access database

2001-04-23 Thread Geir Eivind Mork
On Sunday 22 April 2001 22:02, Steve Maroney wrote: This brings up a question that I always wondered. Does Access have server functionality? Where do you configure these settings ? If you go over the menuchoice - file, shake your mouse, bite in the cord, slam your head in the monitor

Re: [PHP] Re: Linux Suggestion

2001-04-23 Thread Geir Eivind Mork
On Sunday 22 April 2001 23:51, Padraic Tynan wrote: You know, that's a tad rude, just suggestion an OS switch like that. :รพ I mean, my http server isn't the only thing I run -- this is my personal use computer. I run linux and freebsd on my personal and work computer(s). but that's my

Re: [PHP] What's wrong with this code?

2001-04-23 Thread Geir Eivind Mork
On Monday 23 April 2001 08:59, Alexander Wagner wrote: Tyler Longren wrote: $file = fopen(includes/about.inc, r); $data = fread($file, 2400); $file = includes/about.inc; if ($fp = fopen($file,r)) { $data = fread($fp,filesize($file)); fclose($fp); } ought to work. -- php

Re: [PHP] if... then... else with HTML

2001-04-23 Thread Geir Eivind Mork
On Monday 23 April 2001 14:41, Martin Thoma wrote: if ($word != flat) { echo OUT lot of crap with 's and stories about your mom OUT; } else { echo OUT do the same OUT; } remember not to have anything before or after OUT (or whatever other text you use instead of OUT) or you get prase

Re: [PHP] Newbie Question

2001-04-23 Thread Geir Eivind Mork
On Monday 23 April 2001 17:34, Taylor, Stewart wrote: You've got some typo's if (my_type != 0){ -- if ($my_type != 0) { if ($my_type) if it's a check if it's true, not-equal-ing it to string 0 is a ugly way to do it. just my two cents. -- php developer / CoreTrek AS| Forest

Re: [PHP] Fatal Errors and Error Handling

2001-04-23 Thread Geir Eivind Mork
On Monday 23 April 2001 17:29, Svein Roar Nilsen wrote: And I see no reason why we should not be allowed to handle most of the fatal errors we get on our own. Especially annoying is the xslt_process() function that returns something like brbFatal error/b: XML parser error 7: mismatched tag

Re: [PHP] Buttons and such...

2001-04-22 Thread Geir Eivind Mork
On Saturday 21 April 2001 20:15, Jason Caldwell wrote: I know this is off-topic -- please forgive me. But I figure someone here would know. I'm looking for some really nice *professional* looking (submit, logon, buy, help, etc) buttons for my website... I've done all kinds of try do

Re: [PHP] I'm a moron. So?

2001-04-22 Thread Geir Eivind Mork
On Saturday 21 April 2001 04:42, [EMAIL PROTECTED] wrote: Alrighty. I'm baack! Anyways, I seem to be having stupid little problems, al of which are driving me insane. I'll feel really stupid when you tell me the problem. A friend told me something about "seeding" for random() but I

Re: [PHP] Which is better coding style...

2001-04-20 Thread Geir Eivind Mork
On Thursday 19 April 2001 21:48, Steve Lawson wrote: Personally, I hate trailing {'s Personally, I hate having the {'s on the next line. I always trail them in others code when they have them on the next line :) and there are thousand of ways that the people here displays textblocks. some

Re: [PHP] Newbie Help!! Please Look!

2001-04-19 Thread Geir Eivind Mork
On Thursday 19 April 2001 05:18, Tony Daniels wrote: I need to know if there is a program out there that I can use to edit the PHP files. I use CuteFTP to download the files from my server as I www.homesite.com www.ultraedit.com www.slickedit.com I assume this have uploadfeatures, atleast

Re: [PHP] need help

2001-04-18 Thread Geir Eivind Mork
On Wednesday 18 April 2001 08:38, chris herring wrote: this is really buggin me... i've got this free-for-all that i want to make, and everything seems logical, but I did a quick rewrite here. it adds links as people enters them :) ? echo END form method="POST"

Re: [PHP] PHP + IRC

2001-04-05 Thread Geir Eivind Mork
On 04 Apr 2001 16:53:28 -0400, John Donagher wrote: There is an irc (ircg) extension now, although it is undocumented in the manual. Who do one have to bribe/kill/beat to get the info about that when one hasn't time/knowledge enough to snoop around in the sources? -- php developer /

Re: [PHP] PHP + IRC

2001-04-05 Thread Geir Eivind Mork
On 05 Apr 2001 03:32:10 -0400, Jack Dempsey wrote: vent It'd be nice to have someone to do our dirtywork for us, but this list isn't (IMHO) about finding people who DO have the time/knowledge to "snoop around in the sources" for us... Where is the sense of humor? :) I just asked if anyone

Re: [PHP] PHP + IRC

2001-04-05 Thread Geir Eivind Mork
On 05 Apr 2001 03:32:10 -0400, Jack Dempsey wrote: vent It'd be nice to have someone to do our dirtywork for us, but this list isn't (IMHO) about finding people who DO have the time/knowledge to "snoop around in the sources" for us... Where is the sense of humor? :) I just asked if anyone

Re: [PHP] any other way ?

2001-04-05 Thread Geir Eivind Mork
On 04 Apr 2001 17:25:14 +0100, TV Karthick Kumar wrote: Instead I would like to get rid of one comma in between the email address and just display and sepearte it with only comma, instead of two commas and it should work for all the combinations that's possible. What are the

Re: [PHP] Select case equivelent

2001-04-05 Thread Geir Eivind Mork
On 05 Apr 2001 11:53:21 +0200, Christian Reiniger wrote: switch ($foo) { case "bar1": $foobar="fooey"; break; etc... default: $foobar = "NoBar"; } I have a list of conditions I want to test against. In ASP, I would do: How do I do the equivelent in PHP? Try reading the

[PHP] read headers.

2001-04-04 Thread Geir Eivind Mork
Is there any 'easy' way I can get the html headers receved when making a http connect? -- php developer / CoreTrek AS| Moody bitch with attitude, seeks nice, Sandnes / Rogaland / Norway| good-looking guy to dump on. web: http://www.moijk.net/ | -- PHP General

Re: [PHP] read headers.

2001-04-04 Thread Geir Eivind Mork
On 04 Apr 2001 03:15:25 -0500, Plutarck wrote: As in when you pull up a site in your browser, or when you use a script to make an http connection to another site? I want to make a connection to a foreign webserver and fetch the headers as well as the content. I was wondering of a 'painless'