Re: [PHP] FW: A little O T: input type=File -- Can I make a better looking file box?

2001-12-12 Thread David Minor

I think you want to look at input type=image 

Brandon Orther wrote:
Hello,
 
I have been working on a php script and lately have been adding style
sheets and image submit buttons to make it look better.
 
I have now run into the problem that the input type file looks like a
regular form input.  I would like to use an image as the browse button
and a css for the text box.  If I apply a css to the file input it
doesn't look right.
 
Does anyone know another way to make a file input with more options on
looks?  Can I make the browse button an image I make?
 
Thanks for any help
Brandon



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] FW: A little O T: input type=File -- Can I make a better looking file box?

2001-12-12 Thread David Minor

oh, you're right.  I misread the question.  sorry

Kevin Stone wrote:
Of course input type=image won't browse the file hierarchy.  The truth of
the matter is Brandon that it can not be done by conventional means.  This
is something I investigated a long time ago.  There's a whole conversation
about this on Deja.com.  The only good suggestion is to use some combination
of CSS to hide the original button and JAVA to display a new one.  Hope this
helps some.  :)

-Kevin

- Original Message -
From: David Minor [EMAIL PROTECTED]
To: Brandon Orther [EMAIL PROTECTED]
Cc: PHP User Group [EMAIL PROTECTED]
Sent: Wednesday, December 12, 2001 1:48 PM
Subject: Re: [PHP] FW: A little O T: input type=File -- Can I make a
better looking file box?


 I think you want to look at input type=image

 Brandon Orther wrote:
 Hello,
 
 I have been working on a php script and lately have been adding style
 sheets and image submit buttons to make it look better.
 
 I have now run into the problem that the input type file looks like a
 regular form input.  I would like to use an image as the browse button
 and a css for the text box.  If I apply a css to the file input it
 doesn't look right.
 
 Does anyone know another way to make a file input with more options on
 looks?  Can I make the browse button an image I make?
 
 Thanks for any help
 Brandon
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Logo proposal

2001-12-11 Thread David Minor

Well, there goes my idea of a piranha! How about a puffin?? :)

