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
> 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
> 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
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
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
>
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:
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
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
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
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
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
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
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
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
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,
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
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
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
> 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
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
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
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
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
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]>
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
"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
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
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
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
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
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
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
>
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:
>
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
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
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
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
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
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=
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
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
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.
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
101 - 143 of 143 matches
Mail list logo