Re: [PHP] I'm lost: text file upload

2003-03-05 Thread Hugh Danaher
move_uploaded_file(); - Original Message - From: "John Taylor-Johnston" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 05, 2003 10:33 PM Subject: [PHP] I'm lost: text file upload > Jason, I've already been looking at: > > http://www.php.net/manual/en/function.move-u

Re: [PHP] I'm lost: text file upload

2003-03-05 Thread Jason Wong
On Thursday 06 March 2003 15:18, John Taylor-Johnston wrote: > I'm a teacher. I like noise. It proves to me that people are asking > questions and are learning too! Just my 2¢ :) I wish I had teachers like you when I was at school. Our teachers told us to shut up or face detention if we made a n

Re: [PHP] I'm lost: text file upload

2003-03-05 Thread Nik Makepeace
On Thu, 2003-03-06 at 15:33, John Taylor-Johnston wrote: > I'm looking for a couple of lines of code so I can upload the contents of a *.txt > into a buffer and declare it as a string so I can spit it back in a . I > don't want to necessarily upload a text file, only load it into a buffer. > >

Re: [PHP] I'm lost: text file upload

2003-03-05 Thread John Taylor-Johnston
Where in the manual? > > I'm looking for a couple of lines of code so I can upload the contents of a > > *.txt into a buffer > You can't upload to a 'buffer', it has to be a file. Example in manual on how to > upload a file. Here? http://www.php.net/manual/en/features.file-upload.php ?? > BUT i

Re: [PHP] I'm lost: text file upload

2003-03-05 Thread Jason Wong
On Thursday 06 March 2003 14:33, John Taylor-Johnston wrote: > http://www.php.net/manual/en/function.move-uploaded-file.php > http://www.php.net/manual/en/features.file-upload.common-pitfalls.php > http://www.php.net/manual/en/features.file-upload.php > Indeed: http://ca.google.yahoo.com/bin/query

Re: [PHP] Get data from 5 tables

2003-03-05 Thread Osman Omar
ok, how do I know which data come from which table? On Wed, 5 Mar 2003, olinux wrote: > SELECT * FROM table1, table2, table3, table4 > WHERE id = 1 AND > table1.id=table2.id AND > table2.id=table3.id AND > table3.id=table4.id AND > etc. > > > or you can use a JOIN > http://www.mysql.com/doc/

[PHP] Re: How PHP recover value from another frame?

2003-03-05 Thread John Taylor-Johnston
You are going to need to start a session. http://www.php.net/manual/en/ref.session.php http://www.php.net/manual/en/function.session-start.php The idea was to see if $variable was in the session. If it was, use the session variable. I was passing a lot of variables through before this, until I

Re: [PHP] Get data from 5 tables

2003-03-05 Thread olinux
SELECT * FROM table1, table2, table3, table4 WHERE id = 1 AND table1.id=table2.id AND table2.id=table3.id AND table3.id=table4.id AND etc. or you can use a JOIN http://www.mysql.com/doc/en/JOIN.html --- Osman Omar <[EMAIL PROTECTED]> wrote: > Hi, > > How do I query to get data from 5 tables wi

[PHP] How PHP recover value from another frame?

2003-03-05 Thread M
Hello, I know probably this question already solved, but I couldnt find msgs about. I have page with two frames. frameA is built by frameA.php and frameB is built by frameB.php scripts. Into frameA is form variable named 'varA', frameA.formA.varA.value = 'ok' . I know PHP knows this variable as

[PHP] Get data from 5 tables

2003-03-05 Thread Osman Omar
Hi, How do I query to get data from 5 tables with same id. (id=1). eg, table1 id data 1 blue 2 green table2 id data 1 yellow 3 green table3 id data 1 black 4 white etc. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.

[PHP] I'm lost: text file upload

2003-03-05 Thread John Taylor-Johnston
Jason, I've already been looking at: http://www.php.net/manual/en/function.move-uploaded-file.php http://www.php.net/manual/en/features.file-upload.common-pitfalls.php http://www.php.net/manual/en/features.file-upload.php Indeed: http://ca.google.yahoo.com/bin/query_ca?p=php.net+upload+file and ht

[PHP] Mkdir() and fdopen()

2003-03-05 Thread ML
When trying to create files/directories with PHP, in terms of the system, who would be the user actually performing those actions? Would it be the nobody user which runs the apache web daemons? I am trying to figure out a safe way to make files writeable, but hopefully chown-ing those files/dirs th

