rockerover28 Posted June 3, 2008 Share Posted June 3, 2008 Hi, I am new to this code, the coder I hired to do this job quit on me before fixing all of the bugs, so please be patient with me. I have a real estate property form on my site that displays fields from my mysql table in a form, so that I can enter property details and submit them to the database. The normal fields that are varchar are being displayed properly in a normal text box form field, but the mysql fields that are supposed to be <textarea> form fields are also displaying as normal text form fields. I need the <textarea> fields so that I can enter longer descriptions etc...and be able to see what I am typing. From the code below is there any glaring mistakes that would fix this. I have also attached the full bit of code that is supposed to generate the form. Any help would be greatly appreciated. foreach ($vars as $field) { if ($varsSize[$field]=="text") { $strDisplay .= "<tr> <td valign=\"top\">".eregi_replace("_", " ", $field).":</td> <td><textarea cols=\"35\" rows=\"3\" name=\"".$field."\" id=\"".$field."\">".$Property[$field]."</textarea></td> </tr>"; } else { $strDisplay .= "<tr> <td valign=\"top\">".eregi_replace("_", " ", $field).":</td> <td><input type=\"text\" name=\"".$field."\" id=\"".$field."\" value=\"".$Property[$field]."\" size=\"45\" maxlength=\"500\" /></td> </tr>"; } } [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/108483-textarea-wont-work-with-mysql-field-data/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.