Dan McCullough wrote:
But for the use of visualization you might want to pick something friendly and fast, 
so they think
of PHP in that way, instead of strange and slow.
--- Andrew Chase [EMAIL PROTECTED] wrote:
 Maybe an animal beginning with P would be a good Mnemonic device (and good
 for alliteration; think The PHP Panda or The PHP Platypus.)  Hmm, I
 guess Panda and Platypus aren't particularly powerful animals, though. :/
 
 Other animals beginning with P:
 
 Pelican
 Panther (cheesy)
 Polliwog
 Protozoa
 
 Of course, the Penguin is already spoken for. :)
 
 Personally, I don't have a problem with the current PHP logo... From a
 marketing standpoint, I don't know; has MySQL become a more attractive
 prospect to the pointy haired bosses of the world since they streamlined
 their logo and added a Dolphin?  It would be interesting to know.
 
 If PHP was going to adopt a mascot, I kinda like the idea of the Platypus.
 If you want to force a metaphor, think of PHP as an interesting language
 that fits between traditional scripting languages and the HTTP server - sort
 of like the Platypus is an interesting critter that fits somewhere between
 mammal and.. whatever else. :)
 
 -Andy
 
 
  -Original Message-
  From: Tim Ward [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, December 11, 2001 2:02 AM
  To: PHP; Valentin V. Petruchek
  Subject: RE: [PHP] Logo proposal
 
 
  Chinchillas are fluffy, and I don't think anyone is using them for their
  logo.
 
 --
 From:  Valentin V. Petruchek [SMTP:[EMAIL PROTECTED]]
 Sent:  10 December 2001 16:58
 To:  PHP
 Subject:  [PHP] Logo proposal
 
 Hello world of php-programmers!
 
 It seemes to me PHP is very powerful tool and very popular among
 web-programmers, too. As for me I use php for solving web tasks for
  2 years
 and I'm very satisfied with it.
 
 It seemes to me current PHP logo (can be found by
 http://www.php.net/gifs/logo.gif) doesn't suite to PHP. It's common
  logo
 without any idea except using title in it.
 
 I propose to create and develop new PHP logo corresponding to its
  power.
 
 My propose is WoodPecker (e.g. like Woody).
 
 Other propositions?
 
 Respectfully, Zliy Pes http://www.zliypes.com.ua
 
 
 
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


=
dan mccullough

Theres no such thing as a problem unless the servers are on fire!


__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.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 list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: force download in IE -- conclusion

2001-08-22 Thread David Minor

I ran some tests of different header configurations of 6 browser/platform
combinations to find out what worked and what didn't.  I didn't cover all of
the platforms available, just those that my user-base uses, so this isn't
complete.  

combinations tested was IE5.5, NN4, NN6 for Windows 98 and IE5.5, NN4.7 for
Mac 9.1.  I tested all of these browsers using/not using 'attachment' in the
Content-Disposition header.  and also changed out the Content-Type header
with 'application/octet-stream', 'application/download', and '*/*'.

Here's the summary and what I did to make things work as well as possible.
My goal is to prompt the user with a save-as dialog for an mp3 file.

IE5.5 for Mac always uses the quicktime plugin to play the file no matter
what the disposition or type is.  (also no matter what the file extension
is.  Couldn't figure out how to trick it to download the file.)

IE5.5 for Win98 would attempt to download the file if (content-disposition:
attachment; filename=) attachment was there.

All 3 of the Win98 browsers would do prompt with as few clicks as possible
when content-type was application/octet-stream.  Therefore,  I test in my
script for the Mac users and give them Content-type: application/downlaod
while I give other users Content-Type: application/octet-stream.  Of
course, this doesn't help the IE5.5 Mac users who still have to use
Downlaod Link to Disk routine to get a save-as prompt.

Anyone who sees different ways this could be done, please respond.

Here's my code:

if (eregi(mac,$HTTP_USER_AGENT))
   $type = application/download;
else
   $type = application/octet-stream;

// stream file to user
header(Content-Type: $type);
header(Content-Disposition: attachment; filename=$filename);
header(Content-Length: .filesize($tmp_file));
header(Content-Transfer-Encoding: binary);
readfile($tmp_file);



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: force download in IE

2001-08-20 Thread David Minor

on 8/20/01 12:07 PM, [EMAIL PROTECTED] wrote:

This gave the same result:  it launches the helper app.

Please help!!

Regards.
dm

 Have you tried this?
 
 header(Content-Type: application/x-octet-stream);
 header(Content-Description: MP3 file);
 
 David Minor wrote:
 
 Can anybody tell me why this doesn't work in IE?  I need to force download
 mp3 files instead of IE5.5 trying to apply a helper app.  This code works
 fine for NN.
 
 // detect for MSIE bug
 if (strstr($HTTP_USER_AGENT, MSIE))
 $attachment = ;
 else
 $attachment =  attachment;;
 
 // stream file to user
 header(Content-Type: application/octet-stream);
 header(Content-Disposition:$attachment filename=$filename);
 header(Content-Length: .filesize($tmp_file));
 header(Content-Transfer-Encoding: binary);
 readfile($tmp_file);





[PHP] force download in IE

2001-08-18 Thread David Minor

Can anybody tell me why this doesn't work in IE?  I need to force download
mp3 files instead of IE5.5 trying to apply a helper app.  This code works
fine for NN.

// detect for MSIE bug
if (strstr($HTTP_USER_AGENT, MSIE))
$attachment = ;
else
$attachment =  attachment;;

// stream file to user
header(Content-Type: application/octet-stream);
header(Content-Disposition:$attachment filename=$filename);
header(Content-Length: .filesize($tmp_file));
header(Content-Transfer-Encoding: binary);
readfile($tmp_file); 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] readfile(ftp://....);

2001-08-09 Thread David Minor

will the readfile() function not accept a user/pass combination in an ftp
url? like:
readfile(ftp://user:[EMAIL PROTECTED]/path/to/file;);

I get two errors.  The first is a file not found error.
The second is a No Such file or directory error.

droppoing the user:pass section works just fine.   Here's the code:

$ftp_server_path = ftp://$ftpuser:$ftppass@$ftphost/$ftppath/;;
$i = $QUERY_STRING;
$url = $ftp_server_path.$leech_name[$i];
$filename = explode(/, $leech_name[$i]);

// start downloading file
Header(Content-Type: application/octet-stream);
Header(Content-Length: .filesize($url));
Header(Content-Disposition: attachement; filename=$filename[1]);
header(Pragma: no-cache);
header(Expires: 0);
readfile($url);

I've also tried going the fopen(), fread() route with the same result.

Any ideas what I'm doing wrong? or if it's even possible?
Thanks,
David Minor


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: creating archive [-- was re: php]

2001-08-03 Thread David Minor

There is a nice library that handles this called pcltar at
http://phpconcept.free.fr/index.en.php3


on 8/2/01 11:37 PM, Eduarko Kokubo wrote:

 I'm still trying to compress an entire directory on a linux server to be
 decompressed probably in windows client. I'm trying to use exec command and
 tar (compressor for linux), but I don't know how to do it. Can anybody
 pleeeaase help me?
 
 
 I know I should test these, but sending a message is easier. :)
 If a connect the server using ftp_connect and ftp_login, when I try to create
 a directory using mkdir or ftp_mkdir or a file using fopen, will they belong
 to me or to nobody???
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] substitute for assigning with array()?

2001-05-02 Thread David Minor

I had some code that was working nicely.  In it, I was assigning values to a
multidimensional array like:

$array_name[0] = array(
key1 = 'val',
key2 = 'val',
key3 = 'val');

I added a function that directly assigns vars to the same array like:

$array_name[0][key4] = 'val';

If this function is called prior to the multiple assignment code, it erases
the directly assigned key/value pair [key4] = 'val'.

So I have to change my original code to do direct assignment.  !!
definitely is more difficult to read and doesn't look as neat.  Is there an
alternative I haven't thought about?

Thanks


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] no reponse -- Need FTP help

2001-04-12 Thread David Minor

Well, I didn't get a response from my previous post, so I'm trying again.  I
need to collect a group of files in a form and ftp them to a different
server than the script is located on.  Can this be done? how?

Thank you,
David Minor


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] no reponse -- Need FTP help

