Re: [PHP] PHP Data cache ideas/solutions

2004-09-29 Thread Niklas
"localhost", "foo", "bar"); mysql_select_db("stuff", $link); $result = mysql_query("SELECT * FROM table", $link) or die("Error"); $data = array(); while ($row = mysql_fetch_array($result)) $data[] = $row; $filtered_data = array_filt

RE: [PHP] header and writing problem

2003-02-26 Thread Niklas Lampén
I think this can be done with mySQL (if you're using it) log-files. Niklas -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED] Sent: 26. helmikuuta 2003 11:02 To: [EMAIL PROTECTED] Subject: [PHP] header and writing problem Hi all, Back on the list after a long

RE: [PHP] to holmes Re: [PHP] mysql trouble

2003-02-26 Thread Niklas Lampén
No, he doesn't mean that. You are doing: $String = "text " + "more text"; while you should be doing: $String = "text " . "more text"; Niklas -Original Message- From: Luis A [mailto:[EMAIL PROTECTED] Sent: 26. helmikuuta 2

RE: [PHP] including db content as part of script

2003-02-27 Thread Niklas Lampén
Well, you could use temporary files for this. I've never done this by myself, but I think it's worth giving a try. :) Fetch the data from the database, write your code to temporary file and then include this temporary file. After that you can destroy the temporary file. Niklas ---

RE: [PHP] File upload problem - permission denied

2003-02-27 Thread Niklas Lampén
Seems that php does not have write access to that directory. Set it right and it should work. Niklas P.S. Tip: It's much quicker to create plain html without echo. Just do it like , not like "; ?> :) -Original Message- From: Frans Bakker [mailto:[EMAIL PROTECT

RE: [PHP] File upload problem - permission denied

2003-02-27 Thread Niklas Lampén
On linux you can do it in shell with chmod command. Do 'chmod 766 direcory'. You can find out more about chmod-command at http://www.die.net/doc/linux/man/man1/chmod.1.html. Niklas -Original Message- From: Frans Bakker [mailto:[EMAIL PROTECTED] Sent: 27. helmikuuta 200

RE: [PHP] Text File open and display

2003-03-03 Thread Niklas Lampén
You get a file to an array of lines with file(). Example: "row 1"; // [1] => "row 2"; // [2] => "row 3"; // . for ($i = 0; $i < count($myFile); $i++) { print "Row ".($i+1).": ".$myFile[$i]; }; ?> Niklas -Original

RE: [PHP] info required reg. PHP

2003-03-03 Thread Niklas Lampén
1) No you can't. Use javascript for that. 2) This information is easy to find from web. Read datasheets or use google. Niklas -Original Message- From: yogendra lingsugur [mailto:[EMAIL PROTECTED] Sent: 3. maaliskuuta 2003 14:32 To: [EMAIL PROTECTED] Subject: [PHP] info require

RE: [PHP] Performance Question