Re: [PHP] fread or not?

2003-03-05 Thread Jason Wong
On Thursday 06 March 2003 11:41, John Taylor-Johnston wrote: > I need to upoload a local text file into memory using: > > > The script below will only work if I am using my localhost. > > Any ideas? What happens when you're NOT using localhost? And as this is an upload problem, try searching the

Re: [PHP] Installing PHP and MySQL on Linux machine

2003-03-05 Thread Jason Wong
On Thursday 06 March 2003 13:32, John Almberg wrote: You have started a new thread by taking an existing posting and replying to it while you changed the subject. That is bad, because it breaks threading. Whenever you reply to a message, your mail client generates a "References:" header that tell

Re: [PHP] Verifying encrypted password from MySQL database with PHP

2003-03-05 Thread Jason Wong
On Thursday 06 March 2003 13:21, Chinmoy Barua wrote: > I have an user table where the username and passwords of the users are > stored. The passwords are stored in encrypted format (the MySQL function > 'ENCRYPT($password) is used for insertation). > > Now I want to varify username and password.

[PHP] Installing PHP and MySQL on Linux machine

2003-03-05 Thread John Almberg
I've got both MySQL and PHP working independantly on my Linux web server. That is, I can view PHP web pages via Apache and I can access MySQL from the command line, set up databases, tables, etc. What I can't do is get them working together. When trying to make a connection in the usual way: $

[PHP] Verifying encrypted password from MySQL database with PHP

2003-03-05 Thread Chinmoy Barua
Hello, I have an user table where the username and passwords of the users are stored. The passwords are stored in encrypted format (the MySQL function 'ENCRYPT($password) is used for insertation). Now I want to varify username and password. For that, I have written the followin PHP code: ---

Re: [PHP] dynamic link converter

2003-03-05 Thread Nik Makepeace
On Thu, 2003-03-06 at 05:49, electroteque wrote: > hi there i am trying tom preg_replace on a string enclosed in brackets to > denote a dynamic link This works, if I understand you correctly: http://www.eletroteque.dyndns.org/index_html.php|Eletroteque Multimedia]";

Re: [PHP] PHP vs. CGI

2003-03-05 Thread michael kimsal
John Taylor-Johnston wrote: Three advantages I like: 1- no more cgiwrap. 2- thus I can work in any directory and am not bound to cgi-bin 'being bound to cgi-bin' is a function of how the server is set up, not 'cgi' itself. I've worked on systems where anything ending in .cgi was treated as a cgi s

RE: [PHP] remove a line from a text list

2003-03-05 Thread John W. Holmes
> Your code works as you'd expect ... on my mod_php 4.2.2 & Apache 1.3.26 > setup. It's amazing though, because implode() is used incorrectly. > See below: [snip] > Try switching the arguments around in the call to implode(), to: > $lines = implode('',$recordsarray); > > http://www.php.net/manual

RE: [PHP] Log In

2003-03-05 Thread John W. Holmes
>> Is there a handy function in PHP that I can use to retrieve the users >> Windows Log in? We are creating an application that will allow users to >> add comments to a mysql database, and we would like to be able to track >> who is putting the comments into the table, preferably with their window

RE: [PHP] preg_match fails to fill $matches

2003-03-05 Thread John W. Holmes
> >> The full code in the loop is. > >> Later on in the code after the loop I do > >> > >> echo "printing array matches "; > >> print_r ($matches);echo ""; > > > >$matches is going to be over-written after every time through the loop! > It > >doesn't add it all up. > > > >Add in a > > > >$var[] = $

[PHP] fread or not?

2003-03-05 Thread John Taylor-Johnston
I need to upoload a local text file into memory using: The script below will only work if I am using my localhost. Any ideas? John \n"; if (!$filename) { echo "!\$filename \n"; }else{ #$filename = "/usr/local/something.txt"; #echo "\$filename $filename\n"; $handle = fopen ($filename, "r");

Re: [PHP] RedHat 8.0 MySQL Problem

2003-03-05 Thread Jason Wong
On Thursday 06 March 2003 09:05, Daevid Vincent wrote: > Wouldn't that technically be "downgrade", since RH8 ships with Apache 2.0 > *smirk* > > But yes, however, keep in mind that when you do 'downgrade' you will run > into the constant annoyance that up2date will always want to install a > newer

Re: [PHP] dynamic link converter

2003-03-05 Thread Nik Makepeace
On Thu, 2003-03-06 at 05:49, electroteque wrote: > hi there i am trying tom preg_replace on a string enclosed in brackets to > denote a dynamic link This works, if I understand you correctly: http://www.eletroteque.dyndns.org/index_html.php|Eletroteque Multimedia]";

Re: [PHP] print "$array[$i][0]" pukes

2003-03-05 Thread Leif K-Brooks
print "$i :: {$manilist[$i][0]}\n"; David T-G wrote: OK. That works, though it isn't pretty. Is there any way I can avoid doing the dot dance? I'd rather something like print "$i :: ${manilist[$i]}[0]\n" ; (which I know to not work! :-) than to have to open and close; that's just not very cl

Re: [PHP] print "$array[$i][0]" pukes

2003-03-05 Thread David T-G
Chris -- ...and then Chris Wesley said... % % On Wed, 5 Mar 2003, David T-G wrote: % % > $m = count($manilist) ; % > for ( $i=0 ; $i<$m ; $i++ ) % > { print "$i :: $manilist[$i][0]\n" ; } ... % % Actually, it's literally printing "[0]" after it prints "Array". PHP is Right. % detect

Re: [PHP] print "$array[$i][0]" pukes

2003-03-05 Thread Chris Wesley
On Wed, 5 Mar 2003, David T-G wrote: > $m = count($manilist) ; > for ( $i=0 ; $i<$m ; $i++ ) > { print "$i :: $manilist[$i][0]\n" ; } > > I simply get 'Array[0]' out for each inner.. Clearly php is seeing that > $manilist[$i] is an array, telling me so, and then happily printing the > "[0

[PHP] print "$array[$i][0]" pukes

2003-03-05 Thread David T-G
Hi, all -- I have a two-dimensional array built from reading a file and I'm having trouble accessing a value of an inner array. I know, particularly with some help from print_r(), that the arrays are filled in properly. I can do $m = count($manilist) ; for ( $i=0 ; $i<$m ; $i++ ) { $ml

Re: [PHP] Log In

2003-03-05 Thread Hugh Danaher
Rob, create a mysql table containing usernames and passwords then do something like the following: Hope this helps, Hugh "; print "log in information"; print "Input your name: "; print "Input your password: "; print ""; print ""; } else { call_user_func('mysql_log_in',$db, $table, $user,

RE: [PHP] RedHat 8.0 MySQL Problem

2003-03-05 Thread Daevid Vincent
Wouldn't that technically be "downgrade", since RH8 ships with Apache 2.0 *smirk* But yes, however, keep in mind that when you do 'downgrade' you will run into the constant annoyance that up2date will always want to install a newer php and httpd (they don't even call it apache for the rpm grrr), s

[PHP]

2003-03-05 Thread John Taylor-Johnston
Instead of using fread, I want to upload a *.txt file using: and display it in a textarea. Where do I go now? Specifically, how do I get $contents? Thanks, John $contents";} else{echo "no contents there";} ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://ww

Re: [PHP] What solution to use for mass newsletter mailing & reporting?

2003-03-05 Thread J J
Interesting way of tracking everything... and I like the idea of the pop-up being able to query the database for current status. For now, I'm firing off a process with no timeout and it can run even after browser abort... but no real way to check on it other than I send a "mailing complete" type e

Re: [PHP] preg_match fails to fill $matches

2003-03-05 Thread {R}ichard Ashton
On Wed, 5 Mar 2003 12:06:41 -0500, 1LT John W. Holmes wrote: >> The full code in the loop is. >> Later on in the code after the loop I do >> >> echo "printing array matches "; >> print_r ($matches);echo ""; > >$matches is going to be over-written after every time through the loop! It >doesn't add

[PHP] error checking with fread

2003-03-05 Thread John Taylor-Johnston
http://www.php.net/manual/en/function.fread.php What about error checking if the file contains something as I include below? Is that enough? Is this the right way? $contents";} else{echo "no contents there";} ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://w

Re: [PHP] Log In

2003-03-05 Thread Leif K-Brooks
No. Van Andel, Robbert wrote: Is there a handy function in PHP that I can use to retrieve the users Windows Log in? We are creating an application that will allow users to add comments to a mysql database, and we would like to be able to track who is putting the comments into the table, preferab

[PHP] Log In

2003-03-05 Thread Van Andel, Robbert
Is there a handy function in PHP that I can use to retrieve the users Windows Log in? We are creating an application that will allow users to add comments to a mysql database, and we would like to be able to track who is putting the comments into the table, preferably with their windows log in.

Re: [PHP] Newbie Problem with an IF Statement

2003-03-05 Thread Leif K-Brooks
What the heck? The string "[status]='active'" doesn't check anything. It is converted to boolean by the if statment, which will be true, as it's not an empty string. I'm guessing you want to use if($status=='active'){ Hunter, Jess wrote: I have a short bit of code that contains an if/else th

[PHP] Re: Newbie Problem with an IF Statement

2003-03-05 Thread Clete Rivers Blackwell 2
You need ==, not just =... also, [status] is nothing... try $status... "Jess Hunter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a short bit of code that contains an if/else that is causing me some > trouble, I am sure that the answer is staring me straight in the face, a

Re: [PHP] pharse file random work with -n lines

2003-03-05 Thread Chris Hayes
At 01:27 6-3-2003, you wrote: // Code start $i = 0; $fp = fopen ("./../../cgi-bin/Classifieds/data/ads.data", "r"); while($tmp= fgetcsv($fp,5,"\|")) { $array[]=$tmp; } fclose ($fp); $rand_array=array_rand($array, 10); foreach($rand_array as $line) { did you check to print_r($line); here to s

[PHP] Newbie Problem with an IF Statement

2003-03-05 Thread Hunter, Jess
I have a short bit of code that contains an if/else that is causing me some trouble, I am sure that the answer is staring me straight in the face, and I am not seeing it. Can someone take a look and see where I am coding wrong? if ("[status]='active'"){ print ("the active line\n"); } else { pri

[PHP] Re: fopen

2003-03-05 Thread John Taylor-Johnston
Mat>To get data out of the file that you Mat>have opened, you will need to read() it n. Mat>http://www.php.net/manual/en/function.fread.php Ok, how about this? What about error checking if the file contains something as I include below? Is that enough? $contents";} else{echo "no contents there";

Re: [PHP] adding a comma between a list of file names

2003-03-05 Thread Kevin Stone
The simplest way would be to build an array of filenames then implode the array. $handle = opendir($emaildir); while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $emailes[] =substr($file,0,strpos($file,'.')); } } closedir($handle); $emailes = implode(',',

Re: [PHP] fopen

2003-03-05 Thread Mat Harris
that example code is trying to print out data which refers to the integer filehandle of the fopen. To get data out of the file that you have opened, you will need to read() it in. John Taylor-Johnston wrote: #http://www.php.net/manual/en/function.fopen.php $contents = fopen ("/home/pathto/file.

Re[2]: [PHP] adding a comma between a list of file names

2003-03-05 Thread Richard Kurth
Hello Jonathan, Thanks I know it was something simple like that. Wednesday, March 5, 2003, 2:42:41 PM, you wrote: JP> Richard, JP> $handle = opendir($emaildir); JP> $emailes = ""; JP> while (false !== ($file = readdir($handle))) { JP> if ($file != "." && $file != "..") { JP>

Re: [PHP] fopen

2003-03-05 Thread Kevin Stone
Please take another look at the manual page on fopen(). You're not using it correctly. fopen() does not return the contents of the file, it retuns a resource handel. You pass the handel as a parameter to fread() in order to read the file. http://www.php.net/manual/en/function.fread.php If all y

[PHP] Re: PHP WEB module doesn't execute php console scripts?

2003-03-05 Thread Setec Astronomy
Alex Ciurea wrote: > Hello, > > I have a linux-debian machine. I've installed the php-module for the > apache web server, and I've realized that my php scripts (launced > from console) doesn't work. > > What should I install in order to make working those php-scripts ? To execute PHP scripts

Re: [PHP] adding a comma between a list of file names

2003-03-05 Thread Jonathan Pitcher
Richard, $handle = opendir($emaildir); $emailes = ""; while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { if ($emailes != "") { $emailes .=substr($file,0,strpos($file,'.')); } else

Re: [PHP] 2 PHP 4.2.2 issues: server keeps working after clientdisconnects, session_start() blocks until other session scripts complete

2003-03-05 Thread Michael Kedl
On Wed, 2003-03-05 at 16:15, Rasmus Lerdorf wrote: > > Hello all, I have 2 questions that have come up because I have several > > long reports that can take 1-2 minutes to run. These are run from any > > web client thru our linux -> apache -> php -> mysql system. > > > > 1)server keeps working af

[PHP] adding a comma between a list of file names

2003-03-05 Thread Richard Kurth
The scrip below will list all the files in a directory and also strip off every thing in the file name after a . so if I have files named 1.txt 2.txt 324.txt 5.txt it gives me a list that looks like this 123245. I need to add a , in between each of these file names so they will look

Re: [PHP] some help needed building chat-app

2003-03-05 Thread Michiel van Heusden
thanks for your replies the other thing i was trying to ask :) is how to keep on looping and looking for new messages is just a plain loop ok or should i use a timer or whatsoever, i have no clue right now it's a bit like $x = "loop"; do while ($x == "loop") { //mysql_query (select new messages

[PHP] Re: fopen

2003-03-05 Thread KK
the @ before the fopen just tells php to suppress the error message if it can't open the file. that's all it does. "John Taylor-Johnston" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > #http://www.php.net/manual/en/function.fopen.php > > $contents = fopen ("/home/pathto/file.txt", "

[PHP] Re: PHP vs. CGI

2003-03-05 Thread John Taylor-Johnston
If you switch over, will you be able to port your database? > Does PHP use less system resources than CGI on a server? > I have a bulletin board which is incredibly active, but there is a PHP > sister to it. Again, when coding for a BB, I appreciate not being bound to work in /cgi-bin/ especial

Re: [PHP] PHP vs. CGI

2003-03-05 Thread John Taylor-Johnston
Three advantages I like: 1- no more cgiwrap. 2- thus I can work in any directory and am not bound to cgi-bin 3- Sheer ease of coding. A lot easier to learn, it's open-source and newsgroups are more helpful. Perl groups are less helpful, programmer centred and not newbie-friendly. Just my 2¢ --

[PHP] fopen

2003-03-05 Thread John Taylor-Johnston
#http://www.php.net/manual/en/function.fopen.php $contents = fopen ("/home/pathto/file.txt", "r"); if ($contents){echo"$contents";} else{echo "no contents there";} Questions: What is the use of "@fopen"? Does anyone see a better way? -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] PHP vs. CGI

2003-03-05 Thread David T-G
Mike -- ...and then SpyProductions Support Team said... % % Does PHP use less system resources than CGI on a server? Now that we know that by 'CGI' you mean 'perl' we're at least getting *somewhere*. We don't really know what you mean, though, so I''ll see if I can fill out the truth table for

RE: [PHP] PHP vs. CGI

2003-03-05 Thread Mike At Spy
Sorry, yes. :) -Mike > -Original Message- > From: Leif K-Brooks [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 05, 2003 4:45 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] PHP vs. CGI > > > CGI meaning perl? > > SpyProductions Support Team wrote: > > >D

php-general@lists.php.net

2003-03-05 Thread Lowell Allen
> From: J J <[EMAIL PROTECTED]> > > What do you use for mass newsletter mailing say for > 5000+ members every month? At the same time, I'd like > to be able to track who opened the message, any links > they clicked inside the message, bounced messages, > etc. > > I keep seeing reports that PHP/m

[PHP] Sessions and simultaneous download problem

2003-03-05 Thread Kotaro Kikuchi
I have an corporate intranet that users must login to access and inside it they can download files. The script is like: session_start -> check user -> fopen -> fread - > print headers -> print data It works fine but it allows me download only one file. The second download is queued until the firs

Re[2]: [PHP] remove a line from a text list

2003-03-05 Thread Richard Kurth
Hello Chris, Don't know how I did that but it worked strange. Maybe the reason I am getting the extra line is because I am testing the script on Windows 200 and not on a good Linux box. Wednesday, March 5, 2003, 1:37:43 PM, you wrote: CW> On Wed, 5 Mar 2003, Richard Kurth wrote: >> This script

Re: [PHP] PHP vs. CGI

2003-03-05 Thread Leif K-Brooks
CGI meaning perl? SpyProductions Support Team wrote: Does PHP use less system resources than CGI on a server? I have a bulletin board which is incredibly active, but there is a PHP sister to it. Thanks, -Mike -- The above message is encrypted with double rot13 encoding. Any unauthorized

Re: [PHP] remove a line from a text list

2003-03-05 Thread Leif K-Brooks
"Note: implode() can, for historical reasons, accept its parameters in either order. For consistency with explode(), however, it may be less confusing to use the documented order of arguments." Chris Wesley wrote: The above line: I'm assuming you want to collapse $recordsarray into a sting, wi

[PHP] PHP vs. CGI

2003-03-05 Thread SpyProductions Support Team
Does PHP use less system resources than CGI on a server? I have a bulletin board which is incredibly active, but there is a PHP sister to it. Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] remove a line from a text list

