[PHP] Force no Cache

2003-04-05 Thread Davíð Örn Jóhannsson
Is there any way in php to disable the users cache so that every time you reload you fetch the newest version of the site? Regards, David

[PHP] Search engine

2003-03-21 Thread Davíð Örn Jóhannsson
Dose any one have any tips on making a very simple search engine, that only searches in two fields of a mysql table. I just need some pointers to know where to begin. Thanks, David

[PHP] Problem with a for loop...

2003-01-16 Thread Davíð Örn Jóhannsson
I have al for loop that looks something like this: $checkCurrName = SELECT imgName FROM $db_img ORDER BY imgName DESC; $resultCurrName = mysql_query($checkCurrName, $db); for ($i = 0; $i $n; $i++){ list($currName) = mysql_fetch_row($resultCurrName); $newName =

FW: [PHP] Problem with a for loop...

2003-01-16 Thread Davíð Örn Jóhannsson
-Original Message- From: Davíð Örn Jóhannsson [mailto:[EMAIL PROTECTED]] Sent: 16. janúar 2003 13:59 To: '1LT John W. Holmes' Subject: RE: [PHP] Problem with a for loop... I only want the last inserted row in the mysql database, and each time the script goes trough the loop it adds

[PHP] Going from 1040601600 to Human time

2003-01-14 Thread Davíð Örn Jóhannsson
I used mktime to make 1040601600 this stirng but I want to go back to human readable time how should I do that? Thanks, David

[PHP] How to attach a file to mail()

2003-01-03 Thread Davíð Örn Jóhannsson
mail($to, $subject, $body, From: $email); how do I insert an attachment into this mail function, It would be submitted with file field and would be called attachment. Regards, David

[PHP] Showing 10 record items per page...?

2002-12-17 Thread Davíð Örn Jóhannsson
I need to be able to show maybe 10 items that I query from a mysql database on each page and I’m not really sure how I can do this. If I have lets say 30 items that match the query, I would like the page to display this at the bottom Previous 10 page 1 2 3 Next 10 of 30 Can any one

[PHP] Don't get variable to be passed to the page on submit

2002-12-13 Thread Davíð Örn Jóhannsson
I have this code whitch I have been staring at for hours and I just can’t figure out what is going on... it is about as simple as it gets I just need to pass a variable from this page to it self, and that would be tha variable $nafn I have this included code included into another page that is

[PHP] Session

2002-12-12 Thread Davíð Örn Jóhannsson
Hi I think it is possible to use sessions without having to insert sid=$sid into every link i print out but I don’t get it to work any Ideas about what I could be doing wrong? I have a login form on a page called login.php, and if login is ok, then it sets $sid = session_id(); and prints out

[PHP] Uploading a directory via browser w/ php

2002-12-11 Thread Davíð Örn Jóhannsson
Hi I’m wondering if any body has done somthing like uploading a whole directory trough webbrowser using php, or has any Ideas how such a thing can be done, any Ideas appriciated. Regards, David

[PHP] Creating dynamic names for images

2002-12-04 Thread Davíð Örn Jóhannsson
I have a situation where I allow users to upload images, and I store the names of the images in a database and the images I store in a some folder on the server, but what I would like to do is to dynamically create names for the images and dont ever have to worry about if this name exists and

[PHP] Changeing user

2002-12-04 Thread Davíð Örn Jóhannsson
I need to be able to create dirs, chmod and other stuff on the server, but I get : Warning: MkDir failed (Permission denied), so Is there any way for me to do something so I can change the user I attept to execute those functions. Something like exec(change user, pass). Thanks David

[PHP] I'm having a problem with running scripts on IIS server

2002-11-21 Thread Davíð Örn Jóhannsson
This is the script I’m running ?php include(db_connect.php); $query = select top 5 * from news order by news_id desc; $result = mssql_query($query, $db); $i = 0; while($row = mssql_fetch_row($result)){ $i++; $title = rawurlencode($row[1]); $date =

FW: [PHP] I'm having a problem with running scripts on IIS server

2002-11-21 Thread Davíð Örn Jóhannsson
?php include(db_connect.php); $query = select top 5 * from news order by news_id desc; $result = mssql_query($query, $db); $i = 0; while($row = mssql_fetch_row($result)){ $i++; $title = rawurlencode($row[1]); $date = rawurlencode($row[2]);

[PHP] Running functions as other than nobody

2002-11-06 Thread Davíð Örn Jóhannsson
I need to chmod files which are owned by a nother user than nobody with a php script runing from a browser. lets say i have a file called image.gif and I want to chmod(“imgage.gif”, 0777); and I want to run it as user: myuser with passwd: passwd. Can I do this? Regards, David

[PHP] Array solution...

2002-11-01 Thread Davíð Örn Jóhannsson
I have two arrays and I have complete list of numbers in one of them, lets call it $complete[] and another that has some values of the complete one, lets call that one $part[], now if I want to return an array with all the values that are in $complete[] but not in $part[], how would I do that?

[PHP] Serverside script

2002-11-01 Thread Davíð Örn Jóhannsson
I need to write a stand alone script runing on a server that checks and updates a database every week, is this posable and if so could some one direct me to a tutorial or to any info on doing this. Regards, David

[PHP] searching an array

2002-10-29 Thread Davíð Örn Jóhannsson
I have a array called $arr[], it holds integer values, I don’t know how many indexes it holds and I need to be able to find out what the hash ($arr[index]) holds the largest value, is this possable, and if so how? Regards, David

[PHP] Week numbers

2002-10-28 Thread Davíð Örn Jóhannsson
Lets say I have a date: 29.10.2002 and I want to be able to find out what week number it is, I know how to find out what the current week number is: date(“W”) to day it would result 44, but i need to be able to do this dynamically ofcourse, any Ideas? thanks, David

[PHP] Error disabling

2002-10-04 Thread Davíð Örn Jóhannsson
I need to be able to disable error reporting on one page with php, I just don’t remember how to do this, if I remember correctly I could call some function in the begining of a php doc and tell it not to disply any errors that occur while parsing the doc.

[PHP] xml encodeing with new_xmldoc(1.0);

2002-09-30 Thread Davíð Örn Jóhannsson
I need to apply iso-8859-1 encodeing to the ?xml version=”1.0”? that this function creates: new_xmldoc(“1.0”). I tried to replace the line but ofcourse the new_xmldoc function creates object-tree of the document and I don’t know I can reffrer to the first line, or ?xml version=”1.0”? or just

[PHP] FW: problem with new_xmldoc()

2002-09-27 Thread Davíð Örn Jóhannsson
I ran into a problem using new_xmldoc() function I just set up PHP v 4.2.3 because the 4.0.1. version resulted: Fatal error: Call to undefined function: new_xmldoc() and so dose the new version v.4.2.3 Any Ideas??