Re: Arrays & Regexp - Help Requested
| From: | Mari Masuda | Date: | Fri, 01 Jan 2010 23:47:00 +0000 |
| Subject: | Re: Arrays & Regexp - Help Requested | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-300777@lists.php.net to get a copy of this message | ||
I think the problem is here:
echo '<input type="' . $input_type . '" ';
[...snip...]
elseif ($input_type == 'textarea')
{
echo 'rows="7" cols="30" ';
echo 'value="';
if ($field['null'] == 'YES') // CAN BE NULL?
{
echo 'NULL';
}
echo '" ';
}
because to create a textarea, the HTML is <textarea rows="7"
cols="30">default text</textarea>. It looks like your code is trying to make a
textarea that starts with <input type='.... which won't work. See http://www.w3.org/TR/html401/interact/forms.html#h-17.7
for how to use textarea.
On Jan 1, 2010, at 3:38 PM, Allen McCabe wrote:
> echo '<input type="' . $input_type . '" ';
> if ($input_type == 'text')
> {
> echo 'size="';
> $length = printByType($field['type'], 'INPUT_LENGTH');
> echo $length;
> echo '" ';
> echo 'value="';
> if ($field['null'] == 'YES') // CAN BE NULL?
> {
> echo 'NULL';
> }
> echo '" ';
> }
> elseif ($input_type == 'textarea')
> {
> echo 'rows="7" cols="30" ';
> echo 'value="';
> if ($field['null'] == 'YES') // CAN BE NULL?
> {
> echo 'NULL';
> }
> echo '" ';
> }