2003-03-05 Thread Chris Wesley
On Wed, 5 Mar 2003, Richard Kurth wrote: > This script will remove a line from a text list of email address and > then re-write the list. The only problem I am having is when it > re-writes the list it adds a extra line between each record. How can I > stop this from happening Your code works as

[PHP] Re: IT WORKS!!!!

2003-03-05 Thread Clete Rivers Blackwell 2
Um... what works? "Luis A" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] HEY AA IT WORKS FINALY WORK IT !! I FIND WHERE WAS THEE PROBLEM THE PROBLEM WAS ON THE method i forgat to put extract ($GEt); jajaaj thanks pals -- PHP General Mailing List (http://ww

[PHP] pharse file random work with -n lines

2003-03-05 Thread WebDev
// Code start $i = 0; $fp = fopen ("./../../cgi-bin/Classifieds/data/ads.data", "r"); while($tmp= fgetcsv($fp,5,"\|")) { $array[]=$tmp; } fclose ($fp); $rand_array=array_rand($array, 10); foreach($rand_array as $line) { list($adnr, $user, $date, $listed, $hlong, $eins, $zwei, $drei, $vier

Re: [PHP] language translations on php site

2003-03-05 Thread Richard Baskett
Take a look at: http://www.php.net/manual/en/reserved.variables.php and scroll down to the HTTP_ACCEPT_LANGUAGE constant. When you set your language variable within your browser, the HTTP_ACCEPT_LANGUAGE constant can be accessed by $_SERVER['HTTP_ACCEPT_LANGUAGE']. It results in a two letter code

[PHP] IT WORKS!!!!

2003-03-05 Thread Luis A
HEY AA IT WORKS FINALY WORK IT !! I FIND WHERE WAS THEE PROBLEM THE PROBLEM WAS ON THE method i forgat to put extract ($GEt); jajaaj thanks pals

Re: [PHP] 2 PHP 4.2.2 issues: server keeps working after clientdisconnects, session_start() blocks until other session scripts complete

2003-03-05 Thread Rasmus Lerdorf
> Hello all, I have 2 questions that have come up because I have several > long reports that can take 1-2 minutes to run. These are run from any > web client thru our linux -> apache -> php -> mysql system. > > 1)server keeps working after client disconnects > If a php script is running and it ma

