firstly i fixed that date problem i removed this accedidently
/ if date invalid or not supplied, use current time /
if($useDate == 0)
{
$useDate = Time();
}
ok it all works now. so im moving the site from my testing server over to a live server.
lets say testserver is the testing server and liveserver is the live server.
on the test server evrything works 100% ok
on the liveserver it comes up with "Could not connect to database2 table"
the only thing i have changed is the database connection string pass, server, username. now it connects ok as it would say "Could not connect to the database server"
looking at the code it errors on line this line.
$sql = "SELECT * FROM postcodes WHERE Pcode=$postcode ORDER BY Locality";
$sql_result = mysql_query($sql,$connection) or die ("Could not connect to database2");
$rows = mysql_num_rows($sql_result);
if i change this WHERE Pcode=$postcode to WHERE Pcode='$postcode' its works but it dosent select everthing from the table postcode where the postcode is whatever it got from the querystring.
this is the querystring
admin_image.php?id=232&postcode=4305
this must be a php server problem. any suggestions.
just looked at the 2 servers.
the testingserver is on a Windows NT version 4.0
the liveserver is UNIX type: L8
is this the problem