2001-04-12 Thread David Minor

hmm, good idea, but the only access I have to the remote machine is ftp.
Can't put a script on it.  I am getting the feeling that I actually have to
move the file(s) from the user's machine to my server and then transfer them
to the FTP site?  I was hoping there would be a way to transfer directly
from the user to the remote FTP site.  But now that I think about it, I
guess probably not.  so the trick would be to let the form upload them to
/tmp and then move them to the remote site.  Takes twice as long. :(  I'm
talking about 10-15 MB at a time while the user waits for confirmation.
That's a long wait (even moving it once).  Any ideas?

dm

Plutarck wrote: 
 
 Or you could just put a PHP script on the target server that will take the
 input via GET and store the data for you. So you don't even have to use FTP.
 
 
 --
 Plutarck
 Should be working on something...
 ...but forgot what it was.
 
 
 "Lindsay Adams" [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 sure.
 
 keep track of the files on the server drive, then open a connection using
 fopen() and fputs the contents of each file.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] uploading with ftp

2001-04-11 Thread David Minor

I'm getting this:  "Warning:  error opening in /path/to/file.php on line 32"

Here's what I want to do, maybe I'm approaching it incorrectly?  I need to
collect multiple files via a form and upload them via FTP (can't use HTTP
because I'm uploading to a different server).  I collect them just fine, but
my process script connects, changes directories, makes a new directory  to
insert the files into and changes to that new directory, but it fails on the
ftp_put() call.  Here is the code.  I've also tried to simplify it to just
one file with no success.  I think I'm just missing something about the
ftp_put function.

PRE
for ($i=1; $i=$num_spots; $i++) {
$upload = ftp_put($conn_id, "$new_file[$i]", "$new_file[$i]",
FTP_BINARY);

if (!$upload) 
echo "FTP upload for '$new_title[$i]' has failed!BR";
else
echo "Uploaded '$new_title[$i]' to '$__ftphost__' as
'$new_file[$i]'.BR";
}
/PRE

Thanks for your help.
David Minor


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] login security

2001-04-09 Thread David Minor

read this tutorial:  http://www.zend.com/zend/tut/authentication.php

also, I have implemented this and am very happy with it:
http://phortify.sourceforge.net

Best of luck,
dm

on 4/9/01 8:19 PM, [EMAIL PROTECTED] at
[EMAIL PROTECTED] wrote:

 From: "kaab kaoutar" [EMAIL PROTECTED]
 Date: Mon, 09 Apr 2001 17:00:31 -
 To: [EMAIL PROTECTED]
 Subject: login  security
 
 Hi!
 i have developped a site using php, but i'd like to add a login acess
 for private pages, i mean only subscribed epople are allowed to access
 certain pages , how can i do that and how can i overpass the problem of
 showing the url , knowing that if someone saw the url he  may open it
 without loging
 Thanks


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problem with each()

2001-04-06 Thread David Minor

well, that didn't work either.  Same error.  Show me where my thinking is
wrong, if I've got an array ($HTTP_POST_VARS) in this case.  and
$HTTP_POST_VARS[var_list] is an array and the first entry in the array.  if
I did $x = each($HTTP_POST_VARS) in a while loop, the first combination that
is returned is $x[0] with value of 'var_list' and $x[1] with value of
'Array'.  In the first instance, I passed the name of the array
($HTTP_POST_VARS) to each(), so in this instance I would again pass the name
of the array to each() to pull the value pairs out of it.  This would mean
that $each_array2 = each($each_array[0]), not $each_array[1].  Am I way off?

 In article [EMAIL PROTECTED], [EMAIL PROTECTED] says...
 
 }print("key: $each_array[0] value: $each_array[1]");
 }
 }When I get to an array within HTTP_POST_VARS, it prints:
 }key: var_name value: Array
 }
 }ok, but when I try to do an each on that array: (and maybe this is where I
 }am wrong)
 }$each_array2 = each($each_array[0])
 }
 
 There's your problem.. Your trying to do each(..) on, what in your
 example above, is set to "var_name" ...
 
 Try changing that to:
 
 $each_array2 = each($each_array[1]);
 
 It's the second variable in your example that's an Array, (or it may
 just be a string set to the word "Array".. Who knows?.. =)
 
 -- 
 Jeff Carnahan - [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem with each()

2001-04-05 Thread David Minor

I recall reading this somewhere in the past, but can't find the answer after
looking for a couple of hours.  I am getting this warning:

Warning: Variable passed to each() is not an array or object in myfile.inc
on line 1

Here's what I'm doing:
While doing:
$each_array = each($HTTP_POST_VARS)
print("key: $each_array[0] value: $each_array[1]");

When I get to an array within HTTP_POST_VARS, it prints:
key: var_name value: Array

ok, but when I try to do an each on that array: (and maybe this is where I
am wrong)
$each_array2 = each($each_array[0])

I get the error that what I'm passing to the each is not an array.  Can
someone help me or point me to the right place?

Thanks,
David Minor


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] renaming form posted variable names

