[PHP] array_search() problem

2002-09-12 Thread David Orn Johannsson
Hi I'm runing a PHP Version 4.0.4pl1 on Solaris 8 X86 on apache, and I'm trying to search an array while(list($findId) = mysql_fetch_row($resultNextLast)){ $NextLast[] = $findId; } $currArrayPos = array_search($ImgId, $NextLast); and this code results this error: Fatal error: Call to

[PHP] deleteing a file from server

2002-05-24 Thread David Orn Johannsson
I use the copy function to copy a file to the server, like this; copy($file, ./jpg/$name.jpg); what would I do to removeit from the server, or delete it?

[PHP] Get domain name

2002-05-23 Thread David Orn Johannsson
I need to find out what the domain of the site that I'm running a script from, I know this is possable, but I cant find the function in the manual. the domain would be somthing like www.domain.com http://www.domain.com/ Thanks David

[PHP] problem with strtolower()

2002-05-17 Thread David Orn Johannsson
I’m having a problem with StrToLower function in php I’m trying to convert characters like THORN; and acute letters from uppercase to lowercase, but it dosen’t work. this is what the manual says: “Note that 'alphabetic' is determined by the current locale. This means that in i.e. the default

[PHP] Finding out what week it is

2002-05-15 Thread David Orn Johannsson
Is there any way to determin what week of the year it is, for example to day it is the 20th week of the year. Thanks http://www.atom.is/ Davíð Örn Jóhannssson Vefforritari Atómstöðin hf. Austurstræti 12 101 Reykjavík

[PHP] String check

2002-04-30 Thread David Orn Johannsson
Is ther any function that I could use to check if a string beguins wiht a certin set of numbers, like if string starts_w “324” { do some stuff; } Regards, David http://www.atom.is/ Davíð Örn Jóhannssson Vefforritari Atómstöðin hf.

[PHP] Mailing to numerous with mail()

2002-04-24 Thread David Orn Johannsson
Im trying to send an email useing mutible email addresses, could any one tell me why this isnt working, it works when I only use one address ($to = [EMAIL PROTECTED]) but not when I use the following code. $to  = [EMAIL PROTECTED], ;     $to .= [EMAIL PROTECTED] . , ;   

[PHP] MSSQL help w/ auto_increment

2002-04-23 Thread David Orn Johannsson
I’m having a problem wiht creating a db in MSSQL, I’ve only used Mysql be for so I tryed the syntax just the same way. I’m trying to execute this code: create table test ( news_id int not null auto_increment , title varchar(50) not null , ndate varchar(50) not null , headline varchar(150)

[PHP] Error connecting to mssql

2002-04-23 Thread David Orn Johannsson
I’m trying to connect to a mssql server but i results a “could not connect to server” error. The server is Win2000 IIS running MSSQL 2000. PHP 4.1.2 Server API CGI mssql config: mssql MSSQL Support enabled Active Persistent Links 0 Active Links 0 Library version 7.0 Directive Local

[PHP] Login displays the pass and user in url

2002-03-25 Thread David Orn Johannsson
Can I some how prevent the browser from displayin index.php?passwd=passuser=user in the url when I use this script I wrote. ?php if(!IsSet($stage)){ print(form name=\login\ action=\$PHP_SELF\);

[PHP] Fails to log in on some computers...?

2002-03-21 Thread David Orn Johannsson
Could any one tell me why this script fails, only on some computers. It works fine on all computers at work, but some clients seem to have a promblem with loging in, and it is not the passcheck that is failing I’m quite sure of that, so it must be the check for session that is failing so could

[PHP] URL encoding

2002-02-13 Thread David Orn Johannsson
Ok the thing is I’m getting the information from a mysql db and it is being fetched by a Flash app and then it is used to print out the info in a fancy way. I am trying to url encode special Icelandic charaters such as (“þ” ASCII 0222 or the Latin Letter “Thorn”) if you are able to see it but

[PHP] Array length

2002-02-06 Thread David Orn Johannsson
Isin’t there a function to determine the length of an array? I can’t seem to find it in the manual http://www.atom.is/ Davíð Örn Jóhannssson Vefforritari Atómstöðin hf. Garðastræti 37 101 Reykjavík sími: 595-3643 fax:

[PHP] Getting variables from a text file

2002-02-05 Thread David Orn Johannsson
I have this text file I have to retreve infromation from, in the fallowing format: date1=1/1/2002title1=some titleheadline1=some headlinefull1=full articledate2=2/1/2002title2=some title and so on what would be the best thing for me to do to if I was to get the values of all the

[PHP] Images and Mysql

2002-01-30 Thread David Orn Johannsson
I need to find out how to upload images to a database and then displaying them again, can anybody direct me to a howto or any thing like that to help me figure out how it’s done. http://www.atom.is/ Davíð Örn Jóhannssson Vefforritari

[PHP] Having a poblem with the mail() function

2002-01-21 Thread David Orn Johannsson
The thing is when i run this script which seems allright to me atleast, it always fails, Can anyone even guess what the problem might be? The webserver is running a php 4.1, SunOS 5.7, Apache, and sendmail which is required for the mail() function if I'm right? Thanks David

RE: [PHP] Having a poblem with the mail() function

2002-01-21 Thread David Orn Johannsson
] Subject: Re: [PHP] Having a poblem with the mail() function -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 21-01-02 at 16:41 * David Orn Johannsson said The thing is when i run this script which seems allright to me atleast, it always fails, Can anyone even guess what the problem might

RE: [PHP] Having a poblem with the mail() function

2002-01-21 Thread David Orn Johannsson
-02 at 16:54 * David Orn Johannsson said $address = [EMAIL PROTECTED]; $subject = Test; $body = test; if(mail($address, $subject, $body)) { echo(Success); } else { echo(yDidn't work); } So what happens when you run