Make sure first that your $siteLink_val isn't returning white space as a value. The <textarea> element by default has an empty value so if the variable you're echo'ing for some reason has spaces, there's your problem right off the bat.
To make the code the absolute cleanest, I would suggest you could do something like this, allowing for some more flexibility later. I've made a function that returns either a NULL if the variable isn't present (what you seem to be aiming for in the original post) and the absolute value otherwise. Once you've made sure of your variable's contents, try this:
function build_siteLink_val() {
if ( $siteLink_val ) {
return $siteLink_val;
}
else {
return "";
}
}
$output_siteLink_val = build_siteLink_val();
And the following code in your textarea would now read:
<textarea style="width:350px; height:80px;" cols="42" rows="5" name="sitelink"><?=$output_siteLink_val?></textarea>
This is assuming your PHP install is configured for short-hand variable calls, as seen in the shortened "<?=?>" tags. If you cannot output this way, remember to preface your PHP code with "<?php" and close with "?>".
Avoid line breaks between <textarea>'s because it can create the potential of erroneous characters.
Also, check your CSS to make sure there isn't a padding rule pushing text inward.
Also, you specify a cols and rows value on the textarea, and then style a width and height. These rules are counter-productive, and will result in inconsistent visuals. Stick with either defining the size through style (I recommend giving the element a class) or the rows/cols.
<?php
and?>
with no whitespace to the next DOM element defined (<textarea><?
php ...?><
/textarea>) – Selfdeception