2001-04-02 Thread David Minor

Richard Lynch writes:

 function do_each($passed_array) {
 
 global ${$tmp_var_name};

Move this:

 
 if (substr($passed_array[0],-5) == "_post") {
 $tmp_var_name = substr($passed_array[0],0,-5);
 ${$tmp_var_name} = $passed_array[1];

down here.

 return(${$tmp_var_name});
 }
 }

Yes, I did that.  I must've been going in a different direction when I made
it two functions.  

Problem reamins:  Before exiting the function, I can print the true variable
name/value pair.  As soon as I exit the function, the same print statement
returns "".  Is it possible to make the variable variable global?  Here's
what I know have:

function conv_vars($input) {

global ${$tmp_var_name};

if (IsSet($input)) {
while ($each_array = each($input)) {
if (is_array($each_array[1])) {
conv_vars($each_array[1]);
}
else {
if (substr($each_array[0],-5) == "_post") {
$tmp_var_name = substr($each_array[0],0,-5);
${$tmp_var_name} = $each_array[1];
}
}
}
}
}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Remembering variables during Ping-Pong session

2001-03-31 Thread David Minor

Here's what I want to do:
multiple forms on separate pages that collect data from the user.  When all
appropriate data is entered, the user can send all data to the process
script.  I want the user to be able to jump from one page to another in no
particular order and back while entering data.  This is so if they change
their mind mid-stream, they can go edit previous pages without having to
reenter everything after that page.  If the user enters a page where they
have already entered data, the data is displayed.

Maybe I'm headed down the wrong path...
Here's how I thought about doing it (haven't gotten this working yet):

I set the form input attribute to 'name="variable_name_post"' (variable name
+ _post suffix).  At the beginning of each page, I include a function that
reads through $HTTP_POST_VARS and if it finds a posted variable with the
'_post' suffix, it stores the value of that var in $variable_name.  The main
list of vars (not the posted vars) is passed from page to page via sessions.