Re[2]: [PHP] remove a line from a text list

2003-03-05 Thread Richard Kurth
Hello Jason, Wednesday, March 5, 2003, 12:38:39 PM, you wrote: JW> On Thursday 06 March 2003 04:18, Richard Kurth wrote: >> This script will remove a line from a text list of email address and >> then re-write the list. The only problem I am having is when it >> re-writes the list it adds a ext

[PHP] dynamic link converter

2003-03-05 Thread electroteque
hi there i am trying tom preg_replace on a string enclosed in brackets to denote a dynamic link $message = "[http://www.eletroteque.dyndns.org/index_html.php|Eletroteque Multimedia]"; echo $message = preg_replace("/((http(s?):\/\/)|(www\.))([\w\.]+)([\/\w+\.]+)([\|\w+\.]+)\b/ i", "\\7", $message);

[PHP] language translations on php site

2003-03-05 Thread electroteque
Set your own language preference [01-Mar-2003] Starting from today, your browser's "Accept Language" setting is also honored on language sensitive pages on the php.net site. If you would like to get to the documentation page of echo for example, you can use the /echo shortcut on all mirror sites, i

[PHP] 2 PHP 4.2.2 issues: server keeps working after client disconnects,session_start() blocks until other session scripts complete

2003-03-05 Thread Michael Kedl
Hello all, I have 2 questions that have come up because I have several long reports that can take 1-2 minutes to run. These are run from any web client thru our linux -> apache -> php -> mysql system. 1)server keeps working after client disconnects If a php script is running and it may take 1-3 m

