PHP questions

by 7 replies
9
This is probably a dumb line of questions, but I'm a newbie when it comes to website design. I'd like to "cloak" my affiliate links on both my sales site and inside my PDF ebook with "out.php"-type scripts that cloak the affiliate link and the tracking subid. Now, do I have to have a website itself that is formatted all in PHP (the home page being index.php, for example), or can I sort of mix and match standard .html pages, WordPress pages, and .php links inside some pages like I mentioned above? I definitely want at least one PHP-formatted page on my site as well: a "contact" page for people to fill in fields to send me a message that will get directed to my email, so I don't have to put my email address anywhere on the site.

Basically, what I guess I'm asking is do you have to have a PHP *site* to use .php *files*? And can you have a site with both HTML and PHP pages?
#website design #php #questions
  • There is no such animal as "php site".

    PHP is a language that is either running on your host server or not. Nowadays, if the answer is "not - get a decent host.
    Official definition: "Server-side HTML embedded scripting language.")

    You can have and mix html, htm, php, shtml... and many other type of pages.
    • [ 1 ] Thanks
  • My host does support PHP. So it sounds like I can just throw my PHP cloaking scripts inside any kinds of pages I want. Good deal. Thanks.
    • [1] reply
    • Did I say that?
      Not really... I said you can have and mix (like inside one directory) different type of files:
      something.html
      something.htm
      something.php
      something.shtml

      (try not to have that many index files in a directory, though...)

      OK, theoretically, you can make a php script/code to run INSIDE a hmtl page... but that's more advanced webmaster knowledge - for now you should just run with what you learned above: you can have a PHP redirect to cloak/hide your aff links.
      • [1] reply
  • As you, probably, know you can link in an anchor tag to anything that lives on the net.

    In a file called bs.html you can certainly have a link (anchor tag) pointing to out.php.

    But that's NOT what you said above:
    Read it again and again until you get what you said
    - the answer again is: you can NOT throw the PHP script itself inside a html page. However, you can link from any webpage (regardless of its extension) to a php page. That's a big difference!
  • I got it now. Thanks!
    • [1] reply
    • I have just created one web site of contact management system for my college project. But it has little error such as when I connect a table with database, an error occurs like fatal error. I think it is a mistake in database connectivity. Any other way to use it?

Next Topics on Trending Feed

  • 9

    This is probably a dumb line of questions, but I'm a newbie when it comes to website design. I'd like to "cloak" my affiliate links on both my sales site and inside my PDF ebook with "out.php"-type scripts that cloak the affiliate link and the tracking subid. Now, do I have to have a website itself that is formatted all in PHP (the home page being index.php, for example), or can I sort of mix and match standard .html pages, WordPress pages, and .php links inside some pages like I mentioned above? I definitely want at least one PHP-formatted page on my site as well: a "contact" page for people to fill in fields to send me a message that will get directed to my email, so I don't have to put my email address anywhere on the site. Basically, what I guess I'm asking is do you have to have a PHP *site* to use .php *files*? And can you have a site with both HTML and PHP pages?