2003-03-04 Thread Niklas Lampén
I think that file_get_contents() is quicker, since include() runs what it gets as normal php code. And that gives you the answer to the other question as well. :) Niklas -Original Message- From: Patrick Teague [mailto:[EMAIL PROTECTED] Sent: 4. maaliskuuta 2003 10:57 To: [EMAIL

RE: [PHP] \n

2003-03-04 Thread Niklas Lampén
That should be done like $inputresult = str_replace("\n", "¶\n", $testtextarea); unless he really wants to output \n, not line change. outputs: this is two lines outputs: this is\ntwo $foo String in enclosed by ' is exact, unlike ". Niklas -Original

RE: [PHP] Dollar signs in values

2003-03-06 Thread Niklas Lampén
print htmlspecialchars("[EMAIL PROTECTED]@#%:[EMAIL PROTECTED]@[EMAIL PROTECTED]|#:~December, 2003~on~fjskl"); Niklas -Original Message- From: Liam Gibbs [mailto:[EMAIL PROTECTED] Sent: 7. maaliskuuta 2003 8:13 To: [EMAIL PROTECTED] Subject: Re: [PHP] Dollar signs in values

RE: [PHP] Dollar signs in values

2003-03-06 Thread Niklas Lampén
True. My bad. :) You really have to use single quotes, not double quotes. And I was the one telling about this a couple of days a go. :) Niklas -Original Message- From: Jason k Larson [mailto:[EMAIL PROTECTED] Sent: 7. maaliskuuta 2003 8:58 To: [EMAIL PROTECTED] Cc: Php-General

RE: [PHP] Maximum execution time exceeded when using dial up

2003-03-06 Thread Niklas Lampén
My short answer: set_time_limit(); Niklas -Original Message- From: Andras Kende [mailto:[EMAIL PROTECTED] Sent: 7. maaliskuuta 2003 9:05 To: 'php list' Subject: [PHP] Maximum execution time exceeded when using dial up Hello, I have database while query which populates

RE: [PHP] Search for keyword in txt file

2003-03-07 Thread Niklas Lampén
Dolphins are gone. ;) Here is your direction: preg_match(). If you need help with it (it can be compicated at first), ask. :) Niklas -Original Message- From: Chris Blake [mailto:[EMAIL PROTECTED] Sent: 7. maaliskuuta 2003 11:16 To: [EMAIL PROTECTED] Subject: [PHP] Search for keyword

RE: [PHP] Search for keyword in txt file

2003-03-07 Thread Niklas Lampén
You might want to use preg_match_all(). Here's a sample of getting whole row with a specified word in it: Niklas -Original Message- From: Chris Blake [mailto:[EMAIL PROTECTED] Sent: 7. maaliskuuta 2003 12:36 To: Php-General Subject: RE: [PHP] Search for keyword in txt file O

RE: [PHP] javascript

2003-03-07 Thread Niklas Lampén
If you want to validate form data before sending it, javascript is the choise. Niklas -Original Message- From: Liam Gibbs [mailto:[EMAIL PROTECTED] Sent: 7. maaliskuuta 2003 15:44 To: php list Subject: Re: [PHP] javascript > in my php script registration1.php, i have writ

RE: [PHP] javascript

2003-03-07 Thread Niklas Lampén
with form data Ofcourse this does not apply to every form, but basicly this is how it goes. Niklas -Original Message- From: Liam Gibbs [mailto:[EMAIL PROTECTED] Sent: 7. maaliskuuta 2003 15:55 To: php list Subject: Re: [PHP] javascript > If you want to validate form data before se

RE: [PHP] Help with ereg()

2003-03-11 Thread Niklas Lampén
Use preg_match_all(); Something like preg_match_all("/(\(<\?.*\?>)/im", $Text, $Array_PHP_Code, PREG_PATTERN_ORDER); should do it. It might need some work, but you'll get it. :) Niklas -Original Message- From: Alejandro [mailto:[EMAIL PROTECTED] Sent: 11. maal

RE: [PHP] date check

2003-03-12 Thread Niklas Lampén
$FourteenDays = 86400 * 14; $var = $FourteenDays - (strtotime($date2) - strtotime($date1)); Now if $var is > 0, 14 days has not passed. Niklas -Original Message- From: Fredrik [mailto:[EMAIL PROTECTED] Sent: 12. maaliskuuta 2003 12:06 To: [EMAIL PROTECTED] Subject: [PHP] date ch

RE: [PHP] Re: [PHP-DB] How to Connect remote DB server?

2003-03-12 Thread Niklas Lampén
Possibly the db-server is accepting only localhost connections. Niklas -Original Message- From: Patrick LOK [mailto:[EMAIL PROTECTED] Sent: 12. maaliskuuta 2003 14:39 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] Re: [PHP-DB] How to Connect remote DB server? There is no

RE: [PHP] Re: [PHP-DEV] Is PHP designed (have the capability) to access remote DB?

2003-03-12 Thread Niklas Lampén
You said before you got a odbc connection to your remote db = remote connections are possible. The problem is in: a) db configuration b) your way of trying to connect to db c) your firewall d) remote firewall e) all above Niklas -Original Message- From: Patrick LOK [mailto:[EMAIL

RE: [PHP] Re: Your script possibly relies on a session side-effect which existed until PHP 4.2.3

2003-03-13 Thread Niklas Lampén
LOL! :D -Original Message- From: Rudolf Visagie [mailto:[EMAIL PROTECTED] Sent: 13. maaliskuuta 2003 10:56 To: [EMAIL PROTECTED] Subject: RE: [PHP] Re: Your script possibly relies on a session side-effect which existed until PHP 4.2.3 I would have thought a genius would be able to spell

RE: [PHP] Can't relocate to a specified URL after submit.

2003-03-13 Thread Niklas Lampén
You cannot output anything before headers. Niklas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 14. maaliskuuta 2003 8:03 To: [EMAIL PROTECTED] Subject: [PHP] Can't relocate to a specified URL after submit. The code looks like: if( $actionflag == &q

RE: [PHP] can't get any string replacements to clean this

2003-03-13 Thread Niklas Lampén
What are you trying to get out of that mess? What should the output look like? Niklas -Original Message- From: Dennis Gearon [mailto:[EMAIL PROTECTED] Sent: 14. maaliskuuta 2003 7:51 To: [EMAIL PROTECTED] Subject: [PHP] can't get any string replacements to clean this All i ge

RE: [PHP] String Replace

2003-03-14 Thread Niklas Lampén
There is many functions that can do it. str_replace() is the fastest on thisone. preg_match() comes on second position, and after that comes ereg_replace(). But if you need to do harder replacing, preg_match() is the one to use, imo. Niklas -Original Message- From: Awlad Hussain

RE: [PHP] Re: Internet Explorer toolbar

2003-03-28 Thread Niklas Lampén
. :) Niklas -Original Message- From: Philip J. Newman [mailto:[EMAIL PROTECTED] Sent: 28. maaliskuuta 2003 10:17 To: Dan Rossi; Leif K-Brooks Cc: Peter Houchin; Dan; php-general Subject: Re: [PHP] Re: Internet Explorer toolbar Mummy and Daddy sto fighting. - Original Message - From

RE: [PHP] Re: Internet Explorer toolbar

2003-03-28 Thread Niklas Lampén
I think you should use the function called PutMoneyToMyAccount($AccountID = '123456-98765', $AmountInUSDollars = '100');. Run it as many times as you want. This doesn't need javascript, so this wasn't OT.. :P No need to thank me, even manual tells you this.

RE: [PHP] Menu from Directory

2003-04-02 Thread Niklas Lampén
You might want to start with searching the manual for opendir() function. There is a sample code listing all files from a directory. :) Niklas -Original Message- From: Ben Whitehead [mailto:[EMAIL PROTECTED] Sent: 2. huhtikuuta 2003 1:05 To: [EMAIL PROTECTED] Subject: [PHP] Menu from

RE: [PHP] @getimagesize

2003-04-03 Thread Niklas Lampén
Check if file exists with file_exists(). Niklas -Original Message- From: Diana Castillo [mailto:[EMAIL PROTECTED] Sent: 3. huhtikuuta 2003 11:42 To: [EMAIL PROTECTED] Subject: [PHP] @getimagesize even though I use a @getimagesize , I still get the following Warning when the image is

RE: [PHP] @getimagesize

2003-04-03 Thread Niklas Lampén
creating error as well. Remember to close the file right away, if you use that! :) Niklas -Original Message- From: Diana Castillo [mailto:[EMAIL PROTECTED] Sent: 3. huhtikuuta 2003 13:42 To: [EMAIL PROTECTED] Subject: Re: [PHP] @getimagesize according to the documentation on php.net , Th

RE: [PHP] preg_match_all()

2003-04-03 Thread Niklas Lampén
He needs both. /s makes dot to include new lines too, so you're right. Niklas -Original Message- From: Tom Rogers [mailto:[EMAIL PROTECTED] Sent: 3. huhtikuuta 2003 16:26 To: Thomas Johnsson Cc: [EMAIL PROTECTED] Subject: Re: [PHP] preg_match_all() Hi, Thursday, April 3, 200

RE: [PHP] window size...

2003-04-04 Thread Niklas Lampén
No. Niklas -Original Message- From: Deependra b. Tandukar [mailto:[EMAIL PROTECTED] Sent: 4. huhtikuuta 2003 12:45 To: Justin French; Diana Castillo; [EMAIL PROTECTED] Subject: [PHP] window size... Hi, Is there anyway to define a fixed window size using PHP as we do with

[PHP] Problem to start apache after installed PHP.

2003-06-14 Thread Niklas Janzon
.so into server: /usr/libexec/libphp4.so: undefined symbol: ap_block_alarms Anyone got any idea on this? Kind regards Niklas Janzon

[PHP] sablotron debian(unstable) iconv configure problems [please help]

2002-07-31 Thread Niklas Fondberg
\ --with-pear=/var/devel \ --enable-sockets \ --with-soap -- Best Regards Niklas Fondberg - [EMAIL PROTECTED] System Developer - I3 Micro Technology -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] phpSearch

2002-06-05 Thread Niklas Lampén
Yeah, we'd be happy to develope such program for you. Is there something else you need, cash? :)))) Niklas -Original Message- From: millw0rm [mailto:[EMAIL PROTECTED]] Sent: 6. kesäkuuta 2002 9:05 To: [EMAIL PROTECTED] Subject: [PHP] phpSearch Hi, I m looking

[PHP] RE: [PHP-DB] cookies and Global variables

2002-06-06 Thread Niklas Lampén
1. Cookies _has_ to be sent before anything else, that just is the case. 2. Sessions are the answer for thisone. Niklas -Original Message- From: Dib, Walid (MED, Stagiaire GEMS) [mailto:[EMAIL PROTECTED]] Sent: 6. kesäkuuta 2002 10:06 To: '[EMAIL PROTECTED]' Subject: [PHP-D

RE: [PHP] tutorials

2002-06-12 Thread Niklas Lampén
o with the values sent from that form. If you need a tutorial, try searching google with "php tutorial".. :) Niklas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 12. kesäkuuta 2002 10:17 To: [EMAIL PROTECTED] Subject: [PHP] tutorials hi i wa

RE: [PHP] bulk mail()

2002-06-12 Thread Niklas Lampén
p?pos= And keep some log on sending. Even simple text file will do, if you are sending mails in some known order. Log file is very handy if cpu crashes, or something else happens. Niklas -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: 12. kesäkuuta 2002 14:45 To

RE: [PHP] Help with forms data please

2002-06-12 Thread Niklas Lampén
That's how I do it when I need to handle the data and return user to the same page. Use header("Location: blah"); in the end of the handler page. Then even 'back'-button won't take user back to the handler page, and refresh won't send data again. Nikl

RE: [PHP] Else/For loop

2002-06-12 Thread Niklas Lampén
If you still have an error there, change if ($num_results = 0) to if ($num_results == 0) See the difference? Realize the error? Niklas -Original Message- From: Roberts, Mark [mailto:[EMAIL PROTECTED]] Sent: 12. kesäkuuta 2002 16:20 To: [EMAIL PROTECTED] Subject: [PHP] Else/For loop

RE: [PHP] php-speed

2002-06-13 Thread Niklas Lampén
Embedding PHP in HTML, since I think HTML is ignored by php, just passed thru. Niklas -Original Message- From: Philipp Melab [mailto:[EMAIL PROTECTED]] Sent: 13. kesäkuuta 2002 14:55 To: [EMAIL PROTECTED] Subject: [PHP] php-speed I have a simple newbie question... Whats better

RE: [PHP] php-speed

2002-06-13 Thread Niklas Lampén
d now? ;) Btw. everyone else, check that link below too, if this issue is in your interest. Niklas -Original Message- From: Pradeep Dsouza [mailto:[EMAIL PROTECTED]] Sent: 13. kesäkuuta 2002 15:21 To: [EMAIL PROTECTED] Subject: Re: [PHP] php-speed See this And maybe you might change

RE: [PHP] php-speed

2002-06-13 Thread Niklas Lampén
I don't think so. The difference is (IMHO + the article linked below) if you use ...Foo... (faster) or Foo..."; ?> (slower) Niklas -Original Message- From: Brian McGarvie [mailto:[EMAIL PROTECTED]] Sent: 13. kesäkuuta 2002 15:29 To: [EMAIL PROTECTED] Cc: Php-Genera

RE: [PHP] mysql_num_rows always returns 1?

2002-06-18 Thread Niklas Lampén
Try $query = "select count(*) as Lines from users where " and then check the value of Lines. Or then do something like $query = "select ID from users where " and now your mysql_num_rows($result) should return right kinda value. Niklas -

RE: [PHP] open database paradox

2002-06-18 Thread Niklas Lampén
Use ODBC. Niklas -Original Message- From: sonjaya [mailto:[EMAIL PROTECTED]] Sent: 19. kesäkuuta 2002 7:57 To: [EMAIL PROTECTED] Subject: [PHP] open database paradox i want to open and read database in paradox , how ### This message has

RE: [PHP] looping through numbers

2002-06-24 Thread Niklas Lampén
for ($i = 200; $i <= 200; $i++) print "$i "; Niklas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 25. kesäkuuta 2002 10:05 To: [EMAIL PROTECTED] Subject: [PHP] looping through numbers Hello , How do I do a loop that will increase

RE: [PHP] looping through numbers

2002-06-24 Thread Niklas Lampén
it should ofcourse be for ($i = 200; $i <= 250; $i++) print "$i "; :) -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: 25. kesäkuuta 2002 10:05 To: Php-General Subject: RE: [PHP] looping through numbers for ($i = 200; $i <= 200; $i+

RE: [PHP] function echo ' '

2002-06-25 Thread Niklas Lampén
Shorter version would be And this is not bad coding, it is actually faster than echoing everything. We had this conversation maybe a week ago, so let's not start it again. :) Niklas -Original Message- From: Craig [mailto:[EMAIL PROTECTED]] Sent: 25. kesäkuuta 2002 10:

RE: [PHP] function echo ' '

2002-06-25 Thread Niklas Lampén
Not true. :) You can do it like this: (Ok, this is a for loop, but idea is the same) mailto:[EMAIL PROTECTED]] Sent: 25. kesäkuuta 2002 10:56 To: [EMAIL PROTECTED] Subject: Re: [PHP] function echo ' ' But the problem is that Im doin it inside a while loop. So I need to echo it. /m

RE: [PHP] Require()

2002-06-26 Thread Niklas Lampén
Try this: Niklas -Original Message- From: Andy Whittlestone [mailto:[EMAIL PROTECTED]] Sent: 26. kesäkuuta 2002 15:37 To: [EMAIL PROTECTED] Subject: [PHP] Require() I want to use require to send some post information to a page. Code: if ($viewsystem = = 1) $Str

RE: [PHP] Help and advice sought - search/replace

2002-06-26 Thread Niklas Lampén
If your list looks like this: " Salo, Mika Räikkönen, Kimi Häkkinen, Mika " And there is no other commas in the list, you can do it something like this: I think that'll do. I didn't test it thou.. :) Niklas -Original Message- From: Jason Soza [mailto:[EMAIL P

RE: [PHP] Newbie's question about \n

2002-07-22 Thread Niklas Lampén
If you check the source of your code you'll see that in source the text is in two lines. \n doesn't work as , so this is about how HTML works, not plain text. Niklas -Original Message- From: KK Lee [mailto:[EMAIL PROTECTED]] Sent: 22. heinäkuuta 2002 14:01 To: [EMAIL

[PHP] user running PHP

2003-12-22 Thread Niklas Saers
it runs as user "www" and group "www" rather than the user and group I set with SuexecUserGroup. Why is that, and how can I make it use the user and group the user belongs to? People are starting to complain that they have problems using fopen() and the like. Cheers Niklas

[PHP] GD => ImagePNG: No transparency

2001-01-21 Thread Niklas Saers
;t help either. Now, this is really strange. PNG has transparency, and the loaded image does. Why doesn't ImagePng output the transparancy right? Cheers Niklas Saers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

[PHP] crypt() and md5

2001-04-23 Thread Niklas Neumann
PT_MD5;' returns 1 'echo CRYPT_BLOWFISH;'returns 0 so i will asume, that MD5 is available on my system. But 'echo CRYPT_SALT_LENGTH;' returns 2 and if i test 'crypt('test')' the string is only encrypted with DES. Anybody had similar

Re: [PHP] crypt() and md5

2001-04-23 Thread Niklas Neumann
? I use PHP 4.0.4pl1 and md5 support is definitively available. Btw. > $1$rZelmysN$Gj0rbqD76STIotGExxpna1 > > SALT Isn't this just a 8 chars SALT (rZelmysN)? Best regards Niklas Neumann -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] crypt() and md5

2001-04-23 Thread Niklas Neumann
d5 exists on your system. PHP will then generate randomly a md5-salt.'. A bit mistakable I think. I'll give the translator a wink. Thanks again and best regards Niklas Neumann -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comma

Re: [PHP] crypt() and md5

2001-04-23 Thread Niklas Neumann
l addresses. Niklas Neumann -- 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 PROTECTED]

Re: [PHP] Sensitive Information (like CC)

2001-04-24 Thread Niklas Neumann
> What's the best (secure?) way of transmitting sensitive information > over email? Leave the messages on the server and get them via pop3s. Outlook is capable of pop3 via ssl. Best regards Niklas Neumann -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-m

RE: [PHP] php newbie

2002-01-02 Thread Niklas Lampén
To test your PHP scripts you do need a server with PHP. It's very easy to setup one on to you local machine + there is many completely free ones. Niklas -Original Message- From: Fady Fouad Shehata [mailto:[EMAIL PROTECTED]] Sent: 31. joulukuuta 2001 4:34 To: [EMAIL PROT

RE: [PHP] php newbie

2002-01-02 Thread Niklas Lampén
Yep, but you can't do much without testing your scripts. Niklas -Original Message- From: Martin Schichl [mailto:[EMAIL PROTECTED]] Sent: 2. tammikuuta 2002 13:37 To: [EMAIL PROTECTED]; Php-General Subject: RE: [PHP] php newbie To design, you just need a text editor (or html e

RE: [PHP] foreach statement

2002-01-08 Thread Niklas Lampén
I think this is what you want to do: mailto:[EMAIL PROTECTED]] Sent: 9. tammikuuta 2002 8:59 To: 'Php-General-List (E-mail)' Subject: [PHP] foreach statement Okay lets see who has there thinking caps on today (cos I really dont) I have a list of email addresses stored in a text file. I am a

RE: [PHP] foreach statement

2002-01-09 Thread Niklas Lampén
ess = $emails[$i]; // Do anything you want with $this_is_one_address }; I suggest that you use the for-loop if $emails array is big. Takes less memory. Niklas -Original Message- From: Chris Grigor [mailto:[EMAIL PROTECTED]] Sent: 9. tammikuuta 2002 9:44 To: '[EMAIL PROTECTE

RE: [PHP] foreach statement

2002-01-09 Thread Niklas Lampén
You're welcome. :) Niklas P.S. I know... ;) -Original Message- From: Chris Grigor [mailto:[EMAIL PROTECTED]] Sent: 9. tammikuuta 2002 10:23 To: '[EMAIL PROTECTED]'; Php-General Subject: RE: [PHP] foreach statement Thanks!! its working !!! ***BIG SMILE Nik

RE: [PHP] global/local var in a function

2002-01-10 Thread Niklas Lampén
This is because it creates a new "thread", atleast I think it so. Use global variables to prevent this from happening: i = 0; function change_check_all(tree_item) { a = document.all[tree_item + "_check"]; b = document.all[tree_item + "_count"]; // changed the line below for(i

RE: [PHP] ereg

2002-01-10 Thread Niklas Lampén
You should use preg_match_all() for this. Something like this should do (didn't try it thou): preg_match_all("|(.*)\">|U", $lineofhtml, $output, PREG_PATTERN_ORDER); Niklas -Original Message- From: Kunal Jhunjhunwala [mailto:[EMAIL PROTECTED]] Sent: 11. tammi

RE: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread Niklas Lampén
es up. location.href will take you where you want. Niklas -Original Message- From: Simos Varelakis [mailto:[EMAIL PROTECTED]] Sent: 17. tammikuuta 2002 14:37 To: [EMAIL PROTECTED] Subject: [PHP] Display a mesagge and redirect (newbie) Hi to everyone I want to do the following

RE: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread Niklas Lampén
No good, since starts counting when page is first opened, so clients with slow connection might not never see the message. I'd rather use which will execute right after the page is completely loaded and move to the next page after 5 seconds. Niklas -Original Message- From: Int

RE: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread Niklas Lampén
seconds even if page is not loaded completely but the javascript code will wait 'till the page is loaded. Everyone will see the whole page. And you can allways add an extra link for those who do not want to wait (or have javascript disabled). Niklas -Original Message- From: Intruder [m

RE: [PHP] Getting the last record in a mysql table

2002-01-17 Thread Niklas Lampén
If you have ID that is a incrementing number, you could just query like this: 'SELECT ID FROM MY_TABLE ORDER BY ID DESC, LIMIT 1' And there you have just one result, the last (biggest) ID number. Niklas -Original Message- From: hugh danaher [mailto:[EMAIL PROTECTED]]

RE: [PHP] Getting the last record in a mysql table

2002-01-17 Thread Niklas Lampén
You're welcome. Heh, why to make too hard. :) Niklas -Original Message- From: hugh danaher [mailto:[EMAIL PROTECTED]] Sent: 18. tammikuuta 2002 8:40 To: [EMAIL PROTECTED] Subject: Re: [PHP] Getting the last record in a mysql table Niklas, Now that sounds like a solution! T

RE: [PHP] Getting the last record in a mysql table FINALLY!!

2002-01-17 Thread Niklas Lampén
Well, ofcourse you have to have the table + field names right. ;) Niklas -Original Message- From: hugh danaher [mailto:[EMAIL PROTECTED]] Sent: 18. tammikuuta 2002 9:38 To: [EMAIL PROTECTED] Cc: Php-General Subject: Re: [PHP] Getting the last record in a mysql table FINALLY

RE: [PHP] Writing to text file from Radio Buttons

2002-01-22 Thread Niklas Lampén
fwrite()? Niklas -Original Message- From: Harphajan Singh [mailto:[EMAIL PROTECTED]] Sent: 22. tammikuuta 2002 9:51 To: [EMAIL PROTECTED] Subject: [PHP] Writing to text file from Radio Buttons Greeting dudes ! I`m a fresh user of PHP and need some technical assistance from you folks

RE: [PHP] mysql

2002-01-31 Thread Niklas Lampén
If I understood you correct, you want to know the amount of the rows in your table. Here you go (Assuming ID is the field you use to ident your rows): "...count(ID) AS CountValue..." then treat CountValue as any field in a table. Niklas -Original Message- From: Mason Batl

RE: [PHP] question reg trim-strlen

2002-01-31 Thread Niklas Lampén
I think it won't work. If you don't want to trim the actual variable, but check if the trimmed variable is longer than 50 chars, here you go: if (strlen(trim($cust_adres)) > 50) { .... } Niklas -Original Message- From: B. Verbeek [mailto:[EMAIL PROTECTE

RE: [PHP] question reg trim-strlen

2002-01-31 Thread Niklas Lampén
Then why don't you just trim() it before comparing? $var = trim($var); Niklas -Original Message- From: B. Verbeek [mailto:[EMAIL PROTECTED]] Sent: 31. tammikuuta 2002 13:33 To: [EMAIL PROTECTED] Subject: RE: [PHP] question reg trim-strlen I want to trim it then check and th

RE: [PHP] using eregi

2002-01-31 Thread Niklas Lampén
You could do it like this: "; }; ?> Niklas -Original Message- From: John Gurley [mailto:[EMAIL PROTECTED]] Sent: 31. tammikuuta 2002 15:32 To: [EMAIL PROTECTED] Subject: [PHP] using eregi Hello, Just wondering if there is a way to print out parts of a text file (i.e from l

RE: [PHP] Anyone Up?

2002-01-31 Thread Niklas Lampén
eval() is your solution. for ($i = 1; $i <= $NMax; $i++) { $variable = "\$Check$i"; eval("\$string = \"$variable\";"); echo $string.""; } Niklas -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: 1

RE: [PHP] Re: Anyone Up?

2002-02-01 Thread Niklas Lampén
You're wrong here, my friend. You can have any value you like. value="@£$ASDFSDF ASDP fosifu @}{$#%/&@ " would work. Niklas -Original Message- From: hugh danaher [mailto:[EMAIL PROTECTED]] Sent: 1. helmikuuta 2002 10:48 To: Luke Welling Cc: Php-General Su

RE: [PHP] Re: Anyone Up?

2002-02-01 Thread Niklas Lampén
Well, Netscape breaks value="This is" to "This", but IE understands that as "This%20is". so if you set the value to be "This%20is", both Netscape and IE understands that as "This is". There are many other chars that can f**k up the value, s

RE: [PHP] Problem...header already sent by

2002-02-04 Thread Niklas Lampén
There can't be _anything_ before headers. Even a single space and/or linebreak causes an error. Niklas -Original Message- From: Peter Ruan [mailto:[EMAIL PROTECTED]] Sent: 5. helmikuuta 2002 7:42 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Problem...header al

RE: [PHP] Tricky array question

2002-02-05 Thread Niklas Lampén
It should be $category[0] = $glacier; ^--- ERROR in you code Niklas -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: 5. helmikuuta 2002 11:59 To: [EMAIL PROTECTED] Subject: [PHP] Tricky array question Hi there, I have a tricky array

RE: [PHP] Re: Tricky array question

2002-02-05 Thread Niklas Lampén
I think you should ignore that. I use it all the times, and it works fine. Niklas -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: 5. helmikuuta 2002 12:37 To: [EMAIL PROTECTED] Subject: [PHP] Re: Tricky array question Hello Rainer, what kind of disadvantages do I

RE: [PHP] Tricky array question

2002-02-05 Thread Niklas Lampén
Ahem... So you want to have a two dimensional variable? "; ?> Is this what you are looking for? Niklas -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: 5. helmikuuta 2002 12:54 To: [EMAIL PROTECTED] Subject: Re: [PHP] Tricky array question This was just an

RE: [PHP] Checkboxe problem

2002-02-05 Thread Niklas Lampén
There is no way. How would you then know if the checkbox was checked or not? I use 'em like this and then check if $private is "myValue" or not. If you really have to get some data thru, use hidden inputs. Niklas -Original Message- From: Gaylen Fraley [mailto:[

RE: [PHP] Setting up group mailer

2002-02-13 Thread Niklas Lampén
Firstly: Keep track very carefully to whom you've allready sent the message, it might allways crash. Second: Add some Sleep()'s so it won't kill your mailserver. Third: Don't spam. :) Niklas -Original Message- From: phantom [mailto:[EMAIL PROTECTED]] Sent: 14.

RE: [PHP] Mysql_num_rows

2002-02-18 Thread Niklas Lampén
Maybe you can round the problem with if ($num < 1) echo "Nothing today!"; else echo "Something to do today!"; if (!isset($num) || $num == 0)... Niklas -Original Message- From: Frank Miller [mailto:[EMAIL PROTECTED]] Sent: 18. helmikuut

RE: [PHP] date problem

2002-02-18 Thread Niklas Lampén
date() is your answer, use it in the piece of code generating the query. $DateTime = date("Y-m-d H:i:s); // "2002-02-18 16:10:43" Niklas -Original Message- From: eoghan [mailto:[EMAIL PROTECTED]] Sent: 18. helmikuuta 2002 16:14 To: [EMAIL PROTECTED] Subject: [PH

RE: [PHP] Mysql_num_rows

2002-02-18 Thread Niklas Lampén
Do everything as you did, except for that if-statement. $Query = "SELECT * FROM table"; $Results = mysql_query($Query); $num = mysql_num_rows($Results); if ($num < 1 || !isset($num)) echo "Nothing here!"; else echo "Do something today!"; Niklas

RE: [PHP] PHP_SELF Undefined

2002-02-18 Thread Niklas Lampén
I had this problem while running PHP under windows. I solved (well, rounded :) the problem with $SCRIPT_NAME (if I remember it right) which gives the very same result. Niklas -Original Message- From: Greg Donald [mailto:[EMAIL PROTECTED]] Sent: 19. helmikuuta 2002 8:05 To: [EMAIL

RE: [PHP] how to generate a date between 1998 and today by random?

2002-05-07 Thread Niklas Lampén
array_rand() might be the solution for you. Niklas -Original Message- From: andy [mailto:[EMAIL PROTECTED]] Sent: 7. toukokuuta 2002 16:12 To: [EMAIL PROTECTED] Subject: [PHP] how to generate a date between 1998 and today by random? hi there, I am wondering if there is an easy way

RE: [PHP] Getting only 255 chars from SQL Server

2002-05-13 Thread Niklas Lampén
The platform doesn't matter here, since VarChar's maximum length is 255 chars, so everything above that is cutted away on insert. Creating table with VarChar(800) should give an error.. Niklas -Original Message- From: Michael Sims [mailto:[EMAIL PROTECTED]] Sent: 13. touko

RE: [PHP] Getting only 255 chars from SQL Server

2002-05-13 Thread Niklas Lampén
Oh, it's different in msSQL. My mistake, sorry.. :) My knowledge is based on mySQL, I thought that the field lengths were in some sorta standard. Niklas -Original Message- From: Sqlcoders.com Programming Dept [mailto:[EMAIL PROTECTED]] Sent: 14. toukokuuta 2002 1:46 To: [

RE: [PHP] Getting only 255 chars from SQL Server

2002-05-13 Thread Niklas Lampén
That is what I said before.. So can varchar be longer than 255 chars in MSSQL (or in any SQL)? Actually this is not my problem, I'm doing well with mySQL (varchars maximum length 255 :), but I'm getting interested here! Niklas -Original Message- From: Matt Friedman [mai

RE: [PHP] Generating PINs

2002-05-13 Thread Niklas Lampén
Well, you could produce those randomly. Store all the PINs to a database and before storing compare that it doesn't exist yet. Here is a piece of code to produce PINs in _exactly_ that format you want. I've done it for myself, but feel free to use it in any way you like:

RE: [PHP] Parse Error(newbie)

2002-05-29 Thread Niklas Lampén
mysql_query("delete from conf_event where time < ( time() ); You're missing the ending " there. Niklas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 29. toukokuuta 2002 16:20 To: [EMAIL PROTECTED] Subject: Re: [PHP] Parse Error(ne

RE: [PHP] How can I remove the last character from a one line file?

2002-05-30 Thread Niklas Lampén
eregi_replace("o$", "", $String); Niklas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 30. toukokuuta 2002 13:05 To: [EMAIL PROTECTED] Subject: RE: [PHP] How can I remove the last character from a one line file? Hi all, T

RE: [PHP] foreach not in reach

2002-02-22 Thread Niklas Lampén
// You could use foreach() here as well Niklas -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: 22. helmikuuta 2002 8:48 To: [EMAIL PROTECTED] Subject: [PHP] foreach not in reach Question 1: How can I append strings to my authors array? Me thinks this doesn't

RE: [PHP] isset?

2002-02-27 Thread Niklas Lampén
If $submit is 0/NULL/FALSE and you do "if ($submit)" you'll receive FALSE. With "if (isset($submit))" you'll receive TRUE. In other words, isset() checks if variable is set at all and is() checks if the expression is true. Niklas -Original Message- F

RE: [PHP] RE: sending multiple frames to different pages

2002-02-28 Thread Niklas Lampén
Problem with this is that if user clicks Back button in browser, only "second_frame" will go -1 in history. Better solution would be making the pages creating frames to get variables for frames, so you could send variables with page names to it. > Niklas -Original Message---

  1   2   3   >