Re: [PHP] remove a line from a text list

2003-03-05 Thread Jason Wong
On Thursday 06 March 2003 04:18, Richard Kurth wrote: > This script will remove a line from a text list of email address and > then re-write the list. The only problem I am having is when it > re-writes the list it adds a extra line between each record. How can I > stop this from happening > > $rec

Re: [PHP] File Access Rights

2003-03-05 Thread Pushpinder Singh Garcha
The error that I get is a "Permission Denied" Message !! --Puspinder On Wednesday, March 5, 2003, at 03:27 PM, Kevin Stone wrote: chmod($file, 0600); This sets the file to Owner read and write, Group nothing, Public nothing. If you're on a shared server then chances are this function has been

Re: [PHP] File Access Rights

2003-03-05 Thread Pushpinder Singh Garcha
Thanks Kevin I have tried to chmod the file ...but I need to give others the permission to read the file...or the script itself cannot open the file ! --Pushpinder On Wednesday, March 5, 2003, at 03:27 PM, Kevin Stone wrote: chmod($file, 0600); This sets the file to Owner read and write, Gro

Re: [PHP] File Access Rights

2003-03-05 Thread Kevin Stone
chmod($file, 0600); This sets the file to Owner read and write, Group nothing, Public nothing. If you're on a shared server then chances are this function has been disabled so you may have to FTP or SSH into your account and set the permissions for the file manually using the chmod command. Good

