Re: undefined variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx> schreef in bericht
news:11.4A.18514.B0343544@xxxxxxxxxxxxxxx
> 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux