[PHP] Get directory items, read file lines...

2002-08-22 Thread Bill Leonard
Hey all, Pretty new to PHP... A couple of general questions will help me solve a larger problem...! 1) I need to read all of the names of the files in a given directory 2) read a given line number out of each of these files (just text) 3) write it to a delimited file of some sort I think I am

[PHP] Re: Question about sessions: how to force expiry

2002-08-22 Thread Peter Bottenberg
Hi, Place these headers in the top of your php file just below the schreef in bericht 004601c249dd$9a0034a0$[EMAIL PROTECTED]">news:004601c249dd$9a0034a0$[EMAIL PROTECTED]... > Hi, > > I am using a session variable to create an area where customers can access > certain pages via login/password.

Re: [PHP] mysql upate return false?

2002-08-22 Thread Rasmus Lerdorf
That's fine. On Thu, 22 Aug 2002, Randy Johnson wrote: > Is this a proper way to see if an insert has failed? > > $Query="insert blah into blah where blah=blah"; > if (! mysql_query($Query,$link)) > { > $dberror= mysql_error() > } > > > Is there a better way to do it? > > R

Re: [PHP] PDFlib error help --

2002-08-22 Thread Hank Marquardt
Well an answer, even one I didn't want is better than no answer -- I only thought a band-aid might be around as the code did work at one time ... oh well, I guess I'm going to go learn more about PDFlib than I ever wanted to:( Thanks for the help. On Thu, Aug 22, 2002 at 07:53:13AM -0700, Rasmus

Re: [PHP] mysql upate return false?

2002-08-22 Thread Randy Johnson
Is this a proper way to see if an insert has failed? $Query="insert blah into blah where blah=blah"; if (! mysql_query($Query,$link)) { $dberror= mysql_error() } Is there a better way to do it? Randy - Original Message - From: "Rasmus Lerdorf" <[EMAIL PROTECTED]

Re: [PHP] mysql upate return false?

2002-08-22 Thread Adam Williams
mysql_query($sql_statement) or die ("Couldn't run UPDATE statement"); Adam On Thu, 22 Aug 2002, Randy Johnson wrote: > I have a function > > > update_trans(); > > > in a mysql_query() that processes an update, what could i check for to see > if it was successful or not.

Re: [PHP] PDFlib error help --

2002-08-22 Thread Rasmus Lerdorf
There is no bandaid for this. Your code is simply wrong. You are calling a stroke function without having a path to stroke. You need to fix the code. -Rasmus On Thu, 22 Aug 2002, Hank Marquardt wrote: > I've got an old, inherited codebase (>18months) that generates PDFs -- just > upgraded th

RE: [PHP] Pausing PHP?

2002-08-22 Thread Jay Blanchard
[snip] Is there a way to "pause" a script? [/snip] Do you want it to wait for input? Or just pause? If the second try sleep() Jay *** * Texas PHP Developers Conf Spring 2003 * * T Bar M Resort & Conference Center

Re: [PHP] mysql upate return false?

2002-08-22 Thread Rasmus Lerdorf
mysql_affected_rows() On Thu, 22 Aug 2002, Randy Johnson wrote: > I have a function > > > update_trans(); > > > in a mysql_query() that processes an update, what could i check for to see > if it was successful or not. The update only updates 1 row. > > Thanks > > Randy > > > > -- > PHP General

Re: [PHP] Pausing PHP?

2002-08-22 Thread Rasmus Lerdorf
sleep() On Thu, 22 Aug 2002, Erich Kolb wrote: > Is there a way to "pause" a script? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/

[PHP] mysql upate return false?

2002-08-22 Thread Randy Johnson
I have a function update_trans(); in a mysql_query() that processes an update, what could i check for to see if it was successful or not. The update only updates 1 row. Thanks Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Pausing PHP?

2002-08-22 Thread Erich Kolb
Is there a way to "pause" a script? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PDFlib error help --

2002-08-22 Thread Hank Marquardt
I've got an old, inherited codebase (>18months) that generates PDFs -- just upgraded the server and libraries and php versions and now the PDF stuff is broken -- a quick scan of the archive and on google didn't this issue on there. The error I'm getting is: PDFlib error: function 'PDF_stroke' mu

[PHP] oops - solved re: insert fails w/ postgres database

2002-08-22 Thread Javier Montserat
the filename field is of type 'oid' rather than 'character varying'... yep, inserting a string into an oid feild will make the db baarrrfff... Saludos Javier _ Chat with friends online, try MSN Messenger: http://messenger.msn.co

[PHP] insert query fails w/ postgres database

2002-08-22 Thread Javier Montserat
Hello PHP people... I'm trying to insert a filename (string) into a postgres database field but the insert query is failing - Warning: pg_exec() query failed: ERROR: oidin: error in "abc_abcde012_010_mpeg1.mpeg": can't parse "abc_abcde012_010_mpeg1.mpeg" in /usr/local/apache/htdocs/filename.ph

[PHP] search in serialized string

2002-08-22 Thread Rodrigo Peres
Hi list, I have a form to post resumes. In one parte the user have a option to choose up to 5 languages and his knowledge in it. example : english: basic advanced My problem is that was stored serialized in the BD and now I need to do a search by language and knowledge. How can I do this. I

[PHP] Replacing an uploaded file

2002-08-22 Thread Jay Blanchard
Really I am just thinking out loud here as the subject just came up in an early morning meeting, so bear with me (I look forward to your opinions / ideas on this) ... Does the autoglobal $_FILES contain a ['time'] or ['timestamp']? If not I could use a filemtime() to test each file. Anyhow, we h

Re: [PHP] Eregi_replace

2002-08-22 Thread Bas Jobsen
eregi_replace(']+>','',$string); Op donderdag 22 augustus 2002 14:42, schreef Roman Duriancik: > How to create pattern for function eregi_replace to > replace in html document every html tag for empty string. > > Thanks > > > roman -- PHP General Mailing List (http://www.php.net/) To unsubscri

[PHP] Question about sessions: how to force expiry

2002-08-22 Thread DonPro
Hi, I am using a session variable to create an area where customers can access certain pages via login/password. If they successfully login, I create a session variable and initialize it with their logon username. I also have a logout button which unregisters the session variables and issues a

[PHP] in_array

2002-08-22 Thread Riccardo Sepe
jochen schultz wrote: > Hi Riccardo, > > > >> if(mysql_num_rows($rty->resu)) { //result >> $rec = mysql_fetch_array($rty->resu); >>if(!isset($_SESSION["bkmks"]) || > > > When you save something for the first time, the element of > $_SESSI

[PHP] PHP search function for MySQL db

2002-08-22 Thread Kristoffer Strom
I've set up a mysql db to store all news updates at our site and I'm thinking about setting up a search function so our visitors can search the news db after specifics words or strings. Is there somewhere some nice place that have posted a "change-some-variables-then-its-ready-to-go" PHP file some

[PHP] Eregi_replace

2002-08-22 Thread Roman Duriancik
How to create pattern for function eregi_replace to replace in html document every html tag for empty string. Thanks roman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Active page

2002-08-22 Thread Kondwani Spike Mkandawire
"Budi Kelana" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > I want to make a web page that can retrive data from my tables > automatically, periodically. > Does PHP have some timer control ? > I know we can do with JavaScript (setInterval() or setTime

Re: [PHP] open_basedir restriction?

2002-08-22 Thread Jason Wong
On Thursday 22 August 2002 19:31, Thomas Goeminne wrote: > I am getting this message running one off my neat scripts? what does the > basedir restriction mean? Put simply you're not allowed to access files that are outside of the directory specified by "open_basedir". See php.ini and manual ->

Re: [PHP] phpnuke installation.

2002-08-22 Thread Jason Wong
On Thursday 22 August 2002 18:20, Thomas Goeminne wrote: > Dear programmers, > > I have some trouble setting up a php nuke version on Just because there is php in the name phpnuke, it does not automatically mean it's a php question. You are asking in the wrong place. Try the phpnuke support for

[PHP] open_basedir restriction?

2002-08-22 Thread Thomas Goeminne
I am getting this message running one off my neat scripts? what does the basedir restriction mean? Warning: open_basedir restriction in effect. File is in wrong directory in /www/T/tgoeminne/web/www.hiphopstore.be/admin/includes/application_top.php on line 175 Warning: Failed opening '/admin/inc

Re: [PHP] in_array()

2002-08-22 Thread jochen schultz
Hi Riccardo, >if(mysql_num_rows($rty->resu)) { //result >$rec = mysql_fetch_array($rty->resu); > if(!isset($_SESSION["bkmks"]) || When you save something for the first time, the element of $_SESSION["bkmks"] is a string and you can compa

[PHP] phpnuke installation.

2002-08-22 Thread Thomas Goeminne
Dear programmers, I have some trouble setting up a php nuke version on http://www.mydomain.be/nuke I have put all the files in the directory nuke. But when I start the first page I get error messages. Apparantly the files are searched in www.mydomain.be and not in the directory nuke. How can i so

[PHP] in_array()

2002-08-22 Thread Riccardo Sepe
Hi every1 I got this script that works fine on my local windows pc but on the remote server (FreeBSD) I get this message: Warning: Wrong datatype for first argument in call to in_array in /usr/local/.. the script should bookmark an user choice storing it in the $_SESSION["bkmks"] array. t

[PHP] OOP / dynamic SQL class

2002-08-22 Thread jochen schultz
Hi again, i got a question concerning OOP, would be nice if anyone could help. I am trying to build a class that builds SQL statements dynamically like i send tablenames, fieldnames, etc and it should build select, insert, update... statements. e.g. i have a table PERS_DATA with following stru

Re: [PHP] Active Page

2002-08-22 Thread jochen schultz
Hello, Another possibility might be to open a persistent http connection so the update would be in realtime instead of intervals of x seconds and with a cronjob it might as well be periodically *g* search for fsockopen() or 'persistant http conection' I can confirm Yamins answer also as a much

[PHP] Active Page

2002-08-22 Thread Yamin Prabudy
your pages should be dynamic, meaning every time user open your page it keep on getting data from table how about using the Meta tags from html it will refresh you page in x seconds (define x as you need) On Thursday 22 August 2002 02:01 pm, Budi Kelana wrote: > Hi, > > I want to make a web pa

[PHP] Active page

2002-08-22 Thread Budi Kelana
Hi, I want to make a web page that can retrive data from my tables automatically, periodically. Does PHP have some timer control ? I know we can do with JavaScript (setInterval() or setTimeOut()) but I cann't join java script with PHP. I've tried make simple script with JavaScript to open new w

RE: [PHP] Re: Web Site

2002-08-22 Thread Jarrad Kabral
If your in Aus (like me) then I recommend eWay, I've used them for several sites and never had a problem. www.eway.com.au They even have some sample PHP code you can use to integrate with there system... Regards Jarrad Kabral -Original Message- From: Sami Mahamed [mailto:[EMAIL PROTE