Re: [PHP] Error(Newbie)

2002-06-23 Thread webmaster
I got that auto add slashes thing on. is it enough? If not how should I go about adding them? like this? $_SERVER['REMOTE_HOST'] = addslashes($_SERVER['REMOTE_HOST']); What sort of effects could an attack have? I am intergrating stats into a site. What other vars could I gather info from?

[PHP] netscape 4.x problem

2002-06-23 Thread Thomas E. Ruth
Hi, I'm having trouble getting a script working right in netscape 4.x and was wondering if anybody knew a workaround, or fix. If I have a script called sendheader.php with the following: ? if (! isset($GLOBALS[sendheader])) { header(Location: http://blah.com/sendheader.php;);

[PHP] Re: emailing html file

2002-06-23 Thread Andy
you can do this with the regular mailfunction. Take a look at http://www.php.net/mail Andy -- http://www.globosapiens.net Global Travellers Network! M.E. Suliman [EMAIL PROTECTED] schrieb im Newsbeitrag

Re: [PHP] Error(Newbie)

2002-06-23 Thread 1LT John W. Holmes
Yeah, magic_quotes will be enough, but it only handles GET, POST, and COOKIE data. I'm not sure what SERVER variables can be trusted, so it wouldn't hurt to addslash them... There isn't much of a risk to your query, but someone could still mess things up. If they formatted a cookie like

[PHP] PHP 4.2

2002-06-23 Thread Simon Troup
I've written a small freeware script that gets installed on a variety of different platforms running various PHP versions. I've read through the manual about the super global arrays and how post and get vars are no longer registered by default, but am confused about when it would be a good idea

php-general Digest 23 Jun 2002 11:45:02 -0000 Issue 1422

2002-06-23 Thread php-general-digest-help
php-general Digest 23 Jun 2002 11:45:02 - Issue 1422 Topics (messages 103432 through 103452): Re: Very slow pg access 103432 by: Frank 103436 by: Uros Gruber Re: cookies 103433 by: Chris Shiflett 103434 by: Paul O'Neil PHP 4.2.1 reading PAM/Shadowed

[PHP] Insert an array into MySQL

2002-06-23 Thread Rob Packer
Hi, I've seen a few post for this same thing but I can't seem to get it working. What I'm doing is taking a form with check boxes and putting them into an array. Then I'm attempting to INSERT them into the db, one checkbox value per row. Okay, well I've tries 2 ways that I think should work and

RE: [PHP] PHP 4.2

2002-06-23 Thread John Holmes
You can use the HTTP_*_VARS for now, but they are depreciated. They will work right now on most any version of PHP. I would just maintain two different versions, one for PHP 4.2+ and one for earlier versions. Sure, it's a little more of a pain...though... ---John Holmes... -Original

RE: [PHP] Insert an array into MySQL

2002-06-23 Thread John Holmes
Your second method should work, but it's dependent on what your form looks like and how your table was created. You obviously have a key set for this column and you're trying to insert the same value twice, which makes an error. Show us what your form looks like, not the whole thing, just for

Re: [PHP] PHP 4.2

2002-06-23 Thread Pekka Saarinen
At 6/23/2002, you wrote: I've written a small freeware script that gets installed on a variety of different platforms running various PHP versions. I've read through the manual about the super global arrays and how post and get vars are no longer registered by default, but am confused about when

Re: [PHP] PHP 4.2

2002-06-23 Thread Justin French
on 23/06/02 11:06 PM, Pekka Saarinen ([EMAIL PROTECTED]) wrote: Most virtual server users have no means to set PHP.INI to their liking so changes like that should be done in longer time span to let developers update the software _before_ changes in PHP happen. The changes and

Re: [PHP] Insert an array into MySQL

2002-06-23 Thread Rob Packer
John Holmes [EMAIL PROTECTED] wrote in message 001201c21ab5$0df073a0$b402a8c0@mango">news:001201c21ab5$0df073a0$b402a8c0@mango... Your second method should work, but it's dependent on what your form looks like and how your table was created. You obviously have a key set for this column and

Re: [PHP] Insert an array into MySQL

