MCousin76 Posted April 28, 2008 Posted April 28, 2008 I am trying to insert php code inside a textbox to generate a value. The bolded item below is what i'm trying to generate. When i load the code on the page the textbox appears with $product_info[minorder] in the textbox. does anyone have any suggestions on how i can get the generated number to appear? PS.>>>> The code works when it is like this. But, i need to have it in the main code inside the $price_string. echo "<input type= \"text\" size=\"5\" value=" . $product_info['minorder'] ." name=\"quantity\">"; ================== The code looks like this... ================== $qty_string .= '</td></tr>'; $price_string .= '</td></tr><tr><td colspan="6"><br><span class="smallText">Enter Quantity:</span> <input type="text" size="5" value="$product_info[minorder]" name="quantity"></td></tr>';
burt Posted April 28, 2008 Posted April 28, 2008 $price_string .= '</td></tr><tr><td colspan="6"><br><span class="smallText">Enter Quantity:</span> <input type="text" size="5" value="' . $product_info[minorder] . '" name="quantity"></td></tr>'; I'm surprised that you would not have tried that when you already know it works for the "echo".
MCousin76 Posted April 28, 2008 Author Posted April 28, 2008 $price_string .= '</td></tr><tr><td colspan="6"><br><span class="smallText">Enter Quantity:</span> <input type="text" size="5" value="' . $product_info[minorder] . '" name="quantity"></td></tr>'; I'm surprised that you would not have tried that when you already know it works for the "echo". Thank you - that worked perfect. I'm somewhat new to php, I'm learning as i go. Thanks again for all of your help!!!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.