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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry [Help] Regarding a search code

    Hello,

    Im having a bit of a problem with my new project ( site ) i'm working with a template and I like the search bar and I want to keep it but it doesen't work or I don't know how to make it work, because nothing happens when I hit search.

    My opinion :

    1. Maybe I can make all the search box a link so when I click it to redirect me to google, but to keep the design on my website. ( how do I do that ? )

    2.Maybe you guys can make it work to actually search something ...

    Search box code :

    <!-- searchform *copy/paste this code to place anywhere in the page-->
    <form method="get" id="searchform" action="#">
    <p>
    <label class="screen-reader-text" for="s">Search for:</label>
    <input value="Type Your Search Here" name="s" id="s" type="text" />
    <input id="searchsubmit" value="search" src="images/searchbutton.png" type="image" />
    </p>
    </form>
    <!-- end of searchform -->

    Thanks in advance !

    Image for search bar ( that I want to keep and make it functionally )



    Uploaded with ImageShack.us

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,701
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    No wonder it’s not doing anything because you have to tell the form what to do on submit, it can’t read your (and our) mind(s).

    Do you see this:
    Code:
    <form method="get" id="searchform" action="#">
    The action attribute must contain a path to a script that is processing the form input. This script should be a server side script like PHP, ASP.NET, Perl, ColdFusion, or whatever, and should have the function(s) to read out the values of the form controls.

    Since PHP is the most popular programming language for websites and is most widely supported I’m going to move this thread to the PHP section, maybe these guys can help you out.

  • #3
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    so

    So, can you give me an example of how it should look like ?

  • #4
    New Coder
    Join Date
    Aug 2012
    Location
    New Zealand
    Posts
    52
    Thanks
    2
    Thanked 4 Times in 4 Posts
    If I was you I would start off by learning some basic PHP just to get the hang of it by using w3schools

    Good Luck!


  •  

    Posting Permissions

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