2002-06-23 Thread Rob Packer
oops, sorry about the other post (I've got a baby that likes the keyboard)... Hi, This is the form, which I had doubts about, but it seemed to put things into the array correctly when I tested it by printing it out. I can't see how, it will print key=0 value=index.html key=1 value=about.html

[PHP] Profiling

2002-06-23 Thread James Drabb
Hello all, Does PHP have any built in functions to do simple profiling on a page? Or should I just use $time1=time(); do_stuff(); $time2=time(); echo $time2-$time1;? Thanks, Jim Drabb -- - Never ask a geek why, just nod your head

Re: [PHP] Profiling

2002-06-23 Thread Justin French
Yes, that's what I use, except I use microtime(); Justin French on 23/06/02 11:49 PM, James Drabb ([EMAIL PROTECTED]) wrote: Hello all, Does PHP have any built in functions to do simple profiling on a page? Or should I just use $time1=time(); do_stuff(); $time2=time(); echo

Re: [PHP] getaddrinfo failed

2002-06-23 Thread Pag
So what's on /usr/home/pagon/www/index.php on line 497 at a few lines before it? on line 497 theres the line: $linha=file('downs.txt'); then the rest of the script as below. Before this line theres simple, very simple, html. I dont understand the error.

[PHP] Whos online at the moment in PHP

2002-06-23 Thread Pag
Is it possible to code in PHP a small indicator on a site saying how many people are viewing that page at the moment? Sorry if its a silly question, but i am a newbie at PHP. If it is, could you point me in the good direction? i mean, some function or something. Thanks.

[PHP] output_buffering

2002-06-23 Thread James Drabb
I was running some speed tests on a page that returns 1000 records from a db and spits them into a table. I have output_buffering Off in my php.ini file because of the statement below: ; Output buffering allows you to send header lines (including cookies) even ; after you send body content, at

[PHP] Problem with Apache2/PHP4.2.1

2002-06-23 Thread Simon Grabowski
I have upgraded from Apache 1.3.26 to 2.0.39 with PHP 4.2.1. I am running FreeBSD 4.6 and everything was installed from ports. I have a PHP script called go (filename is without the .php extension) and it is located in the root of my domain name: http://www.mydomain.com/go It's a script that my

Re: [PHP] Whos online at the moment in PHP

2002-06-23 Thread Justin French
Well, traditionally this would be done with sessions, and it's not exactly the easiest topic for a newbie to get their head around. It also never going to be a science -- how do you know when a user closes their browser window or click onto another page? You need to have clean-out routines for

Re: [PHP] Error(Newbie)

2002-06-23 Thread Chris Shiflett
The only data returned by a browser in a Cookie header is the name/value pairs. So, your example would not pose a threat of any sort. The Referer and User-Agent are separate headers, but like all data from the client, they should also not be trusted. If you have magic quotes enabled, you're

RE: [PHP] output_buffering

2002-06-23 Thread Mark Charette
What exactly are you measuring and how? -Original Message- From: James Drabb [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 23, 2002 9:09 AM To: php-general Subject: [PHP] output_buffering I was running some speed tests on a page that returns 1000 records from a db and spits them into a

Re: [PHP] Nested Menu Help

2002-06-23 Thread Lowell Allen
From: [EMAIL PROTECTED] When I am in page A (or one of it's children) I wish to show it's one level of children like so: Page A Child 1 Child 2 etc... Page B When I am in page B (or one of it's children) I wish to show it's one level of children like so: Page A Page B

Re: [PHP] netscape 4.x problem

2002-06-23 Thread Chris Shiflett
When you see document contains no data like that, the most likely cause is an endless loop. So, for whatever, reason, it seems that your conditional statement is returning true every time. Remove the Location header for now, and replace that line with: echo h1Redirecting to

Re: [PHP] Whos online at the moment in PHP

2002-06-23 Thread Chris Shiflett
Most questions like this depend more on your ability to think creatively than your experience with PHP, so don't let inexperience discourage you from exploring on your own. First, decide what you consider to be online exactly. If I, for example, requested a page 30 seconds ago, you would

[PHP] Remote cgi script function

2002-06-23 Thread Haddad Said
Hi, I am new to php, I would like to create a function that when called sends text from a text box as a query to a remote cgi script ,e.g http://www.anydomain.com/cgi-bin/script.cgi, and return the results as a variable so that i can echo the returned variable to an html page. I would

[PHP] is there a way to track downloads

2002-06-23 Thread Kevin J
Hey all, I would like to place some files on my site and use PHP to track how many users have downloaded those files. Is this possible? Is the PHP code only placed on this one page? I don't know PHP all that well, but my host supports it, and I want to track downloads, also to be able ot have

Re: [PHP] is there a way to track downloads

2002-06-23 Thread Duncan Hill
On Sun, 23 Jun 2002, Kevin J wrote: Hey all, I would like to place some files on my site and use PHP to track how many users have downloaded those files. Is this possible? Approach the problem logically: 1) You have a series of files that you want people to download. 2) You want to

Re: [PHP] is there a way to track downloads

2002-06-23 Thread Kevin J
Hello, My fault, I didn't state that i was a complete Newbie to PHP. I am looking at scripts and realize that I need to use a database for this, etc... so I am just gonna forget the whole thing. Thanks anyways Kevin J Duncan Hill [EMAIL PROTECTED] wrote in message [EMAIL

Re[2]: [PHP] is there a way to track downloads

2002-06-23 Thread Julie Meloni
KJ I am looking at scripts and realize that I need to use a database for this, KJ etc... so I am just gonna forget the whole thing. Unfortunate, that giving up so easily! You can also do exactly the same type of tracking in a plain text file, if you do not have access to a db. Substitute

Re: Re[2]: [PHP] is there a way to track downloads

2002-06-23 Thread Kevin J
Well see I don't know where to begin all this. I have a plain html page, with links to the songs: ../music/song.mp3 And I woudn't know where to start, in creating a php track file, or a text file to keep track. I am able to have MySQL on the hosting server, which I am going to enable... and

Re: Re[2]: [PHP] is there a way to track downloads

2002-06-23 Thread Duncan Hill
On Sun, 23 Jun 2002, Kevin J wrote: Sorry for giving up, but it seems to hard for me, plus I only have about 2 weeks to learn PhP, if I wanted to implement this... I don't think that is possible. The manual abounds with examples on how to a) connect to a database b) read / write data in

[PHP] about file permissions + cuteftp

2002-06-23 Thread Adrian Murphy
hi, how come when i make a dir thus mkdir($basedir,0777); cute can't then chmod or delete said dir. also vice versa : when i create a dir with cute with 777 access php can't do anything with it. it's very annoying.

RE: [PHP] is there a function like javascript's window.open in PHP

2002-06-23 Thread Mark Charette
This is a common question, related to the lack of understanding of client/server architectures I believe. PHP is all server side - a browser is all client side. Servers can send data only to the browser, nothing else. The server can inquire and gather data from text files and databases, but it

[PHP] Smarty compared to Roadsend?

2002-06-23 Thread Francisco Reyes
Anyone has any comparative info between Smarty and Roadsend frameworks? I saw them mentioned on an email, along with horde and binarycloud, and they look interesting. I have looked at horde and found it difficult to get even the basics due to lacking documentation and configuration files which

Re: [PHP] Insert an array into MySQL

2002-06-23 Thread Rob Packer
Nevermind, I got it. I had Unique for a field which made it mad. Rob Packer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... oops, sorry about the other post (I've got a baby that likes the keyboard)... Hi, This is the form, which I had doubts about, but

Re: [PHP] Cc / Bcc don't work on win2k but on linux???

2002-06-23 Thread Christoph Grottolo
You could use the mail class by Manuel Lemos on php.upperdesign.com if you need cc/bcc and attachments. I've been using it for quite some time now with good results. Christoph Lance wrote: ok. thanks for the info. guess i have to wait till it hit stable version before deploying it on live

[PHP] Formatting phone numbers

2002-06-23 Thread Corinne Shea
Hi, I'd like to write a function that will take a string of characters and output it in a phone number format (xxx)xxx- and one for credit cards ---. What I have below will currently remove non-numeric characters from the string, but I'm not sure how to do the rest of the

[PHP] JPGraph errors

2002-06-23 Thread Christopher J. Crane
I have gotten JPGraph to work if I suppress the output of errors. I am using the example of backgroundex02.php. If I add the line error_reporting(0); at the top, I get the graph, if I remove it...I get the following error; Warning: Use of undefined constant LC_TIME - assumed 'LC_TIME' in

[PHP] Re: Formatting phone numbers

2002-06-23 Thread S.P. Telgenhof Oude Koehorst
Hi Corinne, Maybe you have a look at the sprintf function in PHP http://www.php.net/manual/nl/function.sprintf.php It returns a string produced according to a formatting string (i.e. phonenumber) format. Also have look at the other formatting functions in PHP. Bye, Sacha Telgenhof Corinne

[PHP] Re: Shot in the dark

2002-06-23 Thread Numero 6
[EMAIL PROTECTED] (Jtjohnston), il 06 lug 2002, trasse un profondo sospiro e disse: [cut] Check your date. Bye. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Remote cgi script function

2002-06-23 Thread John Holmes
I am new to php, I would like to create a function that when called sends text from a text box as a query to a remote cgi script ,e.g http://www.anydomain.com/cgi-bin/script.cgi, and return the results as a variable so that i can echo the returned variable to an html page. ? $contents = ;

RE: [PHP] Error(Newbie)

2002-06-23 Thread John Holmes
The only data returned by a browser in a Cookie header is the name/value pairs. So, your example would not pose a threat of any sort. The Referer and User-Agent are separate headers, but like all data from the client, they should also not be trusted. If you have magic quotes enabled,

Re: [PHP] Whos online at the moment in PHP

2002-06-23 Thread Uros Gruber
Hi, I've ma some atuh system to do such thing beside other special functions, u have to store some session ids in some db and then refresh timestamp for those session wich is still active other delete after 30min or some other time. -- bye, Urosmailto:[EMAIL

[PHP] How to put a new line character with fputs($birthday_file, $content);

2002-06-23 Thread Alfredo
Hi, I am saving the result of a query on a text file. Then I want to open it with excel. At the moment, when I open it with excel, all results appear in one very long line. How could I insert a new line character at the end of each record? Thanks Alfredo -- PHP General Mailing List

Re: [PHP] is there a function like javascript's window.open in PHP

2002-06-23 Thread Burak Delice
Mark, thankyou very very much your detailed explanations about my complexity. And thank you for gave your time to write it. I think, I have to start first step about scripts :) Mark Charette [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... This is a common

Re: [PHP] How to put a new line character with fputs($birthday_file,$content);

2002-06-23 Thread Duncan Hill
On Fri, 21 Jun 2002, Alfredo wrote: Hi, I am saving the result of a query on a text file. Then I want to open it with excel. At the moment, when I open it with excel, all results appear in one very long line. How could I insert a new line character at the end of each record? Unix

Re: [PHP] How to put a new line character with fputs($birthday_file,$content);

2002-06-23 Thread Mark Heintz PHP Mailing Lists
\n is a newline character, \r is a carriage return. $line = This is a line with a newline character.\n; You can find it in the manual here: http://www.php.net/manual/en/language.types.string.php mh. On Fri, 21 Jun 2002, Alfredo wrote: Hi, I am saving the result of a query on a text

[PHP] php or mysql db update

2002-06-23 Thread Steven Dowd
I am trying to sort some old data files that have turned up, records of who lived where in my town, they are quite incomplete, and I have to reformat the information in a 20k line database, and could really do with a little help the tables and basic data is like this: ID , Address, Name,

Re: [PHP] Formatting phone numbers

2002-06-23 Thread Chris Shiflett
Corinne Shea wrote: Hi, I'd like to write a function that will take a string of characters and output it in a phone number format (xxx)xxx- and one for credit cards ---. This is actually very easy to do if all you want to do is format, meaning you have already validated

[PHP] Is this a BUG?

2002-06-23 Thread César Aracena
Hi all, A couple of days ago, I’ve been starting to organize all my scripts into functions within libraries, and got into a problem this morning. Now, I don’t know if this is a bug or it’s just me getting confused. I got the problem when calling two functions – one gets variables from the other

[PHP] retaining keys in array_splice

2002-06-23 Thread Austin W. Marshall
I can't seem to figure out how to use array_splice to replace an element while retaining the key... instead it replaces the key with 0 for example... $foo=array(color=blue,fruit=apple,foo=bar); array_splace($foo,1,1,array(car=pinto)); yields... Array ( [color] = blue [0] = pinto

Re: [PHP] How to put a new line character with fputs($birthday_file, $content);

2002-06-23 Thread hugh danaher
I think you can also use \t to separate the data into the various columns needed by excel - Original Message - From: Alfredo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 21, 2002 7:55 PM Subject: [PHP] How to put a new line character with fputs($birthday_file, $content);

[PHP] solution

2002-06-23 Thread Austin Marshall
I figured it out, not what i'd wanted it to be, but it works, if anyone can improve upon it, please let me know. ?php function array_key_replace($foo,$original,$replacement,$replacement_value) { $bar=array(); foreach($foo as $key=$value) { if ($key==$original) {

[PHP] Re: Is this a BUG?

2002-06-23 Thread CC Zona
In article 000c01c21b02$4b69e1b0$1aed0dd1@gateway, [EMAIL PROTECTED] (César aracena) wrote: I have a mainusers.php page, which only calls for functions instead of writing them all together inside that page. At one step, it calls for an “adduser” function which brings a table that let the

[PHP] php install in win32

2002-06-23 Thread Septic Flesh
I just download apache 1.3.x latest, php latest andmy sql latest. (win32 env) Which packages I need to download now to enable gd-library for graphics ? and zlib ? I wanna enable png creation . . where can I find the compiled dlls for those ? I found a dll called gds32.dll in the dlls dir of

Re: [PHP] Is this a BUG?

2002-06-23 Thread Andrew Brampton
If the code is in a function then don't you need to call global $HTTP_POST_VARS; at the top of the function so that it knows you can use that varible? Andrew - Original Message - From: César Aracena [EMAIL PROTECTED] To: PHP General List [EMAIL PROTECTED] Sent: Sunday, June 23, 2002

Re: [PHP] is there a way to track downloads

2002-06-23 Thread Henry
i have a opensource redirect script that can easily be adapted to track downloads - just need to replace a absolute url for a file name. check it out at http://user:[EMAIL PROTECTED]/lab cheers Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

php-general Digest 23 Jun 2002 23:59:53 -0000 Issue 1423

2002-06-23 Thread php-general-digest-help
php-general Digest 23 Jun 2002 23:59:53 - Issue 1423 Topics (messages 103453 through 103505): Insert an array into MySQL 103453 by: Rob Packer 103455 by: John Holmes 103458 by: Rob Packer 103459 by: Rob Packer 103482 by: Rob Packer Re: PHP 4.2

[PHP] Using Oracle Data base store procedure (function, procedure, package)

2002-06-23 Thread dy kurniawan
Dear pals, how can we execute Oracle Data base store procedure (function, procedure, package) and retrieve the result/s via PHP ? any example ? TIA, edyk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Using Oracle Data base store procedure (function, procedure, package)

2002-06-23 Thread Peter
by looking in the manual :) there is someinfo there.. -Original Message- From: èdy kurniawan [mailto:[EMAIL PROTECTED]] Sent: Monday, 24 June 2002 11:24 AM To: php general Subject: [PHP] Using Oracle Data base store procedure (function, procedure, package) Dear pals, how

[PHP] How to remove item from cart

2002-06-23 Thread Vicki
I have a shopping cart where users have added a list of documents for purchase. I want to allow users to remove documents from the cart before checkout. There are no quantities involved-- this is a yes I want $docID or no I don't situation. I thought the easiest way might be to have a checked

[PHP] Limiting text inputs by character count?

2002-06-23 Thread Andre Dubuc
Is there a way to limit the number of characters that may be inputed into: a) a input type=text . . . input b) a textarea . . . input I would like to control the maximum number of characters for each of these inputs. Any suggestions of where to look, or how to do it, if it's

