Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Oy, please help. New to PHP...

    Hi there,

    I'm pretty new to PHP coding and am having the worst time figuring this out.

    I am trying to place a Hotels.com search box in a single post - not on every page or in the sidebar or anything like that. Just need to get the box on one page of my site.

    I thought it was going to be a simple case of HTML code that is placed in the HTML section of a blog entry, but the code is actually fairly long and it's stumping me a bit.

    I know, or at least I think most of the code needs to go into the single.PHP file under the line that reads:
    <?php the_content(); ?>

    I'm hoping this is correct anyways, but I'm not sure which part I actually place in the HTML section of a post entry.

    Would someone please mind taking a look at the code (i will attach it) and let me know if A] I'm correct in thinking to adapt the single.PHP file, and B] what part of the code goes there and what part goes in the actual post itself.

    I would GREATLY appreciate it.

    Jenna
    Attached Files Attached Files

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    I think you've uploaded the wrong file; there is no PHP code in here.
    About 90% of this is CSS, you should pull that out into a .css document of its own just to simplify this (makes it look a little cleaner ).
    Also, in the future please select a title that better explains the problem.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • #3
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Then I am completely wrong and it's not PHP but instead CSS code? That means it would not go into the single PHP file but instead to the CSS style sheet??

    Can you tell me, would the 90% that you mention go into the style sheet and the other 10% go into the actual HTML section of my WP post?

    Thanks much

    Jenna

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Thats correct. The CSS would be anything between <style type="text/css">...</style> tags. All remaining tags would be html.
    I don't see a the_content, so I don't know what it is you are trying to do. CSS's purpose is for pure rendering control, nothing more. You cannot process any input without either directing to an external script, or writing one of your own (JS has limited capabilities; it can be used to connect remotely to another web form, but cannot process on its own).
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • #5
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So, if I put the code between the CSS tags into the style sheet (at the bottom okay), and the rest - the HTML code - into the body of my actual post this could work??

    I'm simply trying to get a Hotels.com search box to appear on one page of my site, and the affiliate manager over there is a bit slow in getting back to me, so I'm trying to find someone who will take pity on me and direct me a bit.

    Your help has been and continues to be appreciated.

    jenna


  •  

    Posting Permissions

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