Forums

[resolved] Search.php and SearchForm.php (4 posts)

  1. CaDeAtH
    Member
    Posted 7 months ago #

    Good Day,

    I am having problem in searching, if I will use my searchform (customize), I will return to the index with a url (http://localhost/?webbox=text) but if I will exchange the webbox in the url into s (http://localhost/?s=text) it will use the search.php page...

    why is that so? is there any problem with my searchform?

  2. nttoanbrvt
    Member
    Posted 7 months ago #

    search from like this

    <form method="get" action="">
                <p>
                    <input class="clearfield" type="text" value="Search..." title="Search..." name="s" />
                    <input type="submit" value="" />
                </p>
            </form>

    in ACTION, you can using <?php bloginfo('url')?> like this

    <form method="get" action="<?php bloginfo('url')?>">

    [sig moderated as per the Forum Rules]

  3. CaDeAtH
    Member
    Posted 7 months ago #

    <form role="search" method="get" id="searchform" action="<?php bloginfo('url')?>" name="searchform">
        <div class="searchbar">
            <input type="text" class="webbox" name="webbox" size="18" value="Search" onclick="sb_focus();" onblur="sb_out();"/>
            <button class="btn" title="Web Search" type="submit">Search</button>
        </div><!--searchbar-->
    </form>

    That's my searchform...
    Still it generates webbox in the URL...

  4. CaDeAtH
    Member
    Posted 7 months ago #

    I already found the problem,
    it is on the
    <input type="text" class="webbox" name="webbox" size="18" value="Search" onclick="sb_focus();" onblur="sb_out();"/>
    name="webbox"
    I replace it into name="s"

    Thank you

Reply

You must log in to post.

About this Topic