RE: [PHP] [php] explode that :) !

2003-08-16 Thread Sævar Öfjörð
Why not: echo trtdYour score is: /tdtd.split($P1OC1Q1,)./td/tr\n; -Original Message- From: John Taylor-Johnston [mailto:[EMAIL PROTECTED] Sent: 17. ágúst 2003 03:48 To: [EMAIL PROTECTED] Subject: Re: [PHP] [php] explode that :) ! Kind of hoping to do shorten it like this: echo

[PHP] executing a shell command within a function

2003-08-15 Thread Sævar Öfjörð
until the rest of the php code is executed? Could this be true? If anyone has anything to say on this I’d appreciate it. BTW I'm using RH8.0 and PHP 4.2.2   Kveðja, Sævar Öfjörð [EMAIL PROTECTED] þetta reddast - hönnunarlausnir www.reddast.is -- PHP General Mailing List (http://www.php.net

RE: [PHP] How can I add records to database every 60 minutes???

2003-07-29 Thread Sævar Öfjörð
I'm not sure if this is possible in PHP, but Apache's Cron should take care of this. -Original Message- From: phpu [mailto:[EMAIL PROTECTED] Sent: 29. júlí 2003 09:49 To: [EMAIL PROTECTED] Subject: [PHP] How can I add records to database every 60 minutes??? Hello I'm making an online

RE: [PHP] radio button arrays and php3

2003-07-23 Thread Sævar Öfjörð
This is the very nature of radiobuttons. They are ment to return only one value because you can only select one of them. If you want all values returned in an array you have to use checkbox. Checkboxes allow multiple selections. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

[PHP] homemade authentication function

2003-07-23 Thread Sævar Öfjörð
; } } } And I call it like this: require_groups(“admins”, “moderators”,“members”); This returns true. Kveðja, Sævar Öfjörð [EMAIL PROTECTED] þetta reddast - hönnunarlausnir file:///C:\Documents%20and%20Settings\S%E6var

RE: [PHP] Session problem

2003-07-23 Thread Sævar Öfjörð
You have to specify which warnings and errors if you want someone to help -Original Message- From: tana dsasa [mailto:[EMAIL PROTECTED] Sent: 23. júlí 2003 09:58 To: [EMAIL PROTECTED] Subject: [PHP] Session problem I have installed an user-login aplication on my website (

RE: [PHP] Re: homemade authentication function [SOLVED]

2003-07-23 Thread Sævar Öfjörð
; } else{ return true; } } } And I call it like this: require_groups(admins, moderators,members); This returns true. Kveðja, Sævar Öfjörð [EMAIL PROTECTED] þetta reddast

RE: [PHP] retrieving form checkbox values

