I am having trouble testing my php scripts on my computer.
The current script that I am using will work on my server, but when I try to test it on my computer it won't work properly.
I am guessing that there maybe things I need to configure in IIS or my PHP interpreter.
Here is the url of the page where the script is working on my server.
www.internetpipelinesuk.com/3nodb
and here are the error messages I get when I try to run the same page locally on my computer.
Notice: Undefined variable: field1 in c:\inetpub\wwwroot\garry php 2\header.php on line 28
Notice: Undefined variable: field2 in c:\inetpub\wwwroot\garry php 2\header.php on line 29
Notice: Undefined variable: field3 in c:\inetpub\wwwroot\garry php 2\header.php on line 30
Then the rest of the text for that page is displyed as usual, but when you type in a search it comes up with nothing even if you type in something which exists in the text files.
Although I'm pretty certain the script is ok I have also included the code for the script mentioned in the error message:
<?php
$password="admin";
$owner="gary@internetpipelinesuk.com";
$font="verdana";
$fsize="2";
$fcolor="000000";
$bgcolor="ffffff";
$link="red";
$vlink="red";
$alink="blue";
$title="Cogent Paradigm's Simply Business On-Line Catalogue";
$tablestuff="border=0 bgcolor=000000 cellpadding=4 cellspacing=1 width=300";
$tdstuff="bgcolor=ffffff width=150";
$Field1name="Product Code";
$Field2name="Product Name";
$Field3name="Product Price";
$date=date("jS F Y");
$allowhtml="no";
if ($allowhtml == "no") {
{
$field1=eregi_replace("<[>]>"," ",$field1);
$field2=eregi_replace("<[>]>"," ",$field2);
$field3=eregi_replace("<[>]*>"," ",$field3);
}
}
?>
<html>
<?php
echo "\n<Title>$title</title>\n<body bgcolor=$bgcolor link=$link vlink=$vlink alink=$alink>";
?>
<center>
<BR><BR>
<?php
echo "<font face=$font color=$fcolor size=$fsize>$title";
?>
<BR><BR>
<table>
<td width=100%><font face =<?php echo "$font $fcolor"; ?> size=<?php echo "$fsize"; ?>>
<a href="admin.php">Administration</a>
<a href="search.php">Search Records</a>
<a href="all.php">Display All Records</a>
<a href="today.php">Todays Entries</a>
<a href="../3nodb/index.php">Home Page</a>
</td>
</table>
</html>
Any help would be much appreciated.
Kjell