Jump to content

Recommended Posts

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]

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.