RE: [PHP] Limiting text inputs by character count?

2002-06-23 Thread Martin Towell
a) maxlength=xx b) use javascript (document.forms[frm_name].elements[textarea].value.length) (I think you need the .value bit) -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 11:53 AM To: [EMAIL PROTECTED] Subject: [PHP] Limiting text

RE: [PHP] Limiting text inputs by character count?

2002-06-23 Thread Peter
for standard text input use input name=textfield type=text size=10 maxlength=10 that will only allow 10 characters not sure if that will also work for text area's -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Monday, 24 June 2002 11:53 AM To: [EMAIL

Re: [PHP] Using Oracle Data base store procedure (function, procedure, package)

2002-06-23 Thread dy kurniawan
very thanksful if you could refering to me what part (kinda) manual that shows my case ? i've ever read the PHP manual in english, but i can't find what i need. please.. sincerely, edyk - Original Message - From: Peter [EMAIL PROTECTED] Subject: RE: [PHP] Using Oracle Data base store

RE: [PHP] Using Oracle Data base store procedure (function, procedure, package)

2002-06-23 Thread Peter
have a look here ... this would be a good starting point... http://www.php.net/manual/en/ref.oracle.php I am sure this would be available in many other languages apart from just english :) -Original Message- From: èdy kurniawan [mailto:[EMAIL PROTECTED]] Sent: Monday, 24 June

