Re: [PHP] Re: [PHP-DEV] cookies and sessions security

2001-01-15 Thread Kristofer Widholm
At 14.54 -0500 01-01-15, Tim Zickus poked the keyboard as follows: > > Wow, I never thought of using the remote IP! Thanks for the tip. I >> am going to use it today for an authentication system I'm building. > >Please note that remote IP is NOT reliable. For clients behind the proxies >& gate

Re: [PHP-CVS] cvs: php4 /pear/XML Render.php

2001-01-15 Thread Derick Rethans
Hello, I noticed this thingy in my mail, and I think it's very useful. ATM I have some XML to PDF rendering with use of Sablotron, and this works pretty wel. Because the most ppl dont wand to implement already implemented stuff, I thought that you could possibly use my 'hacked' up stuff for this.

Re: [PHP] PDFLIB 3.0 PHP 4.04

2001-01-15 Thread webbie
Quoting Jani Taskinen <[EMAIL PROTECTED]>: > On Mon, 15 Jan 2001, Cal Evans wrote: > > >But when I ./configure php, I use: > > > >./configure --with-pdflib=/usr/local/lib > > Leave the /lib part out..ie. use --with-pdflib=/usr/local > instead. Furthermore, make sure you use 4.0.4pl1 as 4.0.4 i

[PHP-CVS] cvs: php4 /ext/ircg ircg.c

2001-01-15 Thread Sascha Schumann
sas Mon Jan 15 22:53:30 2001 EDT Modified files: /php4/ext/ircg ircg.c Log: Use the write buffer subsystem to accumulate network writes and to increase the overall through-put. Index: php4/ext/ircg/ircg.c diff -u php4/ext/ircg/ircg.c:1.21 php4/ext

Re: [PHP] Running a php script at a giveb time

2001-01-15 Thread jeremy brand
Sure. I would use cron. see crontab(5). You could also use any other type of scheduling software. In case you didn't know, you can run PHP scripts without a web server. Simply compile php without apache. Then you can run your script like this: /usr/bin/php your_script.php (if you install the

Re: [PHP] Running a php script at a giveb time

2001-01-15 Thread Philip Olson
Hello Shimon, Information to generally setup a cron tab : How do I set up a cron job on Linux? --- http://www.faqts.com/knowledge_base/view.phtml/aid/1005/fid/436 In regards to php : How can I make a PHP script be

Re: [PHP] uploading files through php-generated scripts

2001-01-15 Thread David P. Schwartz
Richard Lynch wrote: > > I've got a strange thing with overriding an ini file in PHP. > > > > I'm trying to implement a simple example of a script that allows a file to > be > > uploaded. > > > > I put an > tag > > ENCTYPE goes in the FORM tag, I think... maybe, but this is copied straight out

[PHP] Running a php script at a giveb time

2001-01-15 Thread Shimon Dekel
Hi, I need to run a PHP script or a PHP page, few times every morning, say 10 times between 7am and 8am every morning to see if a cretin database condition is met. Is it possible? == Shimon Dekel Israeli Vegetable Board Information System Manager 2 Karlibach St Tel-

Re: [PHP] Netscape differences?

2001-01-15 Thread Egan
On Mon, 15 Jan 2001 21:05:08 -0600, "Richard Lynch" <[EMAIL PROTECTED]> wrote: >Try sending the various "no-cache" and "expiration" headers. You can find >more details in code archive samples linked from: > >http://php.net/links.php I see many links there, but I don't know which one is "cod

Re: [PHP] HELP WITH UPLOAD REQUIRED!!!!!!!!

2001-01-15 Thread David P. Schwartz
This is the same sort of error I'm getting. Try printing out the variables $userfile $userfile_name $userfile_size $userfile_type Telnet or ssh into your system and see if the file is getting transferred into the directory identified in $userfile. In my case, the upload file isn't getting save

Re: [PHP] PHP & FDF on Linux PPC

2001-01-15 Thread Michael A. Peters
Richard Lynch wrote: > > Try the Apache/MySQL/PHP Mailing List also: > > To unsubscribe from this list, just send a blank message to > [EMAIL PROTECTED] > > To switch to or start with the digest version, send a blank message to > [EMAIL PROTECTED] > > This list is hosted as a public service by

RE: [PHP] Automated Scripts

