Results 1 to 5 of 5

Thread: adding php-code to main.html?/access to user's input within the main.html

  1. #1
    Join Date
    Oct 2006
    Posts
    149

    Default adding php-code to main.html?/access to user's input within the main.html

    Is it possible to use php code in main.html?
    I'm asking because of 2 things that I would like to implement:
    1) Tabs with submenues. for example - tab Houses should have Family houses, comercials, etc as submenue, and so on. Since I want my selected tabs have different look from non-selected I have to mark the selected ones as class="selected" in <a>-tags. Is it possible to add some kind of &tab=houses to the link to the script and analyze it through a "case" structure in main.html? I'm pretty new to php, so I'm not sure wether it is possible or wether I miss something... If it is possible - are there some security issues in such a method?
    2) I want my layout look different depending on user's input. For example I would like to display flag of the county that was choosen by user in the header. Another question concering this subject: is there a way to get user's input inside of main.html?(for example the value of the county field)

  2. #2
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default Re: adding php-code to main.html?/access to user's input within the main.html

    If your server is setup to allow PHP to be run in html files you can. If not, there is code you can add to your htaccess file if your server allows htaccess overrides. I don't know it off the top of my head but it has been posted here before or you can google 'php in html pages' and you should be able to find it.

  3. #3
    Join Date
    Oct 2006
    Posts
    149

    Default Re: adding php-code to main.html?/access to user's input within the main.html

    I can configure my apache, so which of both options you would recommend? could it be a security issue?
    And what about the second question: can I somehow access user's input within the main.html?

  4. #4
    Join Date
    Dec 2004
    Location
    German, since 2000 in Spain
    Age
    50
    Posts
    826

    Default Re: adding php-code to main.html?/access to user's input within the main.html

    There is an add-on called "welcome user" available for download. This allows you to display the users name inside the main.html template. If this is possible, it should be easy to modify to display any other field from the userdb.
    Last edited by CanariasData; 12-14-2006 at 02:59 PM. Reason: link added

  5. #5
    Join Date
    Oct 2006
    Posts
    149

    Default Re: adding php-code to main.html?/access to user's input within the main.html

    thank you for the hint, but I think its not quite what I meant - I don't need information from userdb, rather the input that the user made while filling out the search form, for example if he has spesified Catalonia in the rentals search form I would like to show the flag of Catalonia in header when displaying the search results.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •