[PHP] Re: date format from a database date field

2007-05-23 Thread Johan Holst Nielsen
? Currently the command I have is print $row['open']; Well the easiest thing is to let MySQL do the work use following SELECT SELECT DATE_FORMAT(your_date_field,'%m-%d-%Y') as date_field FROM yourtable That should do the work... -- Johan Holst Nielsen Freelance PHP Developer - http://phpgeek.dk

[PHP] Re: ftp root dir?

2007-05-22 Thread Johan Holst Nielsen
server. It can be whereever on the server. It depends on the configuration of the FTP server ;) -- Johan Holst Nielsen Freelance PHP Developer - http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP Data Mining/Data Scraping

2007-05-20 Thread Johan Holst Nielsen
with that :) www.php.net/curl -- Johan Holst Nielsen Freelance PHP Developer - http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Problem with _one_ CE chars - GD library

2004-06-10 Thread Johan Holst Nielsen
Hi, Im doing some dynamic image creation with GD library - and I really wonder why I can't get the last character printed out on the image :( I use this file to encode the font: http://phpgeek.dk/ng/88592.enc.txt And the font I use is Frutiger CE 45 Light... I wonder if it is the font that are

[PHP] Re: Problem with _one_ CE chars - GD library

2004-06-10 Thread Johan Holst Nielsen
Johan Holst Nielsen wrote: Any one tried such problems? Any solution for that? And is it the font, the encoding file - or something else that are wrong? Okay, I found the solution :) I was the encoding file that was wrong... The /dbar should be replaced with /dcroat Now everything works

[PHP] Re: Getting Server time

2004-06-10 Thread Johan Holst Nielsen
Alex Hogan wrote: When I'm using the time() function am I getting the time on the server? If not how can I get the time from the server regardless of whether or not its in the same time zone as the client. Use the gmdate() function. http://php.net/manual/en/function.gmdate.php -- Johan Holst

[PHP] Re: installing php4 in windows 2000

2004-05-31 Thread Johan Holst Nielsen
if the DocumentRoot is right in your httpd.conf - it should be the same as the location where phpinfo.php is located. -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: including an html file!!

2004-05-30 Thread Johan Holst Nielsen
('htmfile.html'); ? Check the documentation http://php.net/include - include returns 1 - thats why it is printed out when you do echo :) -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: including an html file!!

2004-05-30 Thread Johan Holst Nielsen
: includeFile.php ?php $foo = Test with return; return $foo; ? ?php $bar = include(includeFile.php); echo $bar; //Output Test with return ? -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP] Re: Data reading and writing for a chat

2004-05-30 Thread Johan Holst Nielsen
- or use a database :) -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Associative array question

2004-05-30 Thread Johan Holst Nielsen
of age. Is there a way to do this? No sure what you mean... but it is possible this way: ?php foreach($myFriendsAges as $name=$age) { echo My friend .$name. is .$age. years of age.br\n; } ? -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http

[PHP] Re: Query Query

2004-05-30 Thread Johan Holst Nielsen
='$mod_dataset'; What does mysql_error() says? Tried to print out the query and execute it directly in the mysql prompt or phpmyadmin? What happens then? -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] CVS web front end

2004-05-29 Thread Johan Holst Nielsen
Lists wrote: tortoise is nice http://www.tortoisecvs.org/ As far as I can see, it have nothing to do with an web frontend? -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] CVS web front end

2004-05-29 Thread Johan Holst Nielsen
browser... Anyway - thanks for the link to tcvs :D I have downloaded it and I like it :D -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Using '/' instead of '?' in url querystring

2002-10-07 Thread Johan Holst Nielsen
When sending variables this is the normal way to do it: /foo.php?id=12 But I have read that the following URL should work: /foo.php/12/ and then fetch the id in this way: $id = ereg_replace('[^0-9]', '', $PATH_INFO); I have even seen it in function but the problem is that I can't get

[PHP] Find DPI ing image?

2002-09-12 Thread Johan Holst Nielsen
Hi people... Anyone know a class or a solution so I can find the DPI (dot per inch) of an image? getImageSize do not help me? Any other solutions? Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newbie needs help

2002-07-24 Thread Johan Holst Nielsen
Neil Freeman wrote: mysql_db_query has been depreciated since PHP 4.0.6 Yep.. but thats not the only different... mysql_db_query() have an extra parameter that is what Database you want to execute your query in... mysql_query() just use the database you have selected with f.ex.

