I have a form that is acting like an email page where there Subject is being submitted from one page to another and tagging the subject with "RE: ". I want to be able tack the RE: on but only if it doesn't already have it there. I know that I can use and if statement, but how to I check the left 4 characters:
<?php if ($HTTP_POST_VARS['subject'] == "RE: ") { echo "<input name='subject' type='text' id='subject2' value='<?php echo $HTTP_POST_VARS['subject']; ?>'" } else { echo "<input name='subject' type='text' id='subject2' value='RE: <?php echo $HTTP_POST_VARS['subject']; ?>'" } ?> Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php