2003-07-17 Thread Sævar Öfjörð
I think you have to do input type=checkbox name=File[] Then $File becomes an array. If you want to retrieve the value for each checkbox you can use a for loop and do value=$File[$i] -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: 17. júlí 2003 08:58 To: [EMAIL

RE: [PHP] Multiple upload files with php problem!!

2003-07-09 Thread Sævar Öfjörð
This is supported in the standards I think, as it says clearly in the HTML 4.01 specification on www.w3.org: file select - This control type allows the user to select files so that their contents may be submitted with a form. Note that 'files' is plural. However, no browser yet supports this

[PHP] serialize?

2003-07-08 Thread Sævar Öfjörð
Hi. I’m coding a poll system which stores information in MySQL. When a new poll is created a new row is inserted in the table ‘polls’. There I keep basic information such as the question, id etc. But should I keep the poll options in one field also? Then I would create an array from the poll

Re: [PHP] mysql_query

2003-07-06 Thread Sævar Öfjörð
SELECT * FROM my_table WHERE var1='$var1' AND var2='$var2' --^ you use AND -Original Message- From: Kevin Fradkin [mailto:[EMAIL PROTECTED] Sent: 6. júlí 2003 13:43 To: [EMAIL PROTECTED] Subject: [PHP] mysql_query hi... 1 question... how can i

RE: [PHP] mysql_query

2003-07-06 Thread Sævar Öfjörð
Hmm. Should have been like this.. -Original Message- From: Sævar Öfjörð [mailto:[EMAIL PROTECTED] Sent: 6. júlí 2003 14:04 To: [EMAIL PROTECTED] Subject: Re: [PHP] mysql_query SELECT * FROM my_table WHERE var1='$var1' AND var2='$var2' --^ you

RE: [PHP] Warning: Invalid argument supplied for foreach()

2003-07-06 Thread Sævar Öfjörð
Don't you think it should be like this? foreach($champs as $key=$value) { echotd class='$value'$key/td; //--^ } -Original Message- From: arnaud gonzales [mailto:[EMAIL PROTECTED] Sent: 6. júlí 2003 20:51 To: Php-General Subject: [PHP] Warning: Invalid

RE: [PHP] Using PHP to read style sheet -- create drop-down?

2003-07-03 Thread Sævar Öfjörð
reading the file but returning a blank drop-down with your example. Where I'm confused is where is $hm defined? --- Sævar Öfjörð [EMAIL PROTECTED] wrote: Sure. You should use file functions like http://is.php.net/manual/en/function.fopen.php http://is.php.net/manual/en/function.fread.php

RE: [PHP] Using PHP to read style sheet -- create drop-down?

2003-07-02 Thread Sævar Öfjörð
Sure. You should use file functions like http://is.php.net/manual/en/function.fopen.php http://is.php.net/manual/en/function.fread.php or http://is.php.net/manual/en/function.file.php to read the file and then maybe http://is.php.net/manual/en/function.preg-match.php to extract certain

[PHP] Problem authenticating through sessions and cookies

2003-07-02 Thread Sævar Öfjörð
I’m trying to write a class for authentication. I’ve got it going quite good but there are some problems I’m not shure how to deal with. First, here's the idea: When the class is called, the constructor checks a session variable to see if the user is logged in. If not, it checks if a

RE: [PHP] Re: Form 2 PDF 2 Form

2003-07-01 Thread Sævar Öfjörð
You could use a temp table in the database which gets cleaned up both when the last page is completed or if there is data in it when the user starts from scratch. Of course you would have to use sessions to identify each user to each line of temp data. I'm not sure if this will work, there are

RE: [PHP] File upload: type and size question

2003-07-01 Thread Sævar Öfjörð
http://is.php.net/manual/en/features.file-upload.php There you can see how to use the $_FILES autoglobals ($HTTP_POST_FILES in php versions prior 4.1.0) to get the size of the uploaded file in bytes. So, for example, you can do this before saving the uploaded file: if($_FILES['userfile']['size']

RE: [PHP] need help w/ sql query - update and select at once

2003-07-01 Thread Sævar Öfjörð
Theoretically, you should be able to do a multi-table update since MYSQL 3.23, like this: UPDATE tablename, tablename2 SET tablename.field1 = 'yes' WHERE tablename.userid = tablename2.userid; I haven't tested it, though. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

RE: [PHP] need help w/ sql query - update and select at once

2003-07-01 Thread Sævar Öfjörð
Actually, when I took another look at the manual, it says: Starting with MySQL Version 4.0.4, you can also perform UPDATE operations that cover multiple tables: UPDATE items,month SET items.price=month.price WHERE items.id=month.id; So it is even newer than 4.0.1

RE: [PHP] Sharing Cookies with Java?

2003-07-01 Thread Sævar Öfjörð
I don't know about Java, but JavaScript can use php cookies and vice-versa. -Original Message- From: Jiann-Ming Su [mailto:[EMAIL PROTECTED] Sent: 1. júlí 2003 19:50 To: [EMAIL PROTECTED] Subject: [PHP] Sharing Cookies with Java? Can php share cookies with java servlets? Specifically,

RE: [PHP] Using Different Fonts on Web Via generated Image

2003-06-30 Thread Sævar Öfjörð
Try this: http://is2.php.net/manual/en/function.imagettftext.php -Original Message- From: Miranda, Joel Louie M [mailto:[EMAIL PROTECTED] Sent: 30. júní 2003 07:41 To: '[EMAIL PROTECTED]' Subject: [PHP] Using Different Fonts on Web Via generated Image Hello, Can I generate an image

RE: [PHP] Change image file size dynamically

2003-06-23 Thread Sævar Öfjörð
Of course you have to have GD library installed. -Original Message- From: Chris Sherwood [mailto:[EMAIL PROTECTED] Sent: 23. júní 2003 21:34 To: Hardik Doshi; [EMAIL PROTECTED] Subject: Re: [PHP] Change image file size dynamically check out this link it should have the answers your

RE: [PHP] php question... opening external page/writing to it...

2003-06-23 Thread Sævar Öfjörð
I don't know if this is what you mean, but here is what you need to edit files: http://us2.php.net/manual/en/function.fopen.php http://us2.php.net/manual/en/function.fwrite.php http://us2.php.net/manual/en/function.fclose.php -Original Message- From: my [mailto:[EMAIL PROTECTED] Sent:

RE: [PHP] Convert KB to MB?

2003-06-21 Thread Sævar Öfjörð
Actually, if we want too go into details, according to the international standard for units, there is a big difference in 'M' and 'm'. 'M' means Mega and 'm' means milli. You are probably aware of that Mega is 10 in the power of 3 but milli is 10 in the power of -3. The difference is, like, a

[PHP] Problem while retrieving data from cookie with unserialize

2003-06-19 Thread Sævar Öfjörð
on this. Best regards, Sævar Öfjörð Magnússon [EMAIL PROTECTED] ICELAND -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] strange crypt() problem

2003-06-19 Thread Sævar Öfjörð
Try using md5() instead because it is more widely supported than crypt() and it leaves no room for errors. Hope it helps, Sævar ICELAND -Original Message- From: Huzz [mailto:[EMAIL PROTECTED] Sent: 19. júní 2003 21:43 To: [EMAIL PROTECTED] Subject: [PHP] strange crypt() problem I

RE: [PHP] explode, split, or what?

2003-06-19 Thread Sævar Öfjörð
why don't you just do this? *** ?php if(file_exists(setup.txt)){ $lines=file(setup.txt); echo stripslashes($lines[0]); } else echo Error opening \setup.txt\; ? *** file() returns the file in an array, each line as new value, so line nr. 1 is $line[0], line nr. 2 is $line[1] etc... I added

RE: [PHP] strange crypt() problem

2003-06-19 Thread Sævar Öfjörð
Well, if you don't find another solution for this, you could generate random passwords for each member and mail them to them. Then you would md5() them and update the DB with new md5()'ed passwords... This is not the easy way out so I hope someone finds out why the crypt() is behaving strangely.

RE: [PHP] How to UPDATE only certain fields

2003-06-19 Thread Sævar Öfjörð
The right SQL syntax would be: UPDATE $table SET type='$type', year='$year' WHERE id='$id'; Sævar - ICELAND -Original Message- From: Matt Hedges [mailto:[EMAIL PROTECTED] Sent: 19. júní 2003 23:07 To: [EMAIL PROTECTED] Subject: [PHP] How to UPDATE only certain fields Hello, I am

RE: [PHP] Pre-4.1 / register_globals=off

2003-06-19 Thread Sævar Öfjörð
From manual on www.php.net: Use $HTTP_SESSION_VARS with PHP 4.0.6 or less Sævar - ICELAND -Original Message- From: Lee Herron QCS [mailto:[EMAIL PROTECTED] Sent: 20. júní 2003 00:01 To: [EMAIL PROTECTED] Subject: [PHP] Pre-4.1 / register_globals=off If register_globals is turned off,