Re: [PHP] File Access Rights

2003-03-05 Thread Jason Wong
On Thursday 06 March 2003 03:51, Pushpinder Singh Garcha wrote: > My php script needs to read a text file that is stored in the same Dir > as the php file. However I do not want to allow users to be able to see > the contenst of the file from the Browser. Please suggest some remedy. If you're usi

[PHP] remove a line from a text list

2003-03-05 Thread Richard Kurth
This script will remove a line from a text list of email address and then re-write the list. The only problem I am having is when it re-writes the list it adds a extra line between each record. How can I stop this from happening $recordsarray = file($members); $remove = "[EMAIL PROTECTED]"; $temp

[PHP] File Access Rights

2003-03-05 Thread Pushpinder Singh Garcha
Hello all My php script needs to read a text file that is stored in the same Dir as the php file. However I do not want to allow users to be able to see the contenst of the file from the Browser. Please suggest some remedy. Thanks in advance Pushpinder Singh Garcha

RE: [PHP] Date Question.

2003-03-05 Thread Don Read
On 05-Mar-2003 Sebastian wrote: > I have a date field in mysql in this format: Y-m-d H:i:s > > I would like to echo "Today" if the date is today, can someone offer some > help? Thanks. > SELECT IF(TO_DAYS(datefld)=TO_DAYS(current_date),'Today',LEFT(datefld,10)) as datefld, ... Regards, -- Don

