Re: [PHP] Re: Anyone Up?
I think you'll need something like this: VALUE=\'Your Name1\' / /single quote marks I believe (and I certainly could be wrong). otherwise it'll truncate at 'Your' of course, if this is what you want... Hugh - Original Message - From: Luke Welling [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 31, 2002 11:50 PM Subject: [PHP] Re: Anyone Up? Jtjohnston [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Luke is that 6:47 pm tomorrow? :) You lost an entire day! Enough Oz Jokes. Here is my predicament in Canada :-) $varname = Check.$i; $varname = Check1 but I want $varname = Your Name1 to Your Name12. One more try? :) INPUT TYPE=checkbox NAME=Check1 VALUE=Your Name1 INPUT TYPE=checkbox NAME=Check2 VALUE=Your Name2 INPUT TYPE=checkbox NAME=Check3 VALUE=Your Name3 etc. for ($i = 1; $i = $NMax; $i++) { #$varname = $Check.$i; $varname = Check.$i #echo $varname; if ($varname) echo $varname = $ibr; } In that case it is easy, I did not know that the ids were just 1 to 12, I thought they could be anything spat out by the database. How about something like this: for ($i = 1; $i = $NMax; $i++) { $varname = Check.$i if (isset($$varname) echo $$varname.br; } Luke Welling. -- PHP and MySQL Web Development by Luke Welling and Laura Thomson http://www.amazon.com/exec/obidos/ASIN/0672317842 -- 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] Re: Anyone Up?
You're wrong here, my friend. You can have any value you like. value=@£$ASDFSDF ASDP fosifu @}{$#%/@would work. Niklas -Original Message- From: hugh danaher [mailto:[EMAIL PROTECTED]] Sent: 1. helmikuuta 2002 10:48 To: Luke Welling Cc: Php-General Subject: Re: [PHP] Re: Anyone Up? I think you'll need something like this: VALUE=\'Your Name1\' / /single quote marks I believe (and I certainly could be wrong). otherwise it'll truncate at 'Your' of course, if this is what you want... Hugh - Original Message - From: Luke Welling [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 31, 2002 11:50 PM Subject: [PHP] Re: Anyone Up? Jtjohnston [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Luke is that 6:47 pm tomorrow? :) You lost an entire day! Enough Oz Jokes. Here is my predicament in Canada :-) $varname = Check.$i; $varname = Check1 but I want $varname = Your Name1 to Your Name12. One more try? :) INPUT TYPE=checkbox NAME=Check1 VALUE=Your Name1 INPUT TYPE=checkbox NAME=Check2 VALUE=Your Name2 INPUT TYPE=checkbox NAME=Check3 VALUE=Your Name3 etc. for ($i = 1; $i = $NMax; $i++) { #$varname = $Check.$i; $varname = Check.$i #echo $varname; if ($varname) echo $varname = $ibr; } In that case it is easy, I did not know that the ids were just 1 to 12, I thought they could be anything spat out by the database. How about something like this: for ($i = 1; $i = $NMax; $i++) { $varname = Check.$i if (isset($$varname) echo $$varname.br; } Luke Welling. -- PHP and MySQL Web Development by Luke Welling and Laura Thomson http://www.amazon.com/exec/obidos/ASIN/0672317842 -- 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] Re: Anyone Up?
* hugh danaher ([EMAIL PROTECTED]) [Feb 01. 2002 03:48]: I think you'll need something like this: VALUE=\'Your Name1\' / /single quote marks I believe (and I certainly could be wrong). otherwise it'll truncate at 'Your' of course, if this is what you want... (Not trying to pick on you, Hugh. g) It'd be better just to write proper HTML/XHTML and use double quotes. ?php /* php scripting */ ? !-- HTML -- ?php /* back to php scripting */ ? or just: print 'input type=checkbox value=Your Name1'; But it would work with single quotes around attributes. I don't know if it'd validate though. -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 5 out of 4 people have trouble with fractions. -- 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] Re: Anyone Up?
Not familiar with anything but php and html. I know that in a type=text (obviously not a checkbox) if you don't use the escape backslashes, the value written into the box is 'Your' without the 'Name #' I am told this is because the browser views the space after 'r' in 'Your' as a break and is looking at Name # as the next instruction, which it isn't. My two cents for the evening. Hugh - Original Message - From: Brian Clark [EMAIL PROTECTED] To: PHP is not a drug. [EMAIL PROTECTED] Sent: Friday, February 01, 2002 12:54 AM Subject: Re: [PHP] Re: Anyone Up? * hugh danaher ([EMAIL PROTECTED]) [Feb 01. 2002 03:48]: I think you'll need something like this: VALUE=\'Your Name1\' / /single quote marks I believe (and I certainly could be wrong). otherwise it'll truncate at 'Your' of course, if this is what you want... (Not trying to pick on you, Hugh. g) It'd be better just to write proper HTML/XHTML and use double quotes. ?php /* php scripting */ ? !-- HTML -- ?php /* back to php scripting */ ? or just: print 'input type=checkbox value=Your Name1'; But it would work with single quotes around attributes. I don't know if it'd validate though. -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 5 out of 4 people have trouble with fractions. -- 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] Re: Anyone Up?
* hugh danaher ([EMAIL PROTECTED]) [Feb 01. 2002 04:21]: Not familiar with anything but php and html. XHTML isn't too different. There are different `rules' -- like tags and attributes must be lower case, values must be surrounded by double quotes, tags without closing tags: br /, img src=i.gif alt= /, Etc.. I know that in a type=text (obviously not a checkbox) if you don't use the escape backslashes, the value written into the box is 'Your' without the 'Name #' I am told this is because the browser views the space after 'r' in 'Your' as a break and is looking at Name # as the next instruction, which it isn't. My two cents for the evening. Yes, that's why you surround the value in quotes. :-) Escaping has noting to do with it really, unless you're print()ing like: print Brian is a little off his \rocker\; Likewise: print 'Brian is somewhat \'out of it\' most of the time'; The problem you spoke of happens when you do this: input type=text name=brian value=is insane IIRC, $brian would turn out to contain 'is' without the insanity. -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 I intend to live forever - so far, so good. -- 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] Re: Anyone Up?
Well, Netscape breaks value=This is to This, but IE understands that as This%20is. so if you set the value to be This%20is, both Netscape and IE understands that as This is. There are many other chars that can f**k up the value, so use htmlspecialchars() to correct that. Niklas -Original Message- From: hugh danaher [mailto:[EMAIL PROTECTED]] Sent: 1. helmikuuta 2002 11:21 To: Php-General Subject: Re: [PHP] Re: Anyone Up? Not familiar with anything but php and html. I know that in a type=text (obviously not a checkbox) if you don't use the escape backslashes, the value written into the box is 'Your' without the 'Name #' I am told this is because the browser views the space after 'r' in 'Your' as a break and is looking at Name # as the next instruction, which it isn't. My two cents for the evening. Hugh - Original Message - From: Brian Clark [EMAIL PROTECTED] To: PHP is not a drug. [EMAIL PROTECTED] Sent: Friday, February 01, 2002 12:54 AM Subject: Re: [PHP] Re: Anyone Up? * hugh danaher ([EMAIL PROTECTED]) [Feb 01. 2002 03:48]: I think you'll need something like this: VALUE=\'Your Name1\' / /single quote marks I believe (and I certainly could be wrong). otherwise it'll truncate at 'Your' of course, if this is what you want... (Not trying to pick on you, Hugh. g) It'd be better just to write proper HTML/XHTML and use double quotes. ?php /* php scripting */ ? !-- HTML -- ?php /* back to php scripting */ ? or just: print 'input type=checkbox value=Your Name1'; But it would work with single quotes around attributes. I don't know if it'd validate though. -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 5 out of 4 people have trouble with fractions. -- 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] Re: Anyone Up?
On Fri, 2002-02-01 at 01:20, hugh danaher wrote: Not familiar with anything but php and html. I know that in a type=text (obviously not a checkbox) if you don't use the escape backslashes, the value written into the box is 'Your' without the 'Name #' I am told this is because the browser views the space after 'r' in 'Your' as a break and is looking at Name # as the next instruction, which it isn't. My two cents for the evening. Hugh A few notes: o Single or double quotes will work fine; either are valid (so long as they match). o input type=text value=this is a joke will give a value of 'this' and is bad style--*always* quote your attributes :), o input type=text value=this is a joke will give a value of this is a joke. You needed to escape the backslashes so that the double quotes inside a double-quoted string wouldn't tell PHP to end that string. Torben - Original Message - From: Brian Clark [EMAIL PROTECTED] To: PHP is not a drug. [EMAIL PROTECTED] Sent: Friday, February 01, 2002 12:54 AM Subject: Re: [PHP] Re: Anyone Up? * hugh danaher ([EMAIL PROTECTED]) [Feb 01. 2002 03:48]: I think you'll need something like this: VALUE=\'Your Name1\' / /single quote marks I believe (and I certainly could be wrong). otherwise it'll truncate at 'Your' of course, if this is what you want... (Not trying to pick on you, Hugh. g) It'd be better just to write proper HTML/XHTML and use double quotes. ?php /* php scripting */ ? !-- HTML -- ?php /* back to php scripting */ ? or just: print 'input type=checkbox value=Your Name1'; But it would work with single quotes around attributes. I don't know if it'd validate though. -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 5 out of 4 people have trouble with fractions. -- 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] -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- 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] Re: Anyone Up?
On Fri, 2002-02-01 at 01:33, Brian Clark wrote: * hugh danaher ([EMAIL PROTECTED]) [Feb 01. 2002 04:21]: Not familiar with anything but php and html. XHTML isn't too different. There are different `rules' -- like tags and attributes must be lower case, values must be surrounded by double quotes, tags without closing tags: br /, img src=i.gif alt= /, Etc.. Everything is correct 'cept the 'double quotes' bit--XML accepts attribute values enclosed in either single or double quotes. Torben I know that in a type=text (obviously not a checkbox) if you don't use the escape backslashes, the value written into the box is 'Your' without the 'Name #' I am told this is because the browser views the space after 'r' in 'Your' as a break and is looking at Name # as the next instruction, which it isn't. My two cents for the evening. Yes, that's why you surround the value in quotes. :-) Escaping has noting to do with it really, unless you're print()ing like: print Brian is a little off his \rocker\; Likewise: print 'Brian is somewhat \'out of it\' most of the time'; The problem you spoke of happens when you do this: input type=text name=brian value=is insane IIRC, $brian would turn out to contain 'is' without the insanity. -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 I intend to live forever - so far, so good. -- 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] -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- 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] Re: Anyone Up?
* Lars Torben Wilson ([EMAIL PROTECTED]) [Feb 01. 2002 05:07]: On Fri, 2002-02-01 at 01:33, Brian Clark wrote: XHTML isn't too different. There are different `rules' -- like tags and attributes must be lower case, values must be surrounded by double quotes, tags without closing tags: br /, img src=i.gif alt= /, Etc.. Everything is correct 'cept the 'double quotes' bit--XML accepts attribute values enclosed in either single or double quotes. Well I be! I just validated a test page using XHTML 1.0 transitional and you're right. I guess I learn something new every day. 0_o Happy Trails, -- Brian Clark | Unable to leap tall buildings in a single bound. Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 Sinners can repent, but stupid is forever. -- 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] Re: Anyone Up?
On Friday, February 1, 2002, at 05:07 AM, Lars Torben Wilson wrote: Everything is correct 'cept the 'double quotes' bit--XML accepts attribute values enclosed in either single or double quotes. Yes, and to extend on that: you need to stick to one convention or the other throughout the entire document. You can't have one entity with double quotes and another one using singles. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [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] Re: Anyone Up?
On Fri, 2002-02-01 at 10:48, Erik Price wrote: On Friday, February 1, 2002, at 05:07 AM, Lars Torben Wilson wrote: Everything is correct 'cept the 'double quotes' bit--XML accepts attribute values enclosed in either single or double quotes. Yes, and to extend on that: you need to stick to one convention or the other throughout the entire document. You can't have one entity with double quotes and another one using singles. No, that's incorrect. As long as they match for a given attribute value, you're OK. At least, that's what the spec and nsgmls say. :) BTW--entities are something else entirely. Torben Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- 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] Re: Anyone Up?
On Friday, February 1, 2002, at 03:05 PM, Lars Torben Wilson wrote: Everything is correct 'cept the 'double quotes' bit--XML accepts attribute values enclosed in either single or double quotes. Yes, and to extend on that: you need to stick to one convention or the other throughout the entire document. You can't have one entity with double quotes and another one using singles. No, that's incorrect. As long as they match for a given attribute value, you're OK. At least, that's what the spec and nsgmls say. :) Hm... I don't know why I thought otherwise. I checked with the spec (http://www.w3.org/TR/xhtml1/#h-4.4), and it really doesn't say yes or no to this. But I'm sure you're right, since some attributes contain quoted content, which is why you would switch from one to the other. BTW--entities are something else entirely. In trying to avoid calling XML entities tags, I forgot that we were talking about XHTML, where tags do indeed exist. Thanks for the correction. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [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] Re: Anyone Up?
On Fri, 2002-02-01 at 13:54, Erik Price wrote: Hm... I don't know why I thought otherwise. I checked with the spec (http://www.w3.org/TR/xhtml1/#h-4.4), and it really doesn't say yes or no to this. But I'm sure you're right, since some attributes contain quoted content, which is why you would switch from one to the other. This is handled in the XML spec; XHTML is just an XML application and is therefore subject to the XML spec: http://www.w3.org/TR/REC-xml Cheers, Torben BTW--entities are something else entirely. In trying to avoid calling XML entities tags, I forgot that we were talking about XHTML, where tags do indeed exist. Thanks for the correction. Erik -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- 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]