It maybe easier to send in the script.
The Form is as follows =
Webadd = website address or Keyword
It is possible for someone to write a keyword like google and goes straight to google.
<?php
include("config.inc.php");//mysql variables
include("connect.php");//connect to mysql server
if (!isset($webadd))
{
header("Location: [url]http://hollyfield.port5.com[/url]");
}
if(substr($webadd,0,7)=='http://') // This should be if there is a HTTP (is it correct command?)
{
header("Location: $url");
}
$sql = "select * from BPB_keywords where keyword=('$webadd')";
$result=mysql_query($sql)
or die ("cant do check!");
$all= mysql_fetch_array($result);
$num= mysql_num_rows($result);
if ($num == 1)
{
extract($all);
if (isset($popup))
{
echo '<script language="Javascript">alert ("A message before you load this website: $popup")</script>';
}
header("Location: $url");
}
if(preg_match('![url]http://[/url]!',$webadd)) //If their is not a http...
{
$url = "http://www.".webadd; // ...it adds one
header("Location: $url");
}
?>
Is their anything i need to change for it to work? thanks!
😃