Re: [PHP] Re: Date Question.

2003-03-05 Thread Sebastian
Thank you very much, That worked well. warm regards, Sebastian. - Original Message - From: "Kevin Stone" <[EMAIL PROTECTED]> To: "Sebastian" <[EMAIL PROTECTED]>; "Philip Hallstrom" <[EMAIL PROTECTED]> Cc: "php list" <[EMAIL PROTECTED]> Sent: Wednesday, March 05, 2003 2:38 PM Subject: Re:

Re: [PHP] Re: Date Question.

2003-03-05 Thread Kevin Stone
He's recommending something like this.. $tmp = explode(' ', $date); if (date("Y-m-d") == $tmp[0]) // date format -mm-dd { echo "Today"; } Seems like a reasonable solution to me. Read the manual if you need more information.. http://www.php.net/manual/en/function.explode.php http://www.p

Re: [PHP] Re: Date Question.

2003-03-05 Thread Sebastian
can you give an example? I am stil learning :) - Original Message - From: "Philip Hallstrom" <[EMAIL PROTECTED]> | Strip off the H:i:s part using explode() and use date() to get an | equivalent string for right now and if they match, today's the day. | | On Wed, 5 Mar 2003, Sebastian wro

Re: [PHP] updating pages with php

2003-03-05 Thread Liam Gibbs
<> Escape them by putting a slash in front of them. If you have a line of text that says 'This is the problem area I don't want to screw up', put 'This is the problem area I don\'t want to screw up'. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/uns

[PHP] Re: Need help with ?> vs. php?>

2003-03-05 Thread Clete Rivers Blackwell 2
Don't know if anyone said it, but you do not need to use php?>, it's invalid AFAIK... just probably as they said, set short_tags=On in php.ini or something similar... "Jean-Louis Letortorec" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello everyone, > > I've installed the Apache

Re: [PHP] updating pages with php

2003-03-05 Thread Brent Baisley
Before you save the paragraph into the db, use the addslashes() function like this: $textVar = addslashes($textVar); That escapes all the characters like commas, return and whatever else MySQL may have trouble with. The reverse the process before you display it: nl2br(stripslashes($textVar)) T

Re: [PHP] TO Bryan LipscyRe: [PHP] i got a problem

