I am trying to pull the value(which works) and disable the field from input(which will NOT work) and post it. Thanks in advance.
Here is my code below:
<textarea name="title" id="title"><?php
$query = "SELECT * FROM table WHERE id = '$member'";
$result = mysql_query($query);
$member = mysql_real_escape_string($member);
while($row = mysql_fetch_array($result)) {
$title = $row['title'];
echo $title;
}?> <?=($disable ? " disabled=\"disabled\"" : "");?>
<?php if($title == true) {
$disable = true;
}
else {
$disable = false;
}
?></textarea>
I’m not sure if you’re trying to disable it based on query results (which it looks like what you’re trying to do). You’re closing the
textareaopening tag before setting the disabled attribute. Thedisabledattribute has to be an attribute of thetextareatag:<textarea disabled="disabled"></textarea>