Re: Change font in PHP



Yeah that's fairly easy: 2 parts.

1) PHP is executable code, it does not contain fromatting instructions
for webpages so it cannot apply or change a font in the browser.
Further, unlike JavaScript PHP runs on the server itself 'before' the
html is sent across the internet to your browser.

Stating that however it can be used to output html and css to the
browser.
( JavaScript can modify html 'after' it arrives at your browser because
it runs on the client machine rather than the server. )

2) You want to change text in a form element.
If the form element is <textarea> add this <textarea
style='font-family:arial;'>
If it is an input such as <input type='tex't name='whatever'
value='whatever'> do the same <input type='tex't name='whatever'
value='whatever' style='font-family:arial;'>

If you want php to out put that use

<?
print ("<input type='tex't name='whatever' value='whatever'
style='font-family:arial;'>");
?>


durstbj@xxxxxxxxx wrote:
Hi,
I have what is probably an easy question for anyone that knows PHP...

I'd like to change the font in a form that is using PHP. In HTML you
just type font face=arial and that does the trick, but it doesn't work
in PHP. So what should go there instead? :) Thanks in advance!

Branden

.



Relevant Pages

  • Re: how to run scripts after a page has already loaded and been sent to a users browser?
    ... > It's because PHP is a server side scripting language, ... > do stuff before you send stuff to user's web browser. ... As we've discussed on this newsgroup before, if a script starts ... that is after the last HTML is sent to a web browser. ...
    (alt.php)
  • Re: How do we get there from here?
    ... Unlike my dislike for PHP, my dislike for SQL is based on ... >>> up with at least html and php quite mixed into each other, ... Using a PHP script to send HTML ... code to a browser in no way taints that code. ...
    (comp.databases.pick)
  • Re: Form spam? What to do?
    ... >>> You will notice a php include at the top of the code. ... one example of a browser with such an Accept ... On contrast IE6 accepts the html 4.01 strict code as you can ... it has built in changes to process the true xhtml ...
    (alt.html)
  • Re: Browser Compatibility issues
    ... PHP is not the cause. ... PHP just outputs HTML ... browser and which features are implemented and which not differs per ...
    (comp.lang.php)
  • Re: doesnt work, how come?
    ... > You need a book on HTML and how it works. ... > output from php source. ... it wouldn't be displayed in a browser but it would sort of break up ... Web browsers interpret ASCII text by the rules of HTML. ...
    (alt.php)