Hi all
This is my first post here and I’m trying to learn to use PHP more efficiently. Currently I just manipulate existing open source code but would like to become a little more proficient with the language.
I’m attempting to create a script which I submit a form to. The form will consist of a simple, single text field with ID “submit”
I would like to be able to define a range of keywords that forward to a page, another range of keywords that forward to another page, and another range of keywords that forwards to another page.
For testing, I’ve currenty got this far:
[php]<?php
$URL=“http://www.itseasier.co.uk”;
$URL2=“http://www.macbookscreenreplacement.com”;
$URL3=“http://www.iq-pc.com/index.php”;
$submit = $_POST[‘submit’] ;
if
($submit == ‘testsearch2’ OR $submit == ‘testsearch3’);
{
echo header (“Location: $URL3”);
}
if
($submit == ‘testsearch’ OR $submit == ‘testsearch1’);
{
echo header (“Location: $URL”);
}
?> [/php]
Now, what this does is, regardless of what is submitted into the form, forward to $URL. That workds, but I need it to vary this URL depending on the input
Any help greatly appreciated.
Many thanks