[PHP] RE: [PHP-WIN] Re: [PHP] Replace of ' in a query

2004-02-17 Thread Svensson, B.A.T. (HKG)
Never trust the web... Esacping is bad practis. Doing it, is to ask for trouble when you try to port the code to another system that a) escapes in another way, or b) does not escape at all, the transparent way to handle quote are to quote them. This has been working for the last 40 to 50 years or

Re: Re[4]: [PHP] problems with spam

2004-02-17 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > <[EMAIL PROTECTED]> > Richard Davey: > > Hello mayo, > > > > Monday, February 16, 2004, 3:51:30 PM, you wrote: > > > > m> As for my email being harvested because I wrote it out > > m> ([EMAIL PROTECTED]). Well I'll change it to > > m> som

Re: [PHP] mem

2004-02-17 Thread John Taylor-Johnston
thanks Gerard Samuel wrote: > On Wednesday 18 February 2004 01:38 am, John Taylor-Johnston wrote: > > Both for that matter. I have root access. I want to echo how much /var/xxx > > contains, and while I'm at it, how much my partition contains and how much > > is used. > > > > Im not sure about me

Re: [PHP] mem

2004-02-17 Thread John Taylor-Johnston
That was very helpful, thanks, John - Edwin - wrote: > Not that this is still a php question but... > > On Wed, 18 Feb 2004 01:38:39 -0500 > John Taylor-Johnston <[EMAIL PROTECTED]> wrote: > > > Both for that matter. I have root access. I want to echo how > > much /var/xxx contains, and while I'm

Re: [PHP] RE: Check to remove file that are older than 1 week

2004-02-17 Thread Ian Firla
On Fri, 2004-02-20 at 17:35, YC Nyon wrote: > Hi, > > I want to delete files than are older than 1 week from a specific directory. > Anyone mind to share their code? Can't anything on phpbuilder on this. > > Regards > Nyon I have a bash script that I use: #! /bin/bash # call as: ./delete_old.s

[PHP] change array

2004-02-17 Thread Max
Hello all, $x = array(03,04,08,10); $y = array(100,110,120,130); I need these arrays be converted to: $x = array(01,02,03,04,05,06,07,08,09,10,11,12,13); $y = array(0,0,100,110,0,0,0,120,0,130,0,0,0); Can somebody give an answer ? Thanks. Max

Re: [PHP] mem

2004-02-17 Thread Ian Firla
Try this: http://it2.php.net/manual/en/function.disk-free-space.php (PHP 4 >= 4.1.0) disk_free_space -- Returns available space in directory Ian On Wed, 2004-02-18 at 07:25, John Taylor-Johnston wrote: > I'm not even sure if this is a Unix thing, or if it can be done, but ... > How can I read

Re: [PHP] redirecting

2004-02-17 Thread Ian Firla
Stick something like this in your html : Location won't work because you've already sent output to the browser. Ian On Wed, 2004-02-18 at 07:19, ajay wrote: > hi! > > after having trawled through many google articles, i've been told that the best > way to redirect a person is using header("

Re: [PHP] mem

2004-02-17 Thread Gerard Samuel
On Wednesday 18 February 2004 01:38 am, John Taylor-Johnston wrote: > Both for that matter. I have root access. I want to echo how much /var/xxx > contains, and while I'm at it, how much my partition contains and how much > is used. > Im not sure about memory, but for diskspace you can look at ht

Re: [PHP] mem

2004-02-17 Thread - Edwin -
Not that this is still a php question but... On Wed, 18 Feb 2004 01:38:39 -0500 John Taylor-Johnston <[EMAIL PROTECTED]> wrote: > Both for that matter. I have root access. I want to echo how > much /var/xxx contains, and while I'm at it, how much my > partition contains and how much is used. Try

Re: [PHP] redirecting

2004-02-17 Thread John Nichel
ajay wrote: hi! after having trawled through many google articles, i've been told that the best way to redirect a person is using header("Location:url"); the problem is, i have form that is posted to another php script. This script then processes the form and then writes up a html page and include

Re: [PHP] mem

2004-02-17 Thread John Taylor-Johnston
Both for that matter. I have root access. I want to echo how much /var/xxx contains, and while I'm at it, how much my partition contains and how much is used. Gerard Samuel wrote: > On Wednesday 18 February 2004 01:25 am, John Taylor-Johnston wrote: > > I'm not even sure if this is a Unix thing,

Re: [PHP] mem