[PHP] Re: How to Detect File in a Specifc Directory on Window Env?

2002-07-19 Thread Johan Holst Nielsen
?php //DATEFORMAT MMDD if($dir=@opendir(/yourdirwithpdf)) { echo Found following files: while(($file=readdir($dir))!==false) { if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf)) { echo 'a href='.$file.''.$file.'\n'; } } } ? UPS if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf,

[PHP] Re: How to Detect File in a Specifc Directory on Window Env?

2002-07-19 Thread Johan Holst Nielsen
Johan Holst Nielsen wrote: ?php //DATEFORMAT MMDD if($dir=@opendir(/yourdirwithpdf)) { echo Found following files: while(($file=readdir($dir))!==false) { if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf)) { echo 'a href='.$file.''.$file.'\n'; } } } ? UPS if(ereg

[PHP] Re: How to Detect File in a Specifc Directory on Window Env?

2002-07-19 Thread Johan Holst Nielsen
Jack wrote: Dear all I had a folder which contains a lot of pdf file, the name format of the pdf files are : x.dateformat.pdf (eg : abcdefg.20020718.pdf). Now i want to use the php script to detect what files it got in a specific folder. i want to make a user input form which will let

Re: [PHP] mysql error or PHP

2002-07-15 Thread Johan Holst Nielsen
Justin French wrote: try add_slashes($string) before inserting into the database, or turn on magic quotes in php.ini Or Mysql_Escape_String() http://www.php.net/manual/en/function.mysql-escape-string.php Or Mysql_Real_Escape_String()

[PHP] Re: 1 Form, 2 Submit-Buttons