2003-03-05 Thread Luis A
it does not working its the same :( some one else can help me whit that ??? - Original Message - From: "Bryan Lipscy" <[EMAIL PROTECTED]> To: "'Luis A'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, March 05, 2003 1:17 PM Subject: RE: [PHP] TO Bryan LipscyRe: [PHP] i got a

[PHP] Re: Date Question.

2003-03-05 Thread Philip Hallstrom
Strip off the H:i:s part using explode() and use date() to get an equivalent string for right now and if they match, today's the day. On Wed, 5 Mar 2003, Sebastian wrote: > I have a date field in mysql in this format: Y-m-d H:i:s > > I would like to echo "Today" if the date is today, can someone

Re: [PHP] updating pages with php

2003-03-05 Thread Tyler Durdin
They are all text fields. Intro title is just a line of text that says "Welcome to this website..." Intro, is the text of the introduction. You are correct and it is apostophe's and not comma's that cause the error. What do I do to get around that? From: "Liam Gibbs" <[EMAIL PROTECTED]> To:

Re: [PHP] mortgage calculator

2003-03-05 Thread Lowell Allen
> From: "Karen E. Lubrecht" <[EMAIL PROTECTED]> > > I'd like to add a mortgage calculator to a client's site. I've been unable > to find the formula. In searching php.net, I found a discussion from back in > 2000 related to some buggy code. My web search hasn't produced anything > other than realt

Re: [PHP] updating pages with php

2003-03-05 Thread Liam Gibbs
> $Query = "UPDATE $TableName SET Intro_Title = '$Intro_Title', Intro = > '$Intro' WHERE ID = '$ID'"; But what's being sent to SQL? What's contained in $TableName, $Intro_Title, etc.? And what data types are all those fields? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

[PHP] Date Question.

2003-03-05 Thread Sebastian
I have a date field in mysql in this format: Y-m-d H:i:s I would like to echo "Today" if the date is today, can someone offer some help? Thanks. warm regards, Sebastian - [BBR] Gaming Clan http://www.broadbandreports.com

[PHP] problem changing max file upload size

2003-03-05 Thread Kenn Murrah
Greetings. I'm having trouble uploading large files via PHP ... in my php.ini file, i have the lines: post_max_size = 100M upload_max_filesize = 100M yet I still can't get large files to upload. What am I doing wrong? Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] updating pages with php

2003-03-05 Thread Tyler Durdin
$Query = "UPDATE $TableName SET Intro_Title = '$Intro_Title', Intro = '$Intro' WHERE ID = '$ID'"; From: "Liam Gibbs" <[EMAIL PROTECTED]> To: "php list" <[EMAIL PROTECTED]> Subject: Re: [PHP] updating pages with php Date: Wed, 5 Mar 2003 13:33:11 -0500 > What I have discovered is that I can m

Re: [PHP] updating pages with php

2003-03-05 Thread Liam Gibbs
> What I have discovered is that I can manually type it in the mysql server > with whatever characters I want, but when I try to update it with a sql file > or via the webpage I created with the comma's it gives me errors. I take > them out of the sql text and webpage and it works fine. The proble

[PHP] PHP WEB module doesn't execute php console scripts?

2003-03-05 Thread Alex Ciurea
Hello, I have a linux-debian machine. I've installed the php-module for the apache web server, and I've realized that my php scripts (launced from console) doesn't work. What should I install in order to make working those php-scripts ? I know that's a silly q, but this is the first time when I

Re: [PHP] updating pages with php

2003-03-05 Thread Liam Gibbs
<> Don't forget to escape apostrophes and double quotation marks where needed. Also, check the actual MySQL. If it contains things like double quotation marks or greater- or less-than tags, it may be misinterpreted by your browser when output. A line like: could come out like: <>$%#$" there it

RE: [PHP] updating pages with php

2003-03-05 Thread Tyler Durdin
When I take the comma's out it works. then I try to put them back in and it will not work. What I have discovered is that I can manually type it in the mysql server with whatever characters I want, but when I try to update it with a sql file or via the webpage I created with the comma's it give

RE: [PHP] Re: php forgetting variables very easily

2003-03-05 Thread John W. Holmes
> Include can handle URLs as the path if allow_url_fopen is set correctly > in the php.ini. But it does have some limitations if being done on a > Win32 platform instead of (*)nix. > > Try reading this, it might shed some needed light. > http://www.php.net/manual/en/function.include.php Very tru

  1   2   >