Page 1 of 1

Underlining $_POST results

Posted: Sat Apr 07, 2007 5:50 pm
by rxroids
I'm curious if I can have my final result underlined or italicized.

Code: Select all

<?php echo $_POST['title']; ?>
Can someone give me the code to accomplish this?

Posted: Sat Apr 07, 2007 6:10 pm
by Oren
I don't know what is the context where you use this code, but I guess this is what you want (italic):

Code: Select all

<?php echo '<i>' . $_POST['title'] . '</i>'; ?>

Posted: Sat Apr 07, 2007 7:02 pm
by thiscatis
I would use a css class:

Code: Select all

<?php echo '<span class=\"post_result\">' . $_POST['title'] . '</div>'; ?>
With

Code: Select all

.post_result {

font-....

                    }
In your stylesheet

Makes it easier to maintain your website style

Posted: Sat Apr 07, 2007 7:41 pm
by rxroids
Thanx guys. I went ahead and used the first one only because if you highlight copy n paste the style stays but with CSS aparently not. A lot of help though, thanx.

Posted: Sat Apr 07, 2007 7:48 pm
by thiscatis
I hope you didn't actually use

Code: Select all

.post_result {

font-....

                    }
as the style :D

have a look at http://www.w3.org/Style/Examples/011/firstcss if you're not familiar with css