Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8583799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:37:20+00:00 2026-06-11T21:37:20+00:00

I am creating a search field for my website. I have keywords for every

  • 0

I am creating a search field for my website.
I have keywords for every “product” and I want to direct to their URL IF the entered value matches my keywords and ELSE redirect it to another page.

<form action="redirect.php" > 
<input id="search" name="search" type="text" value="Search Here" />
<input name="submit" type="button" value="Go" />
</form>

The function I want :

<?php


if (isset($_GET['submit']));

$product1_keywords = "animal feeds, "weanrite, "Wean Rite;
$searchValue = $_POST['search'];



if ($search_fieldValue = $product1_keywords) {


header('Location: http://localhost/equalivet_2/#products/wean_rite.html');
}

else {

// Redirect page
header('Location: http://localhost/equalivet_2/not_found.html');
}

?>

Do I have to make a database to pre-define my keywords or a simple PHP will do?

Can anyone help me with this?

Your help will be very much appreciated. Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:37:22+00:00Added an answer on June 11, 2026 at 9:37 pm

    Define an anchor tag in your html and your URL should point to the name of the anchor which is
    yourpage.html#anchortagid

    html

    <div id="container" style="width:300px; height:300px">
        <a id="a1" name="a1"></a>
    </div>
    

    php

    instead of using go to try redirect with the anchor in the end

    products/product1.html#a1
    

    that will automatically take you to a1 anchor

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a search field on a mobile app i am creating via
I'm creating a form with a single search field and I want that field
I am creating a search page where we can find the product by entering
I'm creating eBay style search panes that allow users to narrow their results set
I'm creating a set of search panes that allow users to tweak their results
I am creating a search engine for my php based website. I need to
I have a Drupal 7 website that is running apachesolr search and is using
I'm creating a search for a website for an organization that works with abused
I'm creating a search field that when you type something in to a clear
I'm creating a search application in mvc3 where i have 2 tables : 1.State

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.