2002-07-12 Thread Johan Holst Nielsen
Hello! I want to make a form (a wizard) which has 2 Submit-Buttons (Back Next). The buttons should be images. How can I make php see, which button has been pressed? ?php if(isset($_POST[submit_back])) { //go back } else { //go forward } ? form action=?=$_SERVER[PHP_SELF]?

[PHP] Re: 1 Form, 2 Submit-Buttons

2002-07-12 Thread Johan Holst Nielsen
Johan Holst Nielsen wrote: Hello! I want to make a form (a wizard) which has 2 Submit-Buttons (Back Next). The buttons should be images. How can I make php see, which button has been pressed? ?php if(isset($_POST[submit_back])) { //go back } else { //go forward

[PHP] Re: Newbie Logical opertaor question

2002-07-11 Thread Johan Holst Nielsen
Rw wrote: I have been trying this to no avail. Tryng to say the equivalent of: IF (var1 = 1 AND var2 = a or b or c) i.e. yield true if 1 and a OR 1 and b OR 1 and c I would do something like this: $CheckArr = array(a, b, c); if($var1 == 1 in_array($CheckArr, $var2)) { . }

[PHP] PHP and Apache2?

2002-07-10 Thread Johan Holst Nielsen
Hi, Anyone know how long the developers is from a finale release that support Apache 2? Please advice! Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: cookie ?

2002-07-10 Thread Johan Holst Nielsen
(yes it's me again) i've got an other problem. i've got an login system, and it has to put an cookie, but it seems he doesn't do it. is it an php.ini problem ?? Dont think it a php.ini file. First of all. Remember to set the cookie before any other headers is sent to the browser. Do you

[PHP] Re: cookie ?

2002-07-10 Thread Johan Holst Nielsen
it's not the browser or what so ever, i installed php 4.2.1. with apache 1.3.24 on a Redhat 7.1 server. but becuas for some kind a reason it wont work :( any body got an idea ?? try to get the cookie witgh $_COOKIE[cookiename]; if you have register_globals = off! Regards, Johan

Re: [PHP] Re: cookie ?

2002-07-10 Thread Johan Holst Nielsen
Do you remember to reload the page after the cookie is sent? (some browser cant see the cookie at the page it sent but first after it have been reloaded!). Actualy this is not browser issue but PHP issue Aah, sorry... but it doesn't matter in this case, it could be one of the errors?

[PHP] Re: cookie ( still not working )

2002-07-10 Thread Johan Holst Nielsen
my cookie problem is still not solved :( my browser settings are correct, and the script has worked. but sins i now installed php 4.2.1 with apache 1.3.24 it doesn't work :( does any one have an solution ?? thnx in advance, Sure about your register_globals = off? please show us the

[PHP] Re: array question--help

2002-04-28 Thread Johan Holst Nielsen
($OutputArray); //Print out the array, to check the values! ? Please reply if this doesn't work? By the way... if you got further problems, please tell us which version of PHP you use. Regards, Johan Holst Nielsen www.weknowthewayout.com -- PHP General Mailing List (http://www.php.net

Re: [PHP] Won't save session ids?

2002-04-26 Thread Johan Holst Nielsen
Kirk Johnson wrote: The coding style needs to match the register_globals setting in php.ini. register_globals on: $accountsession = $session; $accountemail = $email; session_register(accountsession); session_register(accountemail); Oh, sorry... I have just tried so many ways... but

[PHP] Won't save session ids?

2002-04-25 Thread Johan Holst Nielsen
the sessions. session_start(); echo Email:.$HTTP_SESSION_VARS[accountemail].br.$HTTP_SESSION_VARS[accountsession]; But i just get a Email: without any content? Please help me? Someone know whats wrong? Best Regards, Johan Holst Nielsen -- PHP General Mailing List (http://www.php.net

Re: [PHP] Looping?

2001-12-14 Thread Johan Holst Nielsen
How can I make the following work: function start($times) { for...loop starts here... { -- notice only one bracket. } function end() { } -- the ending bracket. } start('10'); html-code... I want this to be repeated 10 times. end(); Try

[PHP] Generating PDF...

2001-12-11 Thread Johan Holst Nielsen
Hi, I just have some few question. I hope you can help me, with some links or some information :o) I've to create some pdf files, but the problem is that it have to be printed later. So it have to be in i quality about 304 dpi. I dont know a lot about PDF. Can anyone help me please? Send me

Re: [PHP] Generating PDF...

2001-12-11 Thread Johan Holst Nielsen
of these images would affect your output. And PHP is fine for generating PDF with. See http://php.net/pdf -Rasmus On Tue, 11 Dec 2001, Johan Holst Nielsen wrote: Hi, I just have some few question. I hope you can help me, with some links or some information :o) I've to create some pdf files

[PHP] [ Re: [PHP] Re: Image problem]

2001-12-07 Thread Johan Holst Nielsen
Original Message From: - Fri Dec 07 14:52:01 2001 X-Mozilla-Status: 0001 X-Mozilla-Status2: Message-ID: [EMAIL PROTECTED] Date: Fri, 07 Dec 2001 14:51:56 +0100 From: Johan Holst Nielsen [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Organization: 1WAY2PRINT A/S User

[PHP] Statistic analyze for Apache log

2001-12-04 Thread Johan Holst Nielsen
Hi Anyone know a good PHP application that generate statistic from apachelog? Please send me an URL. Regards, Johan -- 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

Re: [PHP] Statistic analyze for Apache log

2001-12-04 Thread Johan Holst Nielsen
Message - From: Johan Holst Nielsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 10:51 AM Subject: [PHP] Statistic analyze for Apache log Hi Anyone know a good PHP application that generate statistic from apachelog? Please send me an URL. Regards, Johan -- PHP

Re: [PHP] Statistic analyze for Apache log

2001-12-04 Thread Johan Holst Nielsen
If you find this out off list could you let me know as well. I can only find C++ and Perl scripts. Ok, thinking about programming if it don't exists. So I let you know when it's ready :o) Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] problem with ImageCreateJPEG ...

2001-12-04 Thread Johan Holst Nielsen
sorry for taking your time, but I still dont understand why I got errors with pjeg... I use the following code on other machine with jpeg support to , and it works, while in my machine I got an empty jpeg file ? Header(Content-type: image/jpeg); $im=ImageCreate(400,200); $bcg =

Re: [PHP] URGENT-HELP !!!!!!

2001-11-30 Thread Johan Holst Nielsen
Want to send mail through PHP script such that the receiver of that mail should not contain FROM header. I used mail() function with empty FROM header and even without FROM header, but the receiver is still getting FROM address as [EMAIL PROTECTED] You can't. The mail specification

Re: [PHP] URGENT-HELP !!!!!!

2001-11-30 Thread Johan Holst Nielsen
available, send email with subject: Send PGP Key - Original Message - From: Chamarty Prasanna Kumar [EMAIL PROTECTED] To: Johan Holst Nielsen [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, November 30, 2001 10:54 AM Subject: Re: Re: [PHP] URGENT-HELP !! Thanks very much

Re: [PHP] URGENT-HELP !!!!!!

2001-11-30 Thread Johan Holst Nielsen
I am talking about the final SMTP host.. it will do a reverse lookup on the From: domain and if it dont resolve to the IP of the sending STMP host it will reject it. yes I know. But it the final SMTP tries to resolve the host (localhost) it will get a response from it self? I haven't tried

Re: [PHP] Going blind?

2001-11-21 Thread Johan Holst Nielsen
$result=@mysql_query($qry,$connection); Try make a line after this: echo mysql_errno().: .mysql_error(); What is the output? Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

Re: [PHP] words in a string

2001-11-17 Thread Johan Holst Nielsen
i want php to do an IF, when he founds a special word in a string (ex: text_-_write_-_text ) .. i m not able to manage it .. ?php function doThis($x) { //something? $result = $x. phplover; return $result; } $string = Hi whats your name? Hi whats your name?; $string_arr = explode( ,

[PHP] Re: Sending mail without using mail()

2001-11-16 Thread Johan Holst Nielsen
Ok, where can I find a tutorial about sending mail using fsockopen ? *** http://www.phpbuilder.com/columns/tim19990221.php3 Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

Re: [PHP] Re: I suck at regular expressions!

2001-11-15 Thread Johan Holst Nielsen
Richard S. Crawford wrote: Not quite. I have the same problem. I tried at test on my localhost. Following works for me: $string = htmlheadtitleSometime i dont wanna know/title/headbody/body/html; if(eregi(title(.+)/title, $string, $arr)) { echo Title: .$arr[1]; } else { echo unknown

[PHP] Re: how can I get the post content in php

2001-11-15 Thread Johan Holst Nielsen
the program just can let me get the post string like my example I want post the xml file content to a php file, then I want get the post string that it's xml content. hehe, thanks for your help Did you solve your problem? I dont think i understand you, but i tries to give a little

[PHP] Re: how can I get the post content in php

2001-11-15 Thread Johan Holst Nielsen
I think you understand my problem. I will use a client program to POST the XML data to a php file on the server base HTTP in php file will get the post request, the question is, how can i get the xml data in post request Hmm, I dont think I understand? Where do you want to do with the

[PHP] Re: Fatal error: Call to undefined function: imagecreate()

2001-11-15 Thread Johan Holst Nielsen
I know it's probabally overkill but in the configure messages, it says yes for everything gd, jpeg, png, and zlib. Any suggestions? If anybody wants to see the configure messages let me know. What do PHP tells you about the GD lib extension. Try making a phpinfo() file and send the output in

[PHP] Re: JPG Images from database to filename.jpg

2001-11-15 Thread Johan Holst Nielsen
Header(Content-type: image/jpeg); echo $Images; I can't figure out how to create the header. There's lots of examples of how to do the above, but I have yet to stumble across an example which allows you to write the header into a file You could make a PHP script that generate the

[PHP] Re: Controlling length of table data

2001-11-14 Thread Johan Holst Nielsen
This is really a combination html/php question, I believe. The problem is that I have a table that displays a field of text that can be several hundred bytes long. If, however, someone holds down a key and produces 500 letter 'x' the table data then distorts the table! Since the length of

[PHP] Re: Session help

2001-11-14 Thread Johan Holst Nielsen
Start at index.html. It goes to postcard.php. When I click on submit in postcard.php, if I change any of the values in the form, the session values received in send_mail.php do not change. Anyone have an idea what I have done wrong now? Try to make a session_unregister(), and make

[PHP] Re: mail() function

2001-11-14 Thread Johan Holst Nielsen
$mailheaders = From: \Do Not Reply\\r\nReply-To: Do Not Reply@Do Not Reply\n; If I use the above headers it says from Do Not [EMAIL PROTECTED] Does anyone know how to make it just say Do Not Reply? You cant... but try making it like this: $mailheaders = FROM: Do Not Reply

[PHP] Re: PHP + apache .htaccess

2001-11-14 Thread Johan Holst Nielsen
After I research security issue from the web, I had found apache .htaccess which can solve my problem. What my problem is that, can .htaccess perform like a database system which can store users loginID and password, and also set those users have a expired time each ?? If you want to

[PHP] Re: PHP + apache .htaccess

2001-11-14 Thread Johan Holst Nielsen
then, can .htaccess store the user expried date ? like Peter is not allowed to login after 2Feb 2001, Sam is expired after 11Nov 2002.. Yes and no. You just have to make a change in the .htaccess file. and also, is it possible to maintain the .htaccess automatically ? like I write a

[PHP] Re: I suck at regular expressions!

2001-11-14 Thread Johan Holst Nielsen
Richard S. Crawford wrote: I am trying to get the title of an html file... you know, the string between the title and /title tags... Here is the function I've got so far: function fileTitle($fileName) { $myFile = fopen($fileName, r); $myText=; while

[PHP] Re: how can I get the post content in php

2001-11-14 Thread Johan Holst Nielsen
I mean post content string not a lot of variables etc: aaa.html post a=1b=2 to bbb.php I want use php to read the string a=1b=2 not $a and $b I not sure I understand you, but are you looking for $HTTP_SERVER_VARS['QUERY_STRING'] ?? Regards, Johan -- PHP General Mailing List

[PHP] Re: how can I get the post content in php

2001-11-14 Thread Johan Holst Nielsen
$HTTP_SERVER_VARS['QUERY_STRING'] -- it just can read the content by GET method. I want POST content Ah okay. Try this: $post_query = ; $keys_arr = array_keys($HTTP_POST_VARS); $keys_size = sizeof($key_arr); for($i=0; $i$keys_size; $i++) { if($i == 0) { $post_query .=

[PHP] Question about PDF lib.

2001-08-27 Thread Johan Holst Nielsen
Hi Do anyone know, how i define the width, height etc. parameters in PDFlib functions in PHP? Is it in cm, pixels, inch? Or? Anyone know? I need to generate printingfiles, so I hope I can use cm or sometime like that :o) Regards, Johan -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] running php scripts

2001-07-17 Thread Johan Holst Nielsen
We're running suse 7.1 and apache on the server containing the information, and the problem is I don't know how to make linux run the php script, or how to set up crobtab with the php script in mind. anyone have any ideas? You can use this Tutorial

RE: [PHP] php as cron

2001-06-21 Thread Johan Holst Nielsen
try etc. 00,30 * * * * lynx -dump http://path.to.php.script /dev/null Regards Johan Hi I have PHP installed as Apache module but I want to run a cron job. I have .php script that works OK when executed through browser but is there any way I could execute it through a cron job. Ajdin

[PHP] PHP conference?

2001-06-20 Thread Johan Holst Nielsen
Anyone know when and how you can sign upfor the conference in Franfurt (5-7 Nov 2001)? Can't find any information at there website, someone who can help me?! :o) Regards Johan

[PHP] PHP conference?

2001-06-20 Thread Johan Holst Nielsen
Anyone know when and how you can sign upfor the conference in Franfurt (5-7 Nov 2001)? Can't find any information at there website, someone who can help me?! :o) Regards Johan

[PHP] Problem with writing text with GD

2001-04-11 Thread Johan Holst Nielsen
Hi I have a problem with GD library. Then I write some text with the GD library TTF function I get a very unreadable text :o( The problem comes then the font is in size 9 and under! Some know how to solve this problem? /Johan -- PHP General Mailing List (http://www.php.net/) To

SV: [PHP] echo (test);

2001-04-04 Thread Johan Holst Nielsen
sorry if this has been covered before. I am not sure if this makes a difference but I see in some books echo written as: echo ("Hello"); and in others just: echo "Hello"; Do the brackets make a difference. Hmmm, nope. You can also write print "Hello"; or print("Hello"); /Johan -- PHP

SV: [PHP] round up number

2001-03-14 Thread Johan Holst Nielsen
How do I round up a lot of decimal number like 10.232656898 to be 10.23 ? Should I use this? $num = 10.26564787; $Rnum = round($num); What would be the function I am looking for and how? Try: $num = 10.26564787; $Rnum = round($num, 2); /Johan -- PHP General Mailing List

SV: [PHP] Linking Libraries ...

2001-03-14 Thread Johan Holst Nielsen
I have a hosting account that provides PHP, but it hasn't been compiled with the IMAP libraries, and I really need these functions. Is there any way to link the IMAP lib locally (ie: without root permissions)? I've used Perl before and know that similar is possible. No, you have to compile PHP