2001-01-15 Thread Jason Murray
> I need to run a script that renames a file and deletes an old > one then ships it to another server every Monday at a certain > time I know this is possible, but what is the technology > called? Does PERL or PHP have the ability to do this? Can I > get CRON objects to run PHP source code

RE: [PHP] Regex for telephone number

2001-01-15 Thread Jason Murray
> 123 4567 > 1234567 > +91 44 123 4567 > +91 44 1234567 > 91-44-123 4567 > 91-44-1234567 So, 91441234567 and 9 1 4 4 1 2 3 4 5 6 7 aren't valid? You *could* apply a rule here, but it's fallible. 1. Strip out everything thats not a number (ereg_replace("[^0-9]", "")). 2. Count the number of dig

[PHP] Automated Scripts

2001-01-15 Thread Tait Grove at DIGITAL
I need to run a script that renames a file and deletes an old one then ships it to another server every Monday at a certain time I know this is possible, but what is the technology called? Does PERL or PHP have the ability to do this? Can I get CRON objects to run PHP source code? PLEASE H

[PHP] Automated Scripts

2001-01-15 Thread Tait Grove at DIGITAL
I need to run a script that renames a file and deletes an old one then ships it to another server every monday at a certain time I know this is possible, but what is the technology called? Does PERL or PHP have the ability to do this? Can I get CRON objects to run PHP source code? PLEASE H

Re: [PHP] Regex for telephone number

2001-01-15 Thread Vikram Vaswani
Thanks for the reply. I'd like to ensure that numbers entered are in any of these formats: 123 4567 1234567 +91 44 123 4567 +91 44 1234567 91-44-123 4567 91-44-1234567 Number will be a minimum of 5 digits. TIA Vikram At 12:11 AM 1/16/01 +1100, Angus Mann wrote: >At 17:55 15/01/01 +0500, Vikr

RE: [PHP] Re: [chiPHPug] Addslashes]

2001-01-15 Thread Jason Murray
> After all these years, couldn't two of these three end-of-line formats > swallow their pride and just deprecate themselves?... ... and break everything *else* that depends on them? Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General M

Re: [PHP] Magic Quotes - Problems with Inconsistent Behavior removing Slashes

2001-01-15 Thread Roy
Richard, It's the same record every time that shows the different behavior. The code is extremely straightforward, just retrieve the record and display it. And, I've got other scripts on the same host that also display this behavior intermittantly. MagicQuotes is turned on. And, it typically DOE

[PHP] Re: [chiPHPug] Addslashes]

2001-01-15 Thread Richard Lynch
> The thing that always seems to screw me up is the difference in new lines between windows and *nix ... at the end of the day you need to play with the --records-separated-by clause in the mysqlimport line ... the permutations to play with are ='\n' v. '\r\n' ... you're shooting to get 0 in the

Re: [PHP] Magic Quotes - Problems with Inconsistent Behavior removing Slashes

2001-01-15 Thread Richard Lynch
Unless I'm even more confused than usual about something I've long believed to be true... MagicQuotes does not ever strip slashes. MagicQuotes does an addslashes before the data gets into the database. Are you viewing the same record all the time, or is it possible that one of your records has

Re: [PHP] PHP & FDF on Linux PPC

2001-01-15 Thread Richard Lynch
Try the Apache/MySQL/PHP Mailing List also: To unsubscribe from this list, just send a blank message to [EMAIL PROTECTED] To switch to or start with the digest version, send a blank message to [EMAIL PROTECTED] This list is hosted as a public service by Dynapolis Internet Communities http://w

Re: [PHP] Perl regular expression bug

2001-01-15 Thread Richard Lynch
> $string = "[["; Okay. I don't think [ is special in PHP. { is a new special character, though. > $string = preg_replace("/(\W)/", "1", $string); \W -- what's that? You probably need \\W there... > ?> > > $string would then contain "\[\[". I dunno about that. This Regex stuff is ov

Re: [PHP] calling perl from within php

2001-01-15 Thread Richard Lynch
> We are running PHP 4 on a Solaris 2.7 box with Apache 1.3.11 with mod_perl > 1.24. > We need to communicate with 3rd-party Perl APIs from within PHP to handle > processing of a form. The API functions each expect an associated array and > will return a result value to the calling party. The Per

Re: [PHP] uploading files through php-generated scripts

