RE: [PHP] Dynamic Form 'on The Fly'
| From: | Carlos Garcia | Date: | Wed, 18 Mar 2009 19:46:54 +0000 |
| Subject: | RE: [PHP] Dynamic Form 'on The Fly' | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-290253@lists.php.net to get a copy of this message | ||
with this is a simple text :
$this = 'thisline' . $cnt;
echo $_POST[$this];
Carlos A. Garcia Hernandez
> Date: Wed, 18 Mar 2009 12:12:54 -0700
> From: Cool@hosting4days.com
> To: php-general@lists.php.net
> Subject: [PHP] Dynamic Form 'on The Fly'
>
> Using a repeating region of a query, I want to generate a 'form on the fly'
>
> So for each repeat - I have an extra form input....
>
> Each input name = thisline<?php echo $cnt; ?>
>
> So it will make names like:
>
> thisline1
> thisline2
> thisline3
> Etc.
>
> For the form fields
>
> -------------------------
>
>
> $cnt = 1;
> <form action="form1.php" method="post" name="test1">
>
> Repeat.....
>
> <input name="go<?php echo $cnt; ?>" type="text" value=""
> size="5"
> maxlength="5" />
>
> <?php $cnt++; ?>
>
> Repeat..................
>
> ------------------------------------
>
> Q: how do I code the POST line to READ this when processing this form?
>
> like:
>
> $cnt = 1;
>
> <?php echo $_POST['thisline$cnt']; ?> ???? Doesn't work...?
> <?php echo $_POST['thisline'].$cnt; ?>???? Doesn't work...?
>
> Not this either...
> $this = 'thisline'.$cnt;
> echo $_POST['$this'];
>
>
> $cnt++
>
> Q: ANY Ideas?
>
>
> --
> Thanks - RevDave
> Cool @ hosting4days . com
> [db-lists 09]
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
_________________________________________________________________
¿Quieres transformarte en un emoticón de Messenger? Descubre cómo
www.messengernews.com.mx