View Full Version : PHP vs JavaScript for HTML inputs

03-22-2009, 09:36 PM
So.. I'm just wondering if.. for example if I'm not sure of the name of a site, and I create a new document which I'll redirect to every time I say the name (don't comment on this part, it's just an example :D)

BUT the point is:

Should I use JavaScript:

Welcome to <script type="text/javascript" src="../scripts/sitename.js"></script>. Hope you have a nice time here!

and then have a JS code of:


or use PHP to input it (if so, where is a tutorial on just that part?)

and will one/both work in, for example, <title></title>?

Old Pedant
03-22-2009, 10:20 PM
Can't see where it makes any difference in the final result.

Now, if you are ONLY going to need to use PHP for this one purpose, then clearly the JS answer will save on server resources. But in terms of results...<shrug>either</shrug>.