Re: [PHP] Limiting text inputs by character count?

2002-06-23 Thread Andre Dubuc
Thanks Peter, That'll fix it. Regards, Andre On Sunday 23 June 2002 10:04 pm, you wrote: for standard text input use input name=textfield type=text size=10 maxlength=10 that will only allow 10 characters not sure if that will also work for text area's -Original Message-

Re: [PHP] Using Oracle Data base store procedure (function, procedure, package)

2002-06-23 Thread dy kurniawan
Peter, Thanks for your ASAP response, Have you ever touch with oracle scripting ? The manual doesn't show how we can execute kind of oracle store procedure .. I thought that PHP only supporting for SQL - query only but not supported to retrieve PL-SQL, When I do the samething with Oracle

RE: [PHP] Using Oracle Data base store procedure (function, procedure, package)

2002-06-23 Thread Peter
I don't know ... am only just starting to use php oracle today :) -Original Message- From: èdy kurniawan [mailto:[EMAIL PROTECTED]] Sent: Monday, 24 June 2002 12:46 PM To: Peter; php general Subject: Re: [PHP] Using Oracle Data base store procedure (function, procedure,

[PHP] === and @

2002-06-23 Thread Phil Schwarzmann
What exactly happens when you put three equal-signs together instead of just one or two? I've seen this in other people's code, then search php.net and found nothing. Also, what happens when you put a thingy in front of a function? Does it surpress the errors? Thanks!!

