RE: [Phpmyadmin-devel] pretty code, buggy code?

Correct code will not be so pretty:
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfgTextareaRows; ?>" cols="<?php echo $cfgTextareaCols; ?>"><?php if (!empty($special_chars)) echo $special_chars . "\n"; ?> </textarea>
I think your code still inserts a line feed at the end of the textarea. Correct code would be even less pretty: <textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfgTextareaRows; ?>" cols="<?php echo $cfgTextareaCols; ?>"><?php if (!empty($special_chars)) echo $special_chars . "\n"; ?></textarea>

Benjamin Gandon a écrit :
Correct code will not be so pretty:
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfgTextareaRows; ?>" cols="<?php echo $cfgTextareaCols; ?>"><?php if (!empty($special_chars)) echo $special_chars . "\n"; ?> </textarea>
I think your code still inserts a line feed at the end of the textarea. Correct code would be even less pretty:
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfgTextareaRows; ?>" cols="<?php echo $cfgTextareaCols; ?>"><?php if (!empty($special_chars)) echo $special_chars . "\n"; ?></textarea>
Thanks Benjamin, I am correcting this right now! Marc

On Tue, 31 Jul 2001, Benjamin Gandon wrote:
[snip] cols="<?php echo $cfgTextareaCols; ?>"><?php if (!empty($special_chars)) echo $special_chars . "\n"; ?> </textarea>
I think your code still inserts a line feed at the end of the textarea. Correct code would be even less pretty:
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfgTextareaRows; ?>" cols="<?php echo $cfgTextareaCols; ?>"><?php if (!empty($special_chars)) echo $special_chars . "\n"; ?></textarea>
No, because a single newline after the closing tag is silently ignored. I propose the following: <textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfgTextareaRows; ?>" cols="<?php echo $cfgTextareaCols; ?>"
<?php if (!empty($special_chars)) echo $special_chars . "\n"; ?> </textarea>
-- Ignacio Vazquez-Abrams <ignacio@openservices.net>
participants (3)
-
Benjamin Gandon
-
Ignacio Vazquez-Abrams
-
Marc Delisle