2004-02-17 Thread Gerard Samuel
On Wednesday 18 February 2004 01:25 am, John Taylor-Johnston wrote: > I'm not even sure if this is a Unix thing, or if it can be done, but ... > How can I read the amount of memory used in a directory /var/something/ > (and maybe sub-directories) and echo it? John The amount of memory or the amoun

Re: [PHP] mem

2004-02-17 Thread - Edwin -
On Wed, 18 Feb 2004 01:25:54 -0500 John Taylor-Johnston <[EMAIL PROTECTED]> wrote: > I'm not even sure if this is a Unix thing, or if it can be > done, but ... How can I read the amount of memory used in a > directory /var/something/ (and maybe sub-directories) and echo > it? Try the manual: h

Re: [PHP] redirecting

2004-02-17 Thread - Edwin -
On Wed, 18 Feb 2004 17:19:03 +1100 ajay <[EMAIL PROTECTED]> wrote: > i want the user to have say 5s to read that page and then be > redirected to another page. 'Not sure if it's only me but I think I've seen this recently ;) http://marc.theaimsgroup.com/?t=10769831404&r=1&w=2 http://marc.t

[PHP] mem

2004-02-17 Thread John Taylor-Johnston
I'm not even sure if this is a Unix thing, or if it can be done, but ... How can I read the amount of memory used in a directory /var/something/ (and maybe sub-directories) and echo it? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] redirecting

2004-02-17 Thread ajay
hi! after having trawled through many google articles, i've been told that the best way to redirect a person is using header("Location:url"); the problem is, i have form that is posted to another php script. This script then processes the form and then writes up a html page and includes in that p

Re: [PHP] Re: [ANNOUNCE] :Possibility of SA PHP conference

2004-02-17 Thread Jakes
Trust me, its the most beautiful country in the world. You will be mesmerized by the Drakensburg, or as we call it "The Berg". Other places to visit if you have the chance is, Durban, our Garden Route and Cape Town. Enjoy!!! "Alex Hogan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED

RE: [PHP] tmp_dir

2004-02-17 Thread Martin Towell
google is your friend http://www.onlamp.com/pub/a/php/2001/02/15/php_admin.html 5th bottom one.. Martin > -Original Message- > From: ajay [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 18 February 2004 4:20 PM > To: [EMAIL PROTECTED] > Subject: [PHP] tmp_dir > > > hi! > > i suppose thi

Re: [PHP] tmp_dir

2004-02-17 Thread Gerard Samuel
On Wednesday 18 February 2004 12:20 am, ajay wrote: > how do i set this variable? > Set it via php.ini. Usually php knows the temp directory the OS is using, so only set this if you need something other than the OS's temp directory... Windows: c:\windows\temp *nix: /tmp -- PHP General Mailing

Re: [PHP] Split()