Re: [PHP] === and @

2002-06-23 Thread Rasmus Lerdorf
http://php.net/operators which would take you to: http://www.php.net/manual/en/language.operators.comparison.php and http://www.php.net/manual/en/language.operators.errorcontrol.php It's all there. -Rasmus On Sun, 23 Jun 2002, Phil Schwarzmann wrote: What exactly happens when you put three

Re: [PHP] === and @

2002-06-23 Thread Justin French
on 24/06/02 12:46 PM, Phil Schwarzmann ([EMAIL PROTECTED]) wrote: What exactly happens when you put three equal-signs together instead of just one or two? I've seen this in other people's code, then search php.net and found nothing.

[PHP] Time Delay using phpscript

2002-06-23 Thread Uma Shankari T.
Hello, Can anyone please clear my doubt I need to display some strings one by one after some specific time..In javascript we can use setTimeout() function.Is there any function like this in phpscript ???.. Thanks Regards Uma -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Time Delay using phpscript

2002-06-23 Thread Martin Towell
maybe while(true) { echo word; flush(); sleep(1); } but I don't think that's exactly what you want, is it? -Original Message- From: Uma Shankari T. [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 1:14 PM To: PHP Subject: [PHP] Time Delay using phpscript Hello, Can

RE: [PHP] Limiting text inputs by character count?

2002-06-23 Thread John Holmes
The best way to do this is server side with strlen(). You can use javascript or maxlength, but if a user wants to get around it, they can. ---John Holmes... -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 23, 2002 9:47 PM To: '[EMAIL PROTECTED]';

Re: [PHP] about file permissions + cuteftp

2002-06-23 Thread Police Trainee
Because when you use php to make a file/directory, the webserver makes the owner the webserver (usually nobody). Unless you log in as nobody (or whatever respective name), you will not be able to modify the permissions or delete the file/dir. However, when logging in and making a file with 777

RE: [PHP] Time Delay using phpscript

2002-06-23 Thread John Holmes
I need to display some strings one by one after some specific time..In javascript we can use setTimeout() function.Is there any function like this in phpscript ???.. No, not really. PHP just evaluates the script and sends the output to the browser. It has no control over the display at all.

Re: [PHP] Time Delay using phpscript

2002-06-23 Thread Justin French
Why would you want to do this? All it will achieve is delaying the output of the entire file to the browser... If a page would usually take .5 seconds to parse, and you have 10 seconds of delays in the script, then the browser will get the page in around 10.5 seconds... the user will just see a

[PHP] copying the structure of a blank table in mysql

2002-06-23 Thread Phil Schwarzmann
Anyone have a link (or the code) to copy the structure of a blank table to a new table using mysql? Thanks!!

[PHP] rounding a number

2002-06-23 Thread Phil Schwarzmann
I want to round a number to the nearest decimal place... if the number is 4.623, I want it to display 4.6 if the number is 2.36, I want it to display 2.7 Is there a function that does this? round(), ceil(), floor() don't do this and I've checked through all the math functions in my

RE: [PHP] rounding a number

2002-06-23 Thread Martin Towell
according to the pdf version of the manual I have, round() is what you need float round(float val[, int precision]) have another look that the man page -Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 1:35 PM To: [EMAIL PROTECTED]

RE: [PHP] rounding a number

2002-06-23 Thread Jason Soza
I think what you're looking for is number_format() - you can set decimal places with it and used in combo with round(), ceil(), and/or floor(), you should be able to achieved the desired result. http://www.php.net/manual/en/function.number-format.php HTH, Jason Soza -Original Message-

Re: [PHP] rounding a number

2002-06-23 Thread Jason Wong
On Monday 24 June 2002 11:34, Phil Schwarzmann wrote: I want to round a number to the nearest decimal place... if the number is 4.623, I want it to display 4.6 if the number is 2.36, I want it to display 2.7 You don't really mean 2.36 -- 2.7 ?? Is there a function that does this? round(),

Re: [PHP] netscape 4.x problem

2002-06-23 Thread Analysis Solutions
Hi Tom: On Sun, Jun 23, 2002 at 01:24:57AM -0600, Thomas E. Ruth wrote: If I have a script called sendheader.php with the following: ? if (! isset($GLOBALS[sendheader])) { header(Location: http://blah.com/sendheader.php;); exit; } echo blah; ? Dude, what IS the point

Re: [PHP] php or mysql db update

2002-06-23 Thread Analysis Solutions
Steven: On Sun, Jun 23, 2002 at 10:30:56PM +0100, Steven Dowd wrote: ID , Address, Name, Relation 1, market st, fred waters, head 2, market st, mrs waters, wife 3, market st, paul waters, son 4, market st, jim wheeler, head 5, market st, mrs wheeler, wife 6, market st, ann wheeler, dau

Re: [PHP] How to remove item from cart

2002-06-23 Thread Analysis Solutions
Hi Vicki: On Sun, Jun 23, 2002 at 09:30:39PM -0400, Vicki wrote: I have a shopping cart where users have added a list of documents for purchase. I want to allow users to remove documents from the cart before checkout. There are no quantities involved-- this is a yes I want $docID or no I

[PHP] Re: UPDATE mysql

2002-06-23 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I can't get UPDATE to work properly when querying MySQL. $query = UPDATE $table SET field1='$var1' WHERE id='$id'; I want to update one field of one row in a table. Is this syntax correct? if id is an int type, no. You only need

Re: [PHP] copying the structure of a blank table in mysql

2002-06-23 Thread Analysis Solutions
Phil: On Sun, Jun 23, 2002 at 11:14:22PM -0400, Phil Schwarzmann wrote: Anyone have a link (or the code) to copy the structure of a blank table to a new table using mysql? It's far simpler to do this from a command line on the system using the utilities of the database vendor, such as

[PHP] Run two separate version of Apache and Php

2002-06-23 Thread rdkurth
Hello php-general, I need to run a separate version of Apache on the same server I also what to use a different copy of the php.ini file with that version of apache. I am aware that I can override most of the php.ini settings in the httpd.conf file. But this is not what I want to do. Php will be

Re: [PHP] Re: UPDATE mysql

2002-06-23 Thread Jason Wong
On Monday 24 June 2002 13:03, David Robley wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I can't get UPDATE to work properly when querying MySQL. $query = UPDATE $table SET field1='$var1' WHERE id='$id'; I want to update one field of one row in a table. Is this