my problem is not storing the new variable, it's making it available to the
rest of the script (and the session).  What I end up with is a variable
variable ${$tmp_var_name} with a value equal to the posted var.  In this
case, if $tmp_var_name = 'cust_name', I can echo $cust_name and get the
proper value inside the function.  Outside the function the var is set to
''.

I either need to find a way to get that variable variable to be recognized
outside the function, or I need some help reorganizing my logic on another
way to do this.  The code for the function was posted to the list yesterday
under the subject "renaming form posted variable names".

Thanks to those who will help1
dm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] renaming form posted variable names

2001-03-30 Thread David Minor

I've got a logic problem that I just can't think through.  I'm hoping that
you can help me find a better way to do this. I need a function that will
iterate through $HTTP_POST_VARS looking for variable names with a predefined
suffix ($example_post).  Then I want to save the value of this var in a
variable named $example.  The code that I already have successfully does the
iteration and selection of vars.  What I can't do is make the new var
($example) accessible to the rest of the script.  How should I do this?

PRE
function do_each($passed_array) {

global ${$tmp_var_name};

if (substr($passed_array[0],-5) == "_post") {
$tmp_var_name = substr($passed_array[0],0,-5);
${$tmp_var_name} = $passed_array[1];
return(${$tmp_var_name});
}
}

function conv_vars($input) {

global ${$tmp_var_name};

if (IsSet($input)) {
while ($each_array = each($input)) {
   if (is_array($each_array[1]))// if nested array
conv_vars($each_array[1]);  // pass to self
else 
$new_var_value = do_each($each_array);
}
}
}

conv_vars($HTTP_POST_VARS);

/PRE

Thanks in advance for the help.  I learn so much from this list!
dm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] $HTTP_POST_VARS

2001-03-13 Thread David Minor

I am having a similar problem as the original poster.  In my case, I _want_
the second sumbission to overwrite the first, but it's not happening.  What
I have is a radio button list all named="update" each with it's own value
(ie. 2,3,4,5,etc.).  The form is self-submitting and tests on 'update' to
know how to proceed.  What I'm experiencing is that after the first
submission, printing out '$HTTP_POST_VARS' array gives the correct update
value.  Subsequent submissions also show this same value no matter what
value is selected in the form.

I've tried using 'unset($HTTP_POST_VARS[update]);' at the end of the script
after the var has been used and reprintingg the HTTP_POST_VARS array which
shows that it was unset, but on resubmission of the form, it reappears!

losing hair,
David Minor

on 3/8/01 5:45 PM, [EMAIL PROTECTED] at
[EMAIL PROTECTED] wrote:

 Explained here:
 http://www.php.net/manual/en/language.variables.external.php
 
 Basically name the variables with [].  For example:
 
 input type=text name="Name[]"
 
 In your example, the second is actually overwriting the first.
 
 
 Nate
 
 -Original Message-
 From: mat t [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 08, 2001 3:10 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] $HTTP_POST_VARS
 
 
 Please can you help:
 
 I can't send duplicate input types to $HTTP_POST_VARS
 For example:
 ---HTML---
 First person:
 
 NAME input type="text" name="Name" size="24" value=""
 input name="Name_type" type="hidden" value="textbox"
 
 Phone No.input type="text" name="Phone" size="24" value=""
 input name="Phone_type" type="hidden" value="textbox"
 
 Second Person:
 
 NAME input type="text" name="Name" size="24" value=""
 input name="Name_type" type="hidden" value="textbox"
 
 Phone No.input type="text" name="Phone" size="24" value=""
 input name="Phone_type" type="hidden" value="textbox"
 
 ---
 
 Then when I use :
 
 reset ($HTTP_POST_VARS);
 while (list ($key, $val) = each ($HTTP_POST_VARS))
 {
 echo "$key = $valbr\n";
 }
 
 Here is the output
 
 Output--
 
 Name = 
 Name_type = textbox
 Phone = 
 Phone_type = textbox
 
 
 
 What happened to the Second person?
 How can I stop it ignoring duplicates and insert in the array 1 by 1?
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] do..while(0) not staying true

2001-03-07 Thread David Minor

Maybe I'm just reading the documentation incorrectly, but when I set up a:

do {  // loop until the test condition is satisfied then break
[code]
if ($i  1)
break;
[code]
} while(0);

it just goes through once.  I got around it by creating a true statement to
test at the end "while ($i = $i);" and everything worked fine.  What am I
doing wrong?

Thanks,
David Minor


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]