2004-02-17 Thread Adam Bregenzer
On Tue, 2004-02-17 at 22:28, Jochem Maas wrote: > that was the idea: you can't have your pie at eat it right? ;-) Heh, I thought you might have done that deliberately. :) > seriously thought, John Taylor-Johnston was asking for help on while > loops and I thought I'd give him some brainfood (i.e

Re: [PHP] PHP4 vs. PHP5 test case for objects question.....

2004-02-17 Thread Adam Bregenzer
Richard, On Tue, 2004-02-17 at 19:25, Richard Gintz wrote: > Using the exact same code, I created 50 objects. It took twice as > long in php5 as it did in the older php4. >From what I remember the speed improvement with objects in PHP 5 was that they would be passed by reference, which I under

[PHP] tmp_dir

2004-02-17 Thread ajay
hi! i suppose this is more of an apache question. i'm trying to build a php file upload utility. as part of writing it i need to know the upload_tmp_dir for my apache server (its 1.3.27) i did phpinfo() and the result i getis upload_tmp_dir no value no value how do i set this variable? thanks -

Re: [PHP] Parse error

2004-02-17 Thread Jochem Maas
T_VARIABLE refers to a variable token (e.g. $foo) found in your file when the PHP parser was expecting something else. the very common typo; e.g.: (note the end of line 3 below) PHP parser token overview: http://www.phpbuilder.com/manual/tokens.php Stuart wrote: Rolf van de Krol wrote: Does any

Re: [PHP] Split()

2004-02-17 Thread Jochem Maas
Adam Bregenzer wrote: On Tue, 2004-02-17 at 15:22, Jochem Maas wrote: $applePie = array(1,2,3,4,5,6,7,8); while ($pieceOfPie = array_shift($applePie)) { echo $pieceOfPie; // want some pie? } Careful, that will eat your array as well. When the while loop finishes you won't have any pie

Re: [PHP] Problems with authentication (I think)

2004-02-17 Thread Leif Gregory
Hello Comex, Tuesday, February 17, 2004, 11:15:07 AM, you wrote: C> What does phpinfo say? It says tons of stuff. Anything in particular I should be looking for? Cheers, Leif Gregory -- TB Lists Moderator (and fellow registered end-user) PCWize Editor / ICQ 216395 / PGP Key ID 0x7CD492

Re: [PHP] Javascript array [] length is undefined when only single element

2004-02-17 Thread Adam Bregenzer
On Tue, 2004-02-17 at 20:21, Daevid Vincent wrote: > Okay kids. Here's another strange one. Very simple form. The array is > dynamically generated from PHP as per the suggested method: > http://us2.php.net/manual/en/faq.html.php#faq.html.arrays > > However, when there is only a single element, the

Re: [PHP] post variables

2004-02-17 Thread Chris Shiflett
--- julian haffegee <[EMAIL PROTECTED]> wrote: > Hi Richard > > yes it happens in Netscape 7 too, > > The thing is, it works in perl when I access the query string. But not > in php. > > could it be a setting in php.ini? Do you have a way to capture the raw HTTP? I'd like to see: 1. The HTTP R

[PHP] Javascript array [] length is undefined when only single element

2004-02-17 Thread Daevid Vincent
Okay kids. Here's another strange one. Very simple form. The array is dynamically generated from PHP as per the suggested method: http://us2.php.net/manual/en/faq.html.php#faq.html.arrays However, when there is only a single element, the myMultiSelect.length is undefined in javascript. If there ar

Re: [PHP] post variables

2004-02-17 Thread julian haffegee
Hi Richard yes it happens in Netscape 7 too, The thing is, it works in perl when I access the query string. But not in php. could it be a setting in php.ini? Jules - Original Message - From: "Richard Davey" <[EMAIL PROTECTED]> To: "julian haffegee" <[EMAIL PROTECTED]> Cc: "[EMAIL PROT

[PHP] PHP4 vs. PHP5 test case for objects question.....

2004-02-17 Thread Richard Gintz
I ran a test on the same machine for php4(port 80) vs. php5(port 8080).   Using the exact same code, I created 50 objects.  It took twice as long in php5 as it did in the older php4.    I then ran a test to access a property of the class using a method of the class.  Again, php5 was almost

Re: [PHP] Split()

2004-02-17 Thread Adam Bregenzer
On Tue, 2004-02-17 at 15:22, Jochem Maas wrote: > $applePie = array(1,2,3,4,5,6,7,8); > > while ($pieceOfPie = array_shift($applePie)) { > echo $pieceOfPie; // want some pie? > } Careful, that will eat your array as well. When the while loop finishes you won't have any pieces of pie left!

Re: [PHP] how to deal with http and https directory structures?

2004-02-17 Thread Adam Bregenzer
On Tue, 2004-02-17 at 18:39, Chris W. Parker wrote: > http root: > /home/cparker/www/domain.com/http/ > > https root: > /home/cparker/www/domain.com/https/ > > includes directory: > /home/cparker/www/domain.com/includes/ > > this way i don't have to worry about symlinks or keeping two separate >

RE: Re: [PHP] post variables (SpamEnder: BLOCKED 8BZF-SE44074-lgonze@panix.com) (fwd)

2004-02-17 Thread Chris W. Parker
Lucas Gonze on Tuesday, February 17, 2004 2:00 PM said: > Is it possible to ban subscribers who issue this kind of > auto-response? i just wish people were smart enough to understand that no one cares about the spam in the other persons mailbox. we only care about t

[PHP] how to deal with http and https directory structures?

2004-02-17 Thread Chris W. Parker
hey everyone, i'm just starting to use https with my site (got it working today) and i came up against a problem with how i create my directory tree and organize my files. originally i did the following: http root: /home/cparker/www/domain.com/ https root: /home/caprker/www/domain.com/ssl but

Re: [PHP] post variables

2004-02-17 Thread Richard Davey
Hello julian, Tuesday, February 17, 2004, 9:20:58 PM, you wrote: jh> I am having a nightmare accessing my POST variables. I can red them if I use jh> the GET method on my form, but POST is always blank A *lot* of people are reporting this as of late and I'm beginning to wonder what the true caus

[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-17 Thread Vivian Steller
Rob Richards wrote: > From: Christian Stocker > >> > $node->setAttributeNS("http://www.w3.org/2000/xmlns/";, "xmlns:b", >> > "http://www.somedomain.de/";); >> > > >> IMHO, that would be very confusing. >> >> I liked the idea by vivian with a third optional namespaceURI argument >> for the elemen

Re: [PHP] Image Quality Depreciation with GD

2004-02-17 Thread Jough P
imagecreatetruecolor() helps a lot! thanks very much!! On Feb 17, 2004, at 4:48 PM, craig wrote: Greetings, all. I'm trying to upload and crop an image. I'm not able to do it without the quality of the image suffering. I've fiddled with the quality parameter in the imagejpeg function but i

[PHP] Re: Image Quality Depreciation with GD

2004-02-17 Thread Justin Patrin
Jough P wrote: Greetings, all. I'm trying to upload and crop an image. I'm not able to do it without the quality of the image suffering. I've fiddled with the quality parameter in the imagejpeg function but it seems to have no effect. I've tried varying values and leaving the parameter out

RE: [PHP] Image Quality Depreciation with GD

2004-02-17 Thread craig
> Greetings, all. I'm trying to upload and crop an image. I'm > not able > to do it without the quality of the image suffering. I've > fiddled with > the quality parameter in the imagejpeg function but it seems > to have no > effect. I've tried varying values and leaving the parameter ou

[PHP] Re: How to access $_GET while using mod_rewrite

2004-02-17 Thread Justin Patrin
Merlin wrote: Hi there, I am using mod_rewrite which makes it impossible to use the $_GET function. However, it should be possible to do the same with a function. I figured out how to get the parameter string out of the url, now I am stuck in splitting those values into associated array elemen

[PHP] Re: mail()

2004-02-17 Thread Justin Patrin
Juan Torres wrote: Hi, I have a problem with mail() function. I'm using PHP with Windows 2000 Professional and Internet Information Server 5.0. My php code is: mail("[EMAIL PROTECTED]", "Prueba Envio Email PHP", "Linea 1\nLinea 2\nLinea 3"); And my browser shows: Warning: mail(): SMTP server resp

[PHP] Image Quality Depreciation with GD

2004-02-17 Thread Jough P
Greetings, all. I'm trying to upload and crop an image. I'm not able to do it without the quality of the image suffering. I've fiddled with the quality parameter in the imagejpeg function but it seems to have no effect. I've tried varying values and leaving the parameter out altogether. An

Re: [PHP] Class rules

2004-02-17 Thread John W. Holmes
From: "Alex Hogan" <[EMAIL PROTECTED]> > What are the rules of thumb for classes and included files? > > Can I not include a file in a class function? If I put the include() > outside the class structure everything works fine, but when I put it inside > the class it freaks. > > Am I doing somethi

Re: [PHP] Paginate any query

2004-02-17 Thread Gareth Williams
Hi, In your mysql query, use the LIMIT keyword at or near to the end of the query. LIMIT 1000 will limit to the first thousand records LIMIT 2000,1000 will retrieve 1000 records, offset by 2000 records. Cheers, Gareth On 17 Feb 2004, at 22:12, Shaun wrote: Hi, I use the following function

Re: [PHP] Class rules

2004-02-17 Thread Gareth Williams
Hi there, Try include_once(), it's much safer Cheers, Gareth On 17 Feb 2004, at 23:02, Alex Hogan wrote: Hi All, What are the rules of thumb for classes and included files? Can I not include a file in a class function? If I put the include() outside the class structure everything works

[PHP] Class rules

2004-02-17 Thread Alex Hogan
Hi All, What are the rules of thumb for classes and included files? Can I not include a file in a class function? If I put the include() outside the class structure everything works fine, but when I put it inside the class it freaks. Am I doing something wrong? Class myclass{

Re: Re: [PHP] post variables (SpamEnder: BLOCKED 8BZF-SE44074-lgonze@panix.com) (fwd)

2004-02-17 Thread Lucas Gonze
Is it possible to ban subscribers who issue this kind of auto-response? -- Forwarded message -- Date: Tue, 17 Feb 2004 21:33:04 - From: Alan Hale <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: Re: [PHP] post variables (SpamEnder: BLOCKED [EMAIL PROTECTED]) In an

Re: [PHP] PHP (and optionally MySQL) textbook

2004-02-17 Thread Larry E . Ullman
I am looking for suggestions for a textbook for an undergraduate class introducing PHP and MySQL (using PHP, not MySQL administration). Right now I am using the McCarty book "PHP 4 A Beginner's Guide" but there might be new and/or better books out there? Both my "PHP for the World Wide Web: Visua

Re: [PHP] post variables

2004-02-17 Thread Lucas Gonze
I can't think of a reason for this, so I would doublecheck your assumptions. There is a $_SERVER variable to check the method. You might want to put the php printenv.php page in place of your current script to see what it says about the request method and POST variables. - Lucas On Tue, 17 Feb

[PHP] PHP5: ext/dom: Namespace & Prefix unexpected behavior

2004-02-17 Thread Vivian Steller
Hello, checking out the behavior of Namespaces & Prefixes of the new dom implementation of PHP5 I got some (for me!) unexpected results. look at the following source code: (plz copy&paste it to your editor ;) loadXML($xmlCode); $root = $doc->documentElement; print

[PHP] PHP (and optionally MySQL) textbook

2004-02-17 Thread Chris
I am looking for suggestions for a textbook for an undergraduate class introducing PHP and MySQL (using PHP, not MySQL administration). Right now I am using the McCarty book "PHP 4 A Beginner's Guide" but there might be new and/or better books out there? The text is critical because these stude

[PHP] post variables

2004-02-17 Thread julian haffegee
Hi all, I am having a nightmare accessing my POST variables. I can red them if I use the GET method on my form, but POST is always blank I have while( list($key, $value) = each ($_POST)){ print "$key $value"; } print "_REQUEST: "; print_r($_REQUEST); print "_GET: "; print_r($_GET); print "_PO

[PHP] Paginate any query

2004-02-17 Thread Shaun
Hi, I use the following function to display any query i send to it. Some of these queries produce 1000's of rows and produce an internal server error, is there a way to paginate any query sent to it - say 1000 rows per page? Thanks for your help // query functions function doQuery($query){ i

Re: [PHP] Split()

2004-02-17 Thread Jochem Maas
save a function call: $applePie = array(1,2,3,4,5,6,7,8); while ($pieceOfPie = array_shift($applePie)) { echo $pieceOfPie; // want some pie? } Stuart wrote: John Taylor-Johnston wrote: Can I while this? Not sure how to go about it? while ($pieces exist) { echo $pieces[i]; } This will

RE: [PHP] auto increment

2004-02-17 Thread Chris Shiflett
--- "Chris W. Parker" <[EMAIL PROTECTED]> wrote: > > If the id is auto increment, can't you use max(id) to get the last > > inserted one? > > only if you are the absolute only person that will ever be connected to > that db at one time. otherwise the answer is no. > > what if in between your INSE

Re: [PHP] Replace of ' in a query

2004-02-17 Thread Brent Baisley
Look at the addslashes command. You should always escape the values you are accepting from user input. If you read almost any article on web site security, it will mention something called SQL injection among other things. This is a way to compromise your data. For instance, what if a user enter

Re: [PHP] Replace of ' in a query

2004-02-17 Thread Chris Shiflett
--- carlos castillo <[EMAIL PROTECTED]> wrote: > Hi , i have the following problem, i have a form where a user can input > any text, on that text may be a char is ' char(39) when i try to execute > the sql query, i have an error for that ', i need to replace it for the > html tag, for example " is

RE: [PHP] Re: Sessions

2004-02-17 Thread Chris W. Parker
Paul Furman on Tuesday, February 17, 2004 10:39 AM said: >> Have a questions about sessions. In building a simple app do I have >> to include the session id in the url string or in a hidden tag? or >> does it normally track it by cookies and so I dont have to call

RE: [PHP] auto increment

2004-02-17 Thread Chris W. Parker
BAO RuiXian on Tuesday, February 17, 2004 11:32 AM said: > If the id is auto increment, can't you use max(id) to get the last > inserted one? only if you are the absolute only person that will ever be connected to that db at one time. otherwise the answer is no. wh

Re: [PHP] UK Postcodes Format

2004-02-17 Thread Shaun
"Mike Ford" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 17 February 2004 10:43, Roddie Grant wrote: > > > on 17/2/04 10:25 am, Shaun at [EMAIL PROTECTED] wrote: > > > > > Hi, > > > > > > does anyone know the format of the postcodes in the UK so I can > > > keep my database acc

[PHP] Replace of ' in a query

2004-02-17 Thread carlos castillo
Hi , i have the following problem, i have a form where a user can input any text, on that text may be a char is ' char(39) when i try to execute the sql query, i have an error for that ', i need to replace it for the html tag, for example " is " or by chr(39) i dont know, and then execute the sql

Re: [PHP] auto increment

2004-02-17 Thread BAO RuiXian
marc serra wrote: Hi, i use PEAR DB with a mysql database and i want to know if there is a solution to get last inserted id in a table. If the id is auto increment, can't you use max(id) to get the last inserted one? Best Bao I see that I can use sequences but it doesn't work with mysq

[PHP] Re: auto increment

2004-02-17 Thread John Herren
Marc Serra wrote: Hi, i use PEAR DB with a mysql database and i want to know if there is a solution to get last inserted id in a table. I see that I can use sequences but it doesn't work with mysql. Thanks, Marc. Check this out: http://pear.php.net/manual/en/package.database.db.intro-

RE: [PHP] auto increment

2004-02-17 Thread Peter Billen
execute the following query: SELECT LAST_INSERT_ID(); Peter -Original Message- From: marc serra [mailto:[EMAIL PROTECTED] Sent: dinsdag 17 februari 2004 20:17 To: [EMAIL PROTECTED] Subject: [PHP] auto increment Hi, i use PEAR DB with a mysql database and i want to know if there is

Re: [PHP] auto increment

2004-02-17 Thread Chris Shiflett
--- marc serra <[EMAIL PROTECTED]> wrote: > i use PEAR DB with a mysql database and i want to know if there is a > solution to get last inserted id in a table. > > I see that I can use sequences but it doesn't work with mysql. There is this: http://www.php.net/mysql_insert_id Hope that helps.

Re: [PHP] UK Postcode Reg Exp

2004-02-17 Thread Roddie Grant
on 17/2/04 4:47 pm, Shaun at [EMAIL PROTECTED] wrote: > Hi, > > Has anyone written a regular expression for validating a UK Postcode? > > Many thanks Did you not see the reply from Mike Ford earlier today to your original post? Roddie Grant [EMAIL PROTECTED] -- PHP General Mailing List (htt

[PHP] auto increment

2004-02-17 Thread marc serra
Hi, i use PEAR DB with a mysql database and i want to know if there is a solution to get last inserted id in a table. I see that I can use sequences but it doesn't work with mysql. Thanks, Marc.

Re: [PHP] Help with '&' character

2004-02-17 Thread Chris Shiflett
--- Chris Bruce <[EMAIL PROTECTED]> wrote: > I am having trouble with a string becoming truncated at an '&' > character. I am passing the variable via a link > > (http://...&campaign=MBI%20List%20-%20Steel%20&%20Concrete) and then > when I try to grab the incoming value of campaign into a SELECT

[PHP] ID tymfix... thanks

2004-02-17 Thread thies
Yours ID rtvfrh -- Thank <> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Sessions

2004-02-17 Thread Paul Furman
[EMAIL PROTECTED] wrote: Have a questions about sessions. In building a simple app do I have to include the session id in the url string or in a hidden tag? or does it normally track it by cookies and so I dont have to call it on every page? thoughts on best way to do this I'm trying to learn

Re: [PHP] * populate menu from directory *

2004-02-17 Thread Paul Furman
Matt Matijevich wrote: I want to be able to simply FTP a new movie onto the server, and then have the menu update itself. possible? I would also be looking to do something similar with JPGS. here is some code to help start you Here's another example: (more error checking probably needed) h

Re: [PHP] Headers Again

2004-02-17 Thread Comex
[EMAIL PROTECTED]> Petcol: > Jason, > > What I shock, 307,000 entries returned. > > Maybe someone with ability greater or other than I, should give some > serious consideration to a solution or work around. > > I've been using ColdFuion for 7 years and I can do a url="anotherlocation.htm"> anywher

Re: [PHP] Problems with authentication (I think)

2004-02-17 Thread Comex
<[EMAIL PROTECTED]> Leif Gregory: > Hello Leif, > > Monday, February 16, 2004, 7:13:30 PM, you wrote: >>PHPTest http://www.resynthesize.com/code/phptest_info.php > > Just a followup. I found out that the PHPTest showing just a blank > page was a mistype in my config.inc.php file. It now shows m

Re: [PHP] Re: Split()

2004-02-17 Thread Adam Bregenzer
On Tue, 2004-02-17 at 13:01, John Taylor-Johnston wrote: > $tempauthors = explode("\r\n", $mydata->AuthorList); > foreach ($tempauthors as $singleauthor) > # while($tempauthors = each($singleauthor)) > { > echo "http://www.foo.org$singleauthor\";>$singleauthor "; > } First of all, you ar

Re: Re[4]: [PHP] problems with spam

2004-02-17 Thread Comex
<[EMAIL PROTECTED]> Richard Davey: > Hello mayo, > > Monday, February 16, 2004, 3:51:30 PM, you wrote: > > m> As for my email being harvested because I wrote it out > m> ([EMAIL PROTECTED]). Well I'll change it to > m> something else. :-) > > There are other ways - spam bots can actually subscribe

Re: [PHP] Help with '&' character

2004-02-17 Thread André Cerqueira
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 the problem is the '&' on the url http://...&campaign=MBI%20List%20-%20Steel%20&%20Concrete ^ | there> this url is saying:

Re: [PHP] Help with '&' character

2004-02-17 Thread Chris Bruce
You are right John. I have it working now. Thanks. -- Chris Bruce [EMAIL PROTECTED] Idextrus E-Business Architects http://www.idextrus.com 3282 Wilmar Cres. Mississauga, ON L5L4B2 CA 905.828.9189 This e-mail and its contents are pri

Re: [PHP] Re: Split()

2004-02-17 Thread John Taylor-Johnston
John, Thanks. It's a question of understanding it. I can get a foreach to work, but my while doesn't. >There's no real reason to use while() over foreach(). Why do you think you >need to use while()? Rather than ask people to code for me, I'm trying to spend a little extra time to try and learn

Re: [PHP] Help with '&' character

2004-02-17 Thread Chris Bruce
The problem is that the '&' character is already in a database. I am trying to do a query where I need to have it as '&', but like I said, when it comes into the script from the url it gets truncated. -- Chris Bruce [EMAIL PROTECTED] Idextrus E-Business Architects http://www.idextrus.com 3282 W

[PHP] Re: Help with '&' character

2004-02-17 Thread André Cerqueira
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 http://...&campaign=MBI%20List%20-%20Steel%20&%20Concrete (wrong) http://...&campaign=MBI%20List%20-%20Steel%20%26%20Concrete (right) where does that url come from? is it generated by a script? if it is, you must urlencode() it before outputing, not whe

Re: [PHP] UK Postcode Reg Exp

2004-02-17 Thread Shaun
Sounds like a good idea, This seems to be the current spec: http://www.govtalk.gov.uk/gdsc/html/noframes/PostCode-2-1-Release.htm "James Nunnerley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Shaun, > > Not that I know of - although I have looked at various things like this

Re: [PHP] Help with '&' character

2004-02-17 Thread John W. Holmes
From: "Chris Bruce" <[EMAIL PROTECTED]> > I am having trouble with a string becoming truncated at an '&' > character. I am passing the variable via a link > > (http://...&campaign=MBI%20List%20-%20Steel%20&%20Concrete) and then > when I try to grab the incoming value of campaign into a SELECT quer

Re: [PHP] Why doesn't PHP see my MySQL upgrade?

2004-02-17 Thread Jason Wong
On Wednesday 18 February 2004 01:11, Donpro wrote: > After uphrading to MySQL 4.0.17, I uninstalled all the old PHP-4.1.2 RPMs > and recompiled PHP-4.3.4. Now I am getting compiling errors related to > PHP. > > /usr/local/php-4.3.4/ett/mysql/php_mysql.c:1158 undefined reference to > 'mysql_create

Re: [PHP] Help with '&' character

2004-02-17 Thread "Miguel J. Jiménez"
Have you tried using '&' ? Chris Bruce wrote: I am having trouble with a string becoming truncated at an '&' character. I am passing the variable via a link (http://...&campaign=MBI%20List%20-%20Steel%20&%20Concrete) and then when I try to grab the incoming value of campaign into a SELECT quer

RE: [PHP] UK Postcode Reg Exp

2004-02-17 Thread James Lobley
Try this one: $postcode2 = strtoupper(str_replace(chr(32),'',$postcode)); $pc_suffix = substr($postcode2,-3,3); $pc_prefix = substr($postcode2,0,(strlen($postcode2)-3)); if (!preg_match('/(^[A-Z]{1,2}[0-9]{1,2}|^[A-Z]{1,2}[0-9]{1}[A-Z]{1})$/',$pc_prefix) && !preg_match('/^[0-9]{1}[ABD-HJLNP-UW-Z]

Re: [PHP] PHP 4.3.4 ftp_rawlist null output

2004-02-17 Thread Federico Petronio
Finally I found the problem... I post it because could help to others... The problem was that PHP ftp module use a fixed tmp directory (at least I could not change it). That dir is /var/tmp and that dir was not present in my chrooted environment. I create it, set permissions and that was it. Bye !

[PHP] Help with '&' character

2004-02-17 Thread Chris Bruce
I am having trouble with a string becoming truncated at an '&' character. I am passing the variable via a link (http://...&campaign=MBI%20List%20-%20Steel%20&%20Concrete) and then when I try to grab the incoming value of campaign into a SELECT query, it becomes SELECT sum(sends) from campaigns

Re: [PHP] Parse Error

2004-02-17 Thread John Nichel
Jay Blanchard wrote: [snip] More info about the parse error of my previous post: The lines 45-46: $mysql_query = "INSERT INTO sessions(sessionid,ver,agent,bwinf,screenwidth,screenheight,availwidth,a vail height) "; $mysql_query .= "VALUES('$sessionid','$ver','$agent','$bwinf',$scrwidth,$scrheight,

Re: [PHP] Parse Error

2004-02-17 Thread BAO RuiXian
Jay Blanchard wrote: [snip] More info about the parse error of my previous post: The lines 45-46: $mysql_query = "INSERT INTO sessions(sessionid,ver,agent,bwinf,screenwidth,screenheight,availwidth,a vail height) "; $mysql_query .= "VALUES('$sessionid','$ver','$agent','$bwinf',$scrwidth,$scrheigh

RE: [PHP] Parse Error

2004-02-17 Thread Jay Blanchard
[snip] That's not the problem. I want the last for values aren't enclosed with single quotation marks. I think it's a weird problem. This lines executed on the server of my ISP give this error. The same lines executed on my server on my localhost (Apache 1.3.29, PHP 4.3.2, MySQL 3.? and Win2K) don'

RE: [PHP] Why doesn't PHP see my MySQL upgrade?

2004-02-17 Thread Donpro
Disaster! After uphrading to MySQL 4.0.17, I uninstalled all the old PHP-4.1.2 RPMs and recompiled PHP-4.3.4. Now I am getting compiling errors related to PHP. /usr/local/php-4.3.4/ett/mysql/php_mysql.c:1158 undefined reference to 'mysql_create_db' /usr/local/php-4.3.4/ett/mysql/php_mysql.c:120

[PHP] Re: ["solved"] Are variables persistent?

2004-02-17 Thread Paul Furman
followup... Paul Furman wrote: Ugh, I think I'm done for the day. header() requires output buffering which would span several files and sounds like another mess. Well, for now, I set up some of the links to maintain the $pics variable in the url as a $_REQUEST and circumvented the header() mes

RE: [PHP] Parse Error

2004-02-17 Thread Jay Blanchard
[snip] More info about the parse error of my previous post: The lines 45-46: $mysql_query = "INSERT INTO sessions(sessionid,ver,agent,bwinf,screenwidth,screenheight,availwidth,a vail height) "; $mysql_query .= "VALUES('$sessionid','$ver','$agent','$bwinf',$scrwidth,$scrheight,$avai lwid th,$availhe

[PHP] Parse Error

2004-02-17 Thread Rolf van de Krol
More info about the parse error of my previous post: The lines 45-46: $mysql_query = "INSERT INTO sessions(sessionid,ver,agent,bwinf,screenwidth,screenheight,availwidth,avail height) "; $mysql_query .= "VALUES('$sessionid','$ver','$agent','$bwinf',$scrwidth,$scrheight,$availwid th,$availheight)";

RE: [PHP] UK Postcode Reg Exp

2004-02-17 Thread James Nunnerley
Hi Shaun, Not that I know of - although I have looked at various things like this myself. Would you be interested in a small open source project on this subject? I see you instigated the discussion on this earlier today. It might be something worth putting on PEAR, and somehow linking it with t

[PHP] Sessions

2004-02-17 Thread php-general
Have a questions about sessions. In building a simple app do I have to include the session id in the url string or in a hidden tag? or does it normally track it by cookies and so I dont have to call it on every page? thoughts on best way to do this --

RE: [PHP] UK Postcode Reg Exp

2004-02-17 Thread Jay Blanchard
[snip] Has anyone written a regular expression for validating a UK Postcode? [/snip] Nope, but I did write a love note to a French woman. Sorry, couldn't resist. :) I'll be here all week. Can you provide several examples and perhaps we could formulate one? -- PHP General Mailing List (http://ww

[PHP] UK Postcode Reg Exp

2004-02-17 Thread Shaun
Hi, Has anyone written a regular expression for validating a UK Postcode? Many thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Split()

2004-02-17 Thread John W. Holmes
From: "John Taylor-Johnston" <[EMAIL PROTECTED]> > I can do this, but want to understand how to while it: Or should I? > > $tempslices = explode("\r\n", $pizza); > foreach ($tempslices as $singleslice) > { > echo "http://www.foo.org$singleslice\";>$singleslice "; > } > > Still learning :

  1   2   >