Re: undefined variable
| From: | Smart Software | Date: | Sun, 30 Apr 2006 11:17:59 +0000 |
| Subject: | Re: undefined variable | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-235138@lists.php.net to get a copy of this message | ||
thanx all for the reply.
Yes, i am new to PHP
I am a c++ programmer and now i am trying to learn php.
i guess i did not explain the problem correct.
the code is generating an textbox for each record.
while(query )//here the query is opened
{
<table ">
<tr>
<td ><?php query->name ?> </td> // record from database
<td > Please fill in your age:</td> //text
<td "><input name="age" type="text" </td> //textbox,
<td ><a href="<? echo
"otherform.php?age=PLACE_HERE_THE_VALUE_FROM_QUANTITY_TEXTBOX&name=query->name";
?> "</td>
</tr>
</table>
}
how can i get the value from the textbox? i don't have form tag
if i have 50 records, there are 50 textboxes named "age" right?
""Smart Software"" <info@smart-software.org> schreef in bericht
news:11.4A.18514.B0343544@pb1.pair.com...
> code below shows all records from products table with an textbox and an
> order button for each record
>
> <? $query1 = mysql_query("SELECT * FROM products ");
> while ($rowType = mysql_fetch_array($query1))
> { ?>
> <table width="500" border="0">
> <tr class="largeheader">
> <td width="40%"><? echo "$rowType[0]"; ?></a>
> </td>
> <td width="10%"><?php echo "$rowType[1]"; ?></td>
> <td width="10%"><input name="quantity" type="text"
> value="1" size="1"
> maxlength="3"></td>
> <td width="40%"> <a href="<? echo
> "products.php?cat=$cat&toevoegen=1&id=$rowType[7]"; ?>"><img
> src="images/bestel1.gif" border="0"></a></td>
> </tr>
>
> <?php
> }
> ?>
> </table>
>
>
>
> if someone presses the button, an item will be ordered.
>
> How can i add the content of the textbox?
> i tried this:
> <td width="40%"> <a href="<? echo
> "products.php?cat=$cat&quantity=$quantity&toevoegen=1&id=$rowType[7]";
> ?>"><img src="images/bestel1.gif"
> border="0"></a></td>
>
> but all i get is an error telling me there is a undefined varable
>
>
>
> thanx for all help
> N. Karademir