[PHP] Re-populating File field in form - won't work??

2002-10-14 Thread Monty
I have a few File input fields in a form so people can upload images. If there's an error with the form, I want to re-populate the fields with the values the user filled in. This works for all the fields except the File fields. When I check the HTML output to the browser, I do see that the value p

RE: [PHP] Checking File Size BEFORE Uploading

2002-10-14 Thread John W. Holmes
> If someone uploads a file via an HTML form, is there a way to check the > file > size before it's uploaded to the server? You can set the MAX_FILE_SIZE in the hidden element of your form, but I don't think that stops the form from being submitted if the file size is too large. Basically, the fi

RE: [PHP] Re-populating File field in form - won't work??

2002-10-14 Thread John W. Holmes
> I have a few File input fields in a form so people can upload images. If > there's an error with the form, I want to re-populate the fields with the > values the user filled in. This works for all the fields except the File > fields. When I check the HTML output to the browser, I do see that the

[PHP] Re: Pass vars in URL

2002-10-14 Thread Monty
There are two ways to do this. The easy way is to simply load any vars passed via the URL or from a form as local vars in each script. So, I have the following at the beginning of every script: extract($_GET); // load vars passed via URL into local vars. extract($_POST); // load vars passed via

Re: [PHP] Checking File Size BEFORE Uploading

2002-10-14 Thread Monty
Hi John, yes, unfortunately setting the MAX_FILE_SIZE field only works once the files have been uploaded. Thanks for the reply! > From: [EMAIL PROTECTED] (John W. Holmes) > Organization: U.S. Army > Reply-To: <[EMAIL PROTECTED]> > Newsgroups: php.general > Date: Mon, 14 Oct 2002 16:10:48 -0400 >

Re: [PHP] Re-populating File field in form - won't work??

2002-10-14 Thread Marco Tabini
I think it's a "security" feature to prevent people from doing things like inserting a hidden file field with a pre-defined value (e.g.: "/etc/passwd") and then tricking the user to unwittingly submit the form. The same probably applies to all browsers. On Mon, 2002-10-14 at 16:05, Monty wrote:

[PHP] Re: Checking File Size BEFORE Uploading

2002-10-14 Thread Monty
Nicos, the problem is that MAX_FILE_SIZE doesn't check the file size before it's uploaded to the server, it only works afterwards. So, you have to first wait for the file to upload before you know whether or not it's too large. Thanks. > Hi, > > The way is : > > > Send this file: > > > See

[PHP] Storing/passing variables through multiple-part function/casestatement