2001-01-15 Thread Richard Lynch
> I've got a strange thing with overriding an ini file in PHP. > > I'm trying to implement a simple example of a script that allows a file to be > uploaded. > > I put an tag ENCTYPE goes in the FORM tag, I think... > on the form, along with a submit button. (yeah, the rest of the HTML is > fine

Re: [PHP] 2 questions, can't find in the manual or archives . . .

2001-01-15 Thread Richard Lynch
> I'm writing a SYSV LP script in PHP so that I can have a > print-to-database (MySQL) solution. First question: Am I wasting my > time? Are there already canned solutions? (LPRng perhaps?) I think you could just exec() it... exec("/usr/bin/lp $blah", $output, $error); while (list(,$line) = each

Re: [PHP] how do I do this, please?

2001-01-15 Thread Richard Lynch
> if (ereg !=("^[0-9]+[.]?[0-9]*$", $val1)) { > header("Location:http://localhost/calculate_form.html"); > exit; > > But the script will attempt to perform calculations on non numeric > fields and > > I also want it to return the form if anyone puts in a non numeric value. > > I t

Re: [PHP] safe mode in 4.0.4pl1

2001-01-15 Thread Richard Lynch
suExec() does most of what safe_mode would do, and other things besides... I don't think they are compatible... What exactly is your suExec'ed PHP able to do that you want to not allow? - Original Message - From: Ian Gulliver <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Monday, Ja

Re: [PHP] Missing function virtual () ???

2001-01-15 Thread Richard Lynch
> compiled PHP3/PHP4 as external CGI under Apache. > virtual("test.html"); > Does is not work in a CGI-PHP ? Correct. virtual() cannot work in CGI. You'll have to use some combination of exec()/fopen()/popen() to achieve what you need. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Parse Error

2001-01-15 Thread Richard Lynch
PHP parse error, or SQL parse error?... If it's PHP, you may need to look at the *previous* line, or even a bunch of lines before that if you are missing a { or } or have messed up quotes. If it's an SQL error, you probably don't have any data in $HTTP_POST_VARS['UserName'] or $HTTP_POST_VARS['P

Re: [PHP] Ooops - I forgot the question... Freaking difficul thing to do (at least for me)

2001-01-15 Thread Richard Lynch
> My question is how I can do that after I get the data from the database? I > mean how I can make this admin module to work? You'll need to have to use str_replace/ereg_replace or similar to alter the keywords you dream up into HTML. EG: $html = str_replace("[LINK]", "http://www.php.net/) To u

Re: [PHP] variable tracking overview

2001-01-15 Thread Richard Lynch
If the answers to the 390 inputs are all limited in length, you *might* be able to squeeze them all into POST variables carried forward from page to page. What you need to realize here is that HTTP is stateless -- The browser and server won't remember anything unless you work at it. So, on each pa

Re: [PHP] Netscape differences?

2001-01-15 Thread Richard Lynch
Try sending the various "no-cache" and "expiration" headers. You can find more details in code archive samples linked from: http://php.net/links.php Naturally, IE and Netscape don't agree on which headers mean what, so you have to send at least twice as many as you'd expect. Am I the only one

Re: [PHP] debugging php

2001-01-15 Thread Richard Lynch
> - what is a good tcp-listener (i tried tcpdump, but this gives to much > output) No help for you there... I've never even tried this. Maybe you could pipe tcpdump through grep, and include something like ZZ in all your error messages or something... > - the debugger doesn't work: the com

Re: [PHP] Problems sending to several recipients with mail() using WIN NT and Apache

2001-01-15 Thread Richard Lynch
> I'm using Apache 1.3.14 on WIN NT, and can't send mail to more than one > recipient using the PHP-mail command. > > I've checked php.ini, and everything seems to be fine... > > This is an example that won't work (but should have worked..?) > > mail("[EMAIL PROTECTED], [EMAIL PROTECTED]","subject

Re: [PHP] MSQL and php creating problem with date..

2001-01-15 Thread Richard Lynch
> * > You have an error in your SQL syntax near > 'dayofmonth(date_add('', INTERVAL 7 DAY)))' at line 2 > * > > > > > $odate = date('Y m d'); > > $connect = mysql_connect("localhost"); > > Wh

php-general Digest 16 Jan 2001 03:19:07 -0000 Issue 457

2001-01-15 Thread php-general-digest-help
mmands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Joe Stump, PHP Hacker [EMAIL PROTECTED] http://www.miester.org/ Yes - it may work like you are saying, but I would use a timestamp to be sure. You can make comparisons on regular date form

Re: [PHP] password() ::: and it's return...

2001-01-15 Thread Toby Butzon
> Well it's up to you wether or not to encrypt passwords, but it's very > irresponsible not to. If somebody cracks your system, chances are > they'll get passwords that can be used on accounts your users have > in other places, so your customers suffer more than they should for > your lax in secur

RE: [PHP] How do I do to update part of a string?

2001-01-15 Thread Maxim Maletsky
if it is a simple del then use str_replace... however if there's a more complicated logic, then you will need an ereg_replace or preg_replace... will be heavier but more capable.. I use it on certain 10.000 words articles. And I replace not a big chunk of code but some few words in a big chunk.

Re: [PHP] How do I do to update part of a string?

2001-01-15 Thread Josh G
You can always use the simple str_replace or my old fave, $newstring=implode($withthis,explode($this,$oldstring)); replaces all instances of $this with $withthis in $oldstring Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication t

[PHP] How do I do to update part of a string?

2001-01-15 Thread Romulo Roberto Pereira
I have a big string. How can I do to find some text inside and modify that text? I was thinking about ereg_replace(). But it is capable to handle big chuncks of text? If yes, it will notbe too heavy for theserver? Any other ideas? Thank you, Rom -- PHP General Mailing List (http://www.php.net

RE: [PHP] password() ::: and it's return...

2001-01-15 Thread Maxim Maletsky
that's very true, you put in the risk the others accounts Maxim Maletsky -Original Message- From: Josh G [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 16, 2001 11:32 AM To: PHP User Group Subject: Re: [PHP] password() ::: and it's return... Well it's up to you wether or not to

Re: [PHP] password() ::: and it's return...

2001-01-15 Thread Josh G
Well it's up to you wether or not to encrypt passwords, but it's very irresponsible not to. If somebody cracks your system, chances are they'll get passwords that can be used on accounts your users have in other places, so your customers suffer more than they should for your lax in security. Peop

Re: [PHP] HELP WITH UPLOAD REQUIRED!!!!!!!!

2001-01-15 Thread Alexander Wagner
Josh G wrote: > A rose by any other name would smell as sweet, and I'm sure I > remember deleting files back in my old dos days, not to mention > win95 ;-) Um, I suppose every OS does. (I deleted one file or another as well) However this was about unlink, wasn't it? Unlink, basically, is a UNIX

Re: [PHP] password()

2001-01-15 Thread Stephan Ahonen
> Im curious to see how other php developers store their passwd's I store it in the "universal include file" as $password["User"] = "Encrypted password"; Then when the user logs in: if (encryption_function($entered_password) == $password[$entered_username]) { Do this stuff } else{ echo("Please

RE: [PHP] password() ::: and it's return...

2001-01-15 Thread Maxim Maletsky
Yeah, in fact that's my point. If you cannot decrypt a password, there's no way to return it , right? So how come these "big guys" DO return it to you? And what is the most secure way for it. Some of these companies deal with finances, the security is a REAL issue over there... Maxim Maletsky --

Re: [PHP] password() ::: and it's return...

2001-01-15 Thread Josh G
Yeah, but this simply means that the password is stored somewhere unencrypted, or with a (by definition weaker) two-way encryption process. Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffe

Re: [PHP] password() ::: and it's return...

2001-01-15 Thread Josh G
There are a few ways to go about this- 1) The "secret question" method, where the user enters a question only they would know the answer to upon signing up, and they can use this to get in if they forget the password. Which begs the question - why use a password in the first place? 2) Administra

Re: [PHP] password() ::: and it's return...

2001-01-15 Thread Toby Butzon
I would guess the passwords are stored in plain text... on a dedicated machine, this is only as much of a risk as the machine's security in general is... still more of a risk than I'd take with data that needs to be secure... As someone mentioned earlier, if you want to provide for a user who mig

[PHP] readfile and Location headers in php 4.0.4 and 4.0.4pl1

2001-01-15 Thread Jason Brooke
Is anyone else having trouble in 4.0.4 and 4.0.4pl1 with readfile when the argument is a http request to a script that sends a location header? eg: server1 - test.php http://server2/location.php"); ?> server2 - location.php http://some.other.url); ?> Both Php 4.0.4 and 4.0.4pl1 return: Warn

Re: [PHP] password() ::: and it's return...

2001-01-15 Thread Chris Lee
sites do though. many sites allow me to click some link and they email me my passwd in case Ive forgoten it. ICQ.com even does this. Chris Lee Mediawaveonline.com ""Josh G"" <[EMAIL PROTECTED]> wrote in message 00e401c07f60$f325c2a0$0e01a8c0@swinger">news:00e401c07f60$f325c2a0$0e01a8c0@swinger.

RE: [PHP] password() ::: and it's return...

2001-01-15 Thread Maxim Maletsky
No, simply when someone loses it's password. How do developers return it on their systems? What are the procedures, tips todo, tricks etc This is because I am working on a similar system right now, and the "password return" part is the one I am not too sure yet. Plus many of us would learn so

Re: [PHP] HELP WITH UPLOAD REQUIRED!!!!!!!!

2001-01-15 Thread Josh G
A rose by any other name would smell as sweet, and I'm sure I remember deleting files back in my old dos days, not to mention win95 ;-) Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering

Re: [PHP] password() ::: and it's return...

2001-01-15 Thread Josh G
I'm not sure I understand the question. What exactly do you mean? Are you talking about returning it from the client already encrypted? Not sure if anybody does that, as JS doesn't have a whole lot of useful encryption stuff in it, and iirc the md5() algorith is rather lengthy. Gfunk -

Re: [PHP] HELP WITH UPLOAD REQUIRED!!!!!!!!

2001-01-15 Thread Alexander Wagner
Josh G wrote: > Unlink works on some installations, not others. I think it works on NT > but not 95 or perhaps the other way around. Why is this? Unlink is > hardly an unsupported system call in windows! Anybody know? Unlink comes from UNIX so it's probably supported by NT rather than Win9x. This

Re: [PHP] HELP WITH UPLOAD REQUIRED!!!!!!!!

2001-01-15 Thread Josh G
Unlink works on some installations, not others. I think it works on NT but not 95 or perhaps the other way around. Why is this? Unlink is hardly an unsupported system call in windows! Anybody know? Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxica

RE: [PHP] password() ::: and it's return...

2001-01-15 Thread Maxim Maletsky
Instead I am curious how other developers on this list are returning the MD5, password() or whatever in permanently encrypted passwords... What are procedures and what is the way the return process work? Any tricks/tips to share with all of us? Cheers, Maxim Maletsky -Original Message---

Re: [PHP] password()

2001-01-15 Thread Chris Lee
simple answer is no. the only way to decrypt the passwd is to run it through a cracker. All admins are used to this and know that if a user has lost a passwd that they are going to have to give them a new one, finding the old just isnt work one week of processing time :) Im curious to see how oth

Re: [PHP] HELP WITH UPLOAD REQUIRED!!!!!!!!

2001-01-15 Thread Chris Lee
are you running php in safemode? according to http://php.net/manual/en/function.unlink.php unlink() may not work with windows servers, I have no personal experience with windows so I can not confirm this. have you tried http://php.net/manual/en/function.move-uploaded-file.php this might be bette

[PHP] is_dir

2001-01-15 Thread Pat Hanna
I have a snipet of code i'm using for a file maintanance program. I have no idea why but when the main loop repeats, the is_dir function doesn't return true even though it prints out a directory in the server. chdir("/certain/place/for/files/"); $handle=opendir("."); $file=readdir($handle); //to

[PHP-CVS] cvs: php4 /pear/XML Render.php

2001-01-15 Thread Sean Grimes
metallicMon Jan 15 16:27:34 2001 EDT Modified files: /php4/pear/XML Render.php Log: Added a method to call the HTML and PDF rendering modes(not implemented yet). Added the parse function which should allow for finer XML parsing. The XML file conte

Re: [PHP] mail() question

2001-01-15 Thread Robert Hough
Quick update, for anyone interested... I managed to answer my own question, but I'd still like to thank everyone that replied, it did lead me to the right place. What I ended up doing was using sendmail with the -f option. This did require me to add a new trusted user to my sendmail.cf though. O

Re: [PHP] Zend Optimizer

2001-01-15 Thread Thomas Deliduka
When I look at the website (http://www.zend.com/zend/optimizer/) it says it works with PHP Version 4.0.3 or 4.0.3pl1 it says no early or later versions of PHP are supported so I would htink that is the reason why it's not working. On 1/15/01 3:07 PM this was written: > I have download the Zend O

Re: [PHP] password()

2001-01-15 Thread Toby Butzon
Note that base64 encode/decode keeps passwords from being readily readable but does NOT protect anything from being decoded. The reason you can't decode Password and MD5 encrypted passwords is that if you could, all you'd have to do is find the encrypted version and decrypt it. Again, _anybody can

[PHP] Magic Quotes - Problems with Inconsistent Behavior removing Slashes

2001-01-15 Thread Roy
I'm seeing strange behavior with Magic Quotes in PHP on my ISP hosted accounts. Basically, it's not consistently removing the escaped backslashes before displaying. For instance, take the following piece database text (stored in, say, a character field) It's fun to be a penguin. If I do

[PHP] PHP & FDF on Linux PPC

2001-01-15 Thread Erick Schmidt
Has anyone configured PHP to work with FDF on a PPC box? If so, do you have any helpful hints that may get me up and running. Thanks for the help. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [E

Re: [PHP] password()

2001-01-15 Thread James, Yz
Have a look at the base64_encode / decode stuff. I stumbled across an example there just this afternoon. It's available in the user contributed notes of the Quick Reference section for those functions at http://www.php.net James. ""Jason Jacobs"" <[EMAIL PROTECTED]> wrote in message 011501c0

Re: [PHP] Basic SQL syntax

2001-01-15 Thread James, Yz
> > Ah, so you can constantiate (right word?) the query? > > I don't know what you mean by 'constantiate', but glad to hear it worked It did, thank you ;) Someone pointed out where I'd gone wrong with the word privately: >> Ah, so you can constantiate (right word?) the query? > concatenate :)

Re: [PHP] 4.0.4 Postgres link resource bug?

2001-01-15 Thread Jon Rosenberg
It's b/c the globals in 4.0.4pl1 are not working, at least that's why mine broke. Try replacing the globals in the function with the actual variable declarations and see if the problem goes away. If not, I guess it's a different problem, but that fixed it for me. -

RE: [PHP] PDFLIB 3.0 PHP 4.04

2001-01-15 Thread Cal Evans
You sir (or madam), are a god among men! Thanks for the assist. Cal http://www.calevans.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jani Taskinen Sent: Monday, January 15, 2001 3:59 PM To: Cal Evans Cc: [EMAIL PROTECTED] Subject: Re: [PHP] PDF

Re: [PHP] Basic SQL syntax

2001-01-15 Thread Johannes Janson
> Ah, so you can constantiate (right word?) the query? I don't know what you mean by 'constantiate', but glad to hear it worked otis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the

Re: [PHP] Basic SQL syntax

2001-01-15 Thread James, Yz
""Johannes Janson"" <[EMAIL PROTECTED]> wrote in message 93vs9u$osj$[EMAIL PROTECTED]">news:93vs9u$osj$[EMAIL PROTECTED]... > try this: > $sql = "SELECT * FROM table > WHERE town LIKE '%$search_data%' "; > > if ($reference != "") > $sql .= "OR whatever"; Ah, so you can constantiate (right w

Re: [PHP] mail() question

2001-01-15 Thread mailing_list
I asked the same question some weeks ago! The problem is, my root installed the mail-function so that "nobody" is the owner of the send-process! I wanted the same thing as you want - At last I did a workaround (not bad for sending that small amount of mails I do): I configured .procmailrc, so t

Re: [PHP] changing strings to float vars

2001-01-15 Thread Steve Edberg
At 4:28 PM -0500 1/15/01, bill wrote: >Sometimes clients put a dollar sign "$" in a form that only needs a >number (like "1.50"). > >Is there a way to take a post variable and automatically convert it to a >float value, stripping off any non-numeric characters? > >I tried doubleval() without succe

Re: [PHP] checkboxes into MySQL

2001-01-15 Thread Kevin McCarthy
it took me a while to find this out, too. If you have say, 5 checkboxes, name them like so: when submitted, in the script processing the form, check the array $musicians[]. The checked selections will be included as elements. So if trane and bird were checked, you will have a 2-element a

Re: [PHP] Array...

2001-01-15 Thread Mark Maggelet
On Mon, 15 Jan 2001 13:57:04 -0800 (PST), jeremy brand ([EMAIL PROTECTED]) wrote: >for ($i=100; $i>0; $i++) > print "\n"; > >But, I presume you would rather do this: >for ($i=100; $i>0; $i++) ^^^ should be $i-- > print "\n"; or how about: 0; $i--){?> -

RE: [PHP] Re: [PHP-DEV] cookies and sessions security

2001-01-15 Thread Jason Murray
> >Very good: keep the thing on a secure connection all the time, set a > >session id cookie and keep all user info (possibly including > >remote ip) in the server's session db... (vulnerable to nothing I can > think of at the moment...) > > Wow, I never thought of using the remote IP! Thanks

RE: [PHP] Regex for telephone number

2001-01-15 Thread Jason Murray
> Can someone help me out with a regex to validate a phone number? That's a tough one, because 555- is just as valid as 1-800-BILLME. And here in Australia we have 131166 (yes, all you Aussies, that *IS* Pizza Hut's number... I couldn't think of any others :)) The best you can really do is m

Re: [PHP] checkboxes into MySQL(trying again)

2001-01-15 Thread jeremy brand
Hi Jerry, Feel free (as in GPL) to use my libHtmlForm functions. This should solve your problem. http://www.nirvani.net/software/libHtmlForm/ See: html_input_checkbox() specifically. Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/

Re: [PHP] logging page views, which method is better????

2001-01-15 Thread Rick Widmer
And the answer about merging logs for webalizer is: > Is there a way to create a combined report showing hits to a number of > separate servers all handling the same web sites. > > I am guessing all you have to do is feed it each of the log files in > turn, and make sure you don't duplicate them

RE: [PHP] Date data type problem

2001-01-15 Thread Jason Murray
> while $date1 is in "mmdd" format but $date2 is in > "-mm-dd" formate because I get value of $date2 from a > "date" data type field from a table. Ah, see ... this is what I was talking about with making sure they are in the same format :) > Can I use this "-mm-dd" to compare with

[PHP] checkboxes into MySQL(trying again)

2001-01-15 Thread Jerry Lake
sorry about that, I forgot to erase the old post info here is a chunk of the code I am using //inclusion of pizza toppings from DB $query = ("SELECT * FROM toppings"); $result2 = mysql_db_query($DBName, $query) or die("Error in MySQL query"); echo ""; echo ""; $colors = array( '#e4e4e4', '#fff

Re: [PHP] Basic SQL syntax

2001-01-15 Thread Johannes Janson
try this: $sql = "SELECT * FROM table WHERE town LIKE '%$search_data%' "; if ($reference != "") $sql .= "OR whatever"; ""James, Yz"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 93vs2p$cng$[EMAIL PROTECTED]">news:93vs2p$cng$[EMAIL PROTECTED]... > OK, I got a simple search page working (thanks

Re: [PHP] mixing HTML and PHP code

2001-01-15 Thread Alex Black
>> the horse is back from the dead! > >huh? inside joke. > Why? If nested tables can do the work, i won't bother learning how layers > work... um, I mean in your application design, not your html. >> I don't like to do database connections when I've already output markup, >> what if something

Re: [PHP] Array...

2001-01-15 Thread jeremy brand
*laughs* Yes. :) It is only 2:07 PM.. forgive me. Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more Get your own Free, Private email at http://www.smackdown.com/ - - - - - - - - - - - - - - - - - - - -

[PHP] password()

2001-01-15 Thread Jason Jacobs
Hi. I use password() to excrypt my passwords when I'm adding users to my mysql database. I'm wondering if there's a function to use to un-encrypt it (for a web interface to change the password, and so the admin who is editing user info can see what it is). Thanks for any help. Jason -- PHP

Re: [PHP] Array...

2001-01-15 Thread Johannes Janson
> for ($i=100; $i>0; $i++) shouldn't it be $i--? this loop would run forever... > print "\n"; > > But, I presume you would rather do this: > for ($i=100; $i>0; $i++) > print "\n"; > > because I can't imagine why you would want to escape double quotes in > HTML. > > Jeremy > > Jeremy Brand ::

Re: [PHP] checkboxes into MySQL

2001-01-15 Thread jeremy brand
What I see is that the below is not an array of checkboxes (that would be , not ). ... are part of a But, to make a checkbox be checked, you simply do this: Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand

[PHP] Basic SQL syntax

2001-01-15 Thread James, Yz
OK, I got a simple search page working (thanks to all of you who helped me). Another simple question for you. If I had a search and the data to be searched needs to be determined by check boxes, How would I write the sql>? Like this? $sql = "SELECT * FROM table WHERE town LIKE '%$search_data

[PHP] checkboxes into MySQL

2001-01-15 Thread Jerry Lake
I know this has been discussed, but it messing with me. in a script I'm working on I pull out an array of checkboxes from a database, how do I store what people select back to the DB all I end up with is the last selection of the array. Jerry Lake -Original Message- From: jeremy bran

Re: [PHP] Regex for telephone number

2001-01-15 Thread Alex Black
case "phone_us": if(ereg("^([2-9][0-9]{2})([2-9][0-9]{2})([0-9]{4})$", $var)){ return TRUE; }else{ set_stringtypes_error(throw_error3("lib_string_types_108", $var)); } break; case "phone_int": if(!preg_match("/[^0-9\(\)\-\. ]/", $var)){ return TRUE; }else{ se

Re: [PHP] PDFLIB 3.0 PHP 4.04

2001-01-15 Thread Jani Taskinen
On Mon, 15 Jan 2001, Cal Evans wrote: >But when I ./configure php, I use: > >./configure --with-pdflib=/usr/local/lib Leave the /lib part out..ie. use --with-pdflib=/usr/local instead. --Jani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For add

Re: [PHP] Perl-like DBI and generic SQL

2001-01-15 Thread Alex Black
I have found metabase to be superior to any other abstraction layer I've ever come across. Hey, it also allows you to do DB schema definitions with XML files, which is hugely cool. We're running development of commercial-grade (tested, yadda-yadda) doing development on mySQL, and moving to Oracl

Re: [PHP] Array...

2001-01-15 Thread jeremy brand
for ($i=100; $i>0; $i++) print "\n"; But, I presume you would rather do this: for ($i=100; $i>0; $i++) print "\n"; because I can't imagine why you would want to escape double quotes in HTML. Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.Jeremy

RE: [PHP] looping

2001-01-15 Thread Jerry Lake
Thanks, (Ignacio) I came up with this $counter++; if ($counter > "4") { $counter = "1"; echo ""; } Jerry Lake -Original Message- From: Ignacio Vazquez-Abrams [mailto:[EMAIL PROTECTED]] Sent: Monday, January 15, 2001 1:22 PM To: Jerry Lake Cc: PHP List Subject: Re: [P

[PHP] Array...

2001-01-15 Thread WreckRman2
How can I do an array like below 100-1? to WreckRman2 Combat Flight Center http://www.combatfs.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the lis

[PHP] Perl regular expression bug

2001-01-15 Thread Shaun Thomas
This only applies to PHP 4.0.4 Back with PHP 4.0.2, I could do this: $string would then contain "\[\[". Now, if I use that same code, $string contains "\\1\\1\\1\\1". I tried to compensate for this using PHP's new ability to allow perl syntax in the replace section. That leaves $string w

[PHP] HELP WITH UPLOAD REQUIRED!!!!!!!!

2001-01-15 Thread Mike Yuen
I am trying to allow various users to upload their own picture. What I would like to happen is to have the copy statement rename the .jpg image to the username. For example, if the username is mike, then I want the picture to be renamed mike.jpg The following is a snippet of code: The errors

[PHP] changing strings to float vars

2001-01-15 Thread bill
Sometimes clients put a dollar sign "$" in a form that only needs a number (like "1.50"). Is there a way to take a post variable and automatically convert it to a float value, stripping off any non-numeric characters? I tried doubleval() without success and I can't use intval() because it has de

Re: [PHP] BC Math

2001-01-15 Thread jeremy brand
They do just what they say. see: http://php.net/bc One drawback is that PHP can't natively handle these big numbers, so the return values from these functions are of type string. Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/Jeremy/

Re: [PHP] Help with IMAP_open please

2001-01-15 Thread Ignacio Vazquez-Abrams
On Fri, 29 Dec 2000, Dezider [iso-8859-2] Góra wrote: > I always get this error when trying to connect to the mailbox. I have > installed uw imap server. > > Warning: Couldn't open stream {localhost:143} in > /home/httpd/html/webmail/mailbox.php on line 12 > > Affected line is: > > $connection =

  1   2   3   >