2002-10-14 Thread Verdon Vaillancourt
Hi, I¹m trying to cobble together a case where where data is retrieved from one row of a mySQL table, the row is deleted, the retrieved data is inserted into a new row in different table. Most of my code seems to be working (I think the data is being retrieved, the old row is being deleted, the n

[PHP] 2.0.43 and PHP

2002-10-14 Thread Jochen Kächelin
Several weeks ago I read not to use PHP and Apache 2.0.x in production. After installain 2.0.43 and PHP the message is no longer there! Is it offically released for production use now? -- Jochen Kaechelin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

RE: [PHP] SSH (again)

2002-10-14 Thread James Mackie
As this is very OT I have replied privately.. :) James -Original Message- From: Alan Todd [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 12:59 PM To: PHP Subject: [PHP] SSH (again) Question for all you out there .. Trying to do ssh (yes i know i checked the archives) .. i

[PHP] crypt() function

2002-10-14 Thread Adam Plocher
Hello, I am trying to authenticate a password using the crypt() function. Here's what I got: if (crypt($_SERVER['PHP_AUTH_PW'],$data[1]) == $data[1]) { ... } $data[1] being the salt.. It half-way works... If the users password is 'blah' it will authenticate fine, but if you append anyt

Re: [PHP] Re: Checking File Size BEFORE Uploading

2002-10-14 Thread Jason Wong
On Tuesday 15 October 2002 04:29, Monty wrote: > Nicos, the problem is that MAX_FILE_SIZE doesn't check the file size before > it's uploaded to the server, it only works afterwards. So, you have to > first wait for the file to upload before you know whether or not it's too > large. Actually it do

[PHP] How to setcookie with two domains

2002-10-14 Thread Phil Powell
Is it possible, w/o using sessionid session variables, to use setcookie to set a cookie that will have two domains or more? Just curious. I am having to set a cookie that will go to one domain and then to another domain. Not sure if I can do multiple setcookie commands and be able to produce

[PHP] two submit buttons redirecting to two scripts

2002-10-14 Thread Sonal Patel
Hello, I am very new to this group. I have a very simple question. Please look at this form, http://antriksh.com/resources/2_submit_button_form.shtml here I want to change the echo statement in the script "action.php" to redirect it to another script. ie, I want to change the form action dyna

[PHP] Re: two submit buttons redirecting to two scripts

2002-10-14 Thread Anup
you have this: change the name of the buttons to b1 and b2, respectively, and give them some non-null value (as you have it) Then in action.php you will have the following code: if ($b1) { redirct to script1 } elseif ($b2) { redirct to script2 } /*Either b1 OR b2 will have a value, not both,

Re: [PHP] Re: two submit buttons redirecting to two scripts

2002-10-14 Thread Sonal Patel
sorry, earlier I did not send the message to the group. Anup, I tried your solution which works exactly same as mine, and it also gives me error when I try to redirect. As far as echoing which button was selected --it was fine and both scripts work same. But redirect does not work. here is the

Re: [PHP] 2.0.43 and PHP

2002-10-14 Thread Rasmus Lerdorf
On Mon, 14 Oct 2002, [ISO-8859-15] Jochen Kächelin wrote: > Several weeks ago I read not to use PHP and Apache 2.0.x in production. > After installain 2.0.43 and PHP the message is no longer there! > > Is it offically released for production use now? Nope -- PHP General Mailing List (http://w

RE: [PHP] Storing/passing variables through multiple-part function/casestatement

2002-10-14 Thread John W. Holmes
INSERT INTO table2 SELECT * FROM table1 WHERE ... DELETE FROM table1 WHERE ... Where are you stuck? ---John Holmes... > -Original Message- > From: Verdon Vaillancourt [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 14, 2002 4:31 PM > To: PHP-General > Subject: [PHP] Storing/passing v

Re: [PHP] Re: two submit buttons redirecting to two scripts

2002-10-14 Thread Nick Eby
> here is the error message, > Warning: Cannot add header information - headers already sent by > (output started at /home3/www/antriksh/resources/action2.php:5) in > /home3/www/antriksh/resources/action2.php on line 13 > > any help? > that warning is probably generated because you're using the h

[PHP] Need PHP programmer in Northwest for couple week job

2002-10-14 Thread Eric JT Harlow
Need a PHP/MySQL programmer for a couple week job in the Northwest (Portland OR, Area) Please respond ASAP. Eric JT Harlow Sisgrate Technologies Vancouver, WA USA www.sisgrate.com Email: [EMAIL PROTECTED] Phone: 360 891 6991 Fax: 360 891 6865 "This communication (including attachments) contain

[PHP] upload directory

2002-10-14 Thread Jennifer Swofford
Is there an easy way to upload an entire directory? Rather than selecting the 19 files in a directory, to just select the directory, and have all its contents go with it? (Or even a not-such-an easy way?) Thank you very much for any hints. Jen

Re: [PHP] php mail()

2002-10-14 Thread Paul Roberts
The additional_parameters parameter can be used to pass an additional parameter to the program configured to use when sending mail using the sendmail_path configuration setting. For example, this can be used to set the envelope sender address when using sendmail. You may need to add the user th

Re: [PHP] upload directory

2002-10-14 Thread Tim Monaghan
Are you trying to do this via a web-script? Meaning, your php script is the server, and windows would be the client? Or is your script uploading a file to another server? Tim =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Custom Programming Web Programming community & discussion http://www.inter-apps.com

Re: [PHP] upload directory

2002-10-14 Thread Jennifer Swofford
First scenario is correct. > Are you trying to do this via a web-script? > Meaning, your php script is the server, and windows would be the client? > > Or is your script uploading a file to another server? > > Tim > > - Original Message - > From: "Jennifer Swofford" <[EMAIL PROTECTED]>

[PHP] Re: Need PHP programmer in Northwest for couple week job

2002-10-14 Thread nicos
Hello, I'm here if you need me. But that can be only a freelance since I'm french. I still can do the same work. -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet "Eric Jt Harlow" <[EMAIL PROTECTED]> a écrit dans le message de news: 01d201c273d4$0b3

[PHP] Re: upload directory

2002-10-14 Thread Nick Eby
"Jennifer Swofford" <[EMAIL PROTECTED]> wrote: >Is there an easy way to upload an entire directory? Rather than selecting the 19 files in a directory, to just select the directory, and have all its contents go with it? (Or even a not-such-an easy way?) Since uploading a file to your webserver

[PHP] Re: upload directory

2002-10-14 Thread Owen Prime
Just a thought from left field. Probably wont help much but if the clients side were willing to upload a zip file, you could decompress & expand it on the fly after uploading. Cheers, Owen Prime http://www.noggin.com.au Jennifer Swofford wrote: > Is there an easy way to upload an entire dir

[PHP] passing mysql_error() out put to a different page?

2002-10-14 Thread Peter Houchin
howdy, I have a page that I want to control the errors etc for a site, now what I want is to perform a query on one page but if there's an error it opens a different page with the error message on it including the out put from mysql_error() can this be done? Cheers Peter "the only dumb question

RE: [PHP] Re: two submit buttons redirecting to two scripts

2002-10-14 Thread Peter Houchin
make sure there is nothing before the if statements for example etc and that should work fine regardless if your using the Header( Location...) other means > -Original Message- > From: Sonal Patel [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, 15 October 2002 8:06 AM > To: Anup > Cc: [EM

Re: [PHP] passing mysql_error() out put to a different page?

2002-10-14 Thread Brad Bonkoski
Very interesting question The only thing I can come up with right now is if you detect an error (one of the functions returning FALSE,) you can write the contents of mysql_error() to a file log and display that file on another page? Or pass the output of that (mysql_error()) as an HTTP/form

RE: [PHP] passing mysql_error() out put to a different page?

2002-10-14 Thread Peter Houchin
i have tried this .. but am getting errors at the moment .. (the sql error is deliberate) function new_user() { $res = mysql_query("INSERT INTO users WHERE uname='$_POST[uname]' , passwd='$_POST[pass]', firstname='$_POST[firstname]', lastname='$_POST[lastname]', email='$_POST[email]' ") // p

RE: [PHP] passing mysql_error() out put to a different page?

2002-10-14 Thread John W. Holmes
Maybe you should just save the error message into a cookie or session and then use header() to redirect to the error page. ---John Holmes... > -Original Message- > From: Peter Houchin [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 14, 2002 9:22 PM > To: Brad Bonkoski > Cc: php_gen >

Re: [PHP] Re: two submit buttons redirecting to two scripts

2002-10-14 Thread Sonal Patel
thank you all for your help, now my form works and does what I expect it to do,--- here is the new version which redirects to two scripts with the revised code-- http://antriksh.com/resources/2_submit_button_form2.shtml Sonal On Monday, October 14, 2002, at 08:44 PM, Peter Houchin wrote: >

Re: [PHP] crypt() function

2002-10-14 Thread Marco Tabini
Have you considered using md5() instead? On Mon, 2002-10-14 at 16:27, Adam Plocher wrote: > Hello, I am trying to authenticate a password using the crypt() > function. Here's what I got: > > if (crypt($_SERVER['PHP_AUTH_PW'],$data[1]) == $data[1]) > { > ... > } > > $data[1] being the s

Re: [PHP] Storing/passing variables through multiple-partfunction/casestatement

2002-10-14 Thread Verdon Vaillancourt
I have to get the data from table1, delete the data from table1, put the data into table2. I'm either not getting the data from table1 or am not passing it to table2, I'm not sure which. On 10/14/02 6:37 PM, "John W. Holmes" <[EMAIL PROTECTED]> wrote: > INSERT INTO table2 SELECT * FROM table1 WH

Re: [PHP] __file__ and __line__

2002-10-14 Thread David T-G
Andy -- ...and then Ns_Andy said... % % what's its use and how to use(Example)? They're constants that identify where you are. I use __FILE__ so that I don't have to keep tweaking my code when working in the development environment: # this will let us figure out where we are and then always

RE: [PHP] Storing/passing variables through multiple-partfunction/casestatement

2002-10-14 Thread John W. Holmes
So you use the INSERT INTO ... SELECT ... to do the select from table 1 and the insert into table 2. Then use a DELETE to erase the info from table 1. Show your script so far, we can't help you much more without seeing what you're doing. ---John Holmes... > -Original Message- > From: V

Re: [PHP] Storing/passing variables throughmultiple-partfunction/casestatement

2002-10-14 Thread Verdon Vaillancourt
On 10/14/02 11:07 PM, "John W. Holmes" <[EMAIL PROTECTED]> wrote: > So you use the INSERT INTO ... SELECT ... to do the select from table 1 > and the insert into table 2. Then use a DELETE to erase the info from > table 1. > > Show your script so far, we can't help you much more without seeing

RE: [PHP] passing mysql_error() out put to a different page?

2002-10-14 Thread Peter Houchin
I think that should work but for some reason nothing is getting written into the session function new_user() { $res = mysql_query("INSERT INTO users WHERE uname='$_POST[uname]' , passwd='$_POST[pass]', firstname='$_POST[firstname]', lastname='$_POST[lastname]', email='$_POST[email]', company=

[PHP] Inserting a variable into a mysql_query() statement

2002-10-14 Thread Phil Clark
I'm trying to insert the variable $hidden_manuf_id into a mysql_query() statement. If i do this: mysql_query("DELETE FROM product WHERE manufacturer=$hidden_manuf_id",$bb) or die(mysql_error()); PHP server doesn't see the variable because it is inside the string quotes"". If I do this: mysql_que

Re: [PHP] Inserting a variable into a mysql_query() statement

2002-10-14 Thread Timothy Hitchens
Single around the variable mysql_query("DELETE FROM product WHERE manufacturer='$hidden_manuf_id'",$bb) Timothy Hitchens [EMAIL PROTECTED] Phil Clark wrote: > I'm trying to insert the variable $hidden_manuf_id into a mysql_query() > statement. > > If i do this: > mysql_query("DELETE FROM

[PHP] PHP Upgrade

2002-10-14 Thread Ramesh Nagendra Pillai
Hai all I am using Apache/PHP4.0.1/PostgreSQL, I had upgraded PHP to PHP.4.2.3, now My problem is none of my PostgreSQL function are working and also the server variables(e.g $REQUEST_METHOD..)also, Can any one please help me out to fix this problem. This is the first time I have upgraded my PHP.

RE: [PHP] People who searched this also searched this!

2002-10-14 Thread Simon Taylor
This sounds a lot harder than it is, all you have to do is first of all make some space ion your db then you need to cache searches that users have done. Store the group of searches for unique users, then if someone does a search match it against the cache and pop up all items which were retrieved

<    1   2