I would be really grateful for any help anyone can give me with a error I am getting.
I have built a fairly simple cms using php, I say this as I am fairly new to php so may be causing an error through the coding of the cms.
However the site has been functioning fine for several months but the IT company who host the website have recently transferred their servers and since then, when using the cms the site has been throwing up a “The website declined to show this webpage” error.
This also seems to have the knock on effect of stopping the rest of the website functioning for several minutes, then the rest of the site comes back online.
I don’t know if this is relevant but this error is only caused by loading the php script in the cms on pc it doesn’t happen on a mac.
If anyone has any idea of what could be causing this error i’d be very grateful for any advice?
Doing a quick search, this thread is the top hit. The next few hits simply say that the extention was missing or wrong. Double check that all files have the correct extension, and where applicable, a DOCTYPE.
Of course
If you use ‘Go advanced’ instead of ‘Post quick reply’, you’ll be able to put the correct code tags around your code, which will make it easier to read.
thanks - have copied below: i’ve omitted the header url - the includes are just opening and closing the database connections and are definitely working fine as on all other areas of the site.
<?php // include db connect
ob_start();
header("Location:");
ob_flush();
?>
<?php // include db connect
include("../includes/config.php");
?>
<?php
// assign news to variables
$name=$_POST['name'];
$location=$_POST['location'];
$property_type=$_POST['property_type'];
$prices_from=$_POST['prices_from'];
$prices_to=$_POST['prices_to'];
$information=$_POST['information'];
$information_plus=$_POST['information_plus'];
$information_plus_string = str_replace(" ","",$information_plus);
$info_list=$_POST['info_list'];
$info_table=$_POST['info_table'];
$facilities=$_POST['facilities'];
$display=$_POST['display'];
$primary_key=$_POST['primary_key'];
$highlight=$_POST['highlight'];
$bar=$_POST['bar'];
$beach=$_POST['beach'];
$golf=$_POST['golf'];
$shopping=$_POST['shopping'];
$restaurant=$_POST['restaurant'];
$spa=$_POST['spa'];
$sports=$_POST['sports'];
$gardens=$_POST['gardens'];
$watersports=$_POST['watersports'];
$gym=$_POST['gym'];
$swimming=$_POST['swimming'];
$inftab_prop1=$_POST['inftab_prop1'];
$inftab_prop2=$_POST['inftab_prop2'];
$inftab_prop3=$_POST['inftab_prop3'];
$inftab_prop4=$_POST['inftab_prop4'];
$inftab_prop5=$_POST['inftab_prop5'];
$inftab_prop6=$_POST['inftab_prop6'];
$inftab_price1=$_POST['inftab_price1'];
$inftab_price2=$_POST['inftab_price2'];
$inftab_price3=$_POST['inftab_price3'];
$inftab_price4=$_POST['inftab_price4'];
$inftab_price5=$_POST['inftab_price5'];
$inftab_price6=$_POST['inftab_price6'];
// insert news from form
mysql_query("UPDATE investment_property SET name = '$name'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET location = '$location'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET prices_from = '$prices_from'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET prices_to = '$prices_to'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET information = '$information'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET information_plus = '$information_plus_string'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET info_list = '$info_list'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET info_table = '$info_table'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET facilities = '$facilities'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET display = '$display'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET bar = '$bar'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET beach = '$beach'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET golf = '$golf'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET shopping = '$shopping'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET restaurant = '$restaurant'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET spa = '$spa'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET sports = '$sports'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET gardens = '$gardens'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET watersports = '$watersports'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET gym = '$gym'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET swimming = '$swimming'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET highlight = '$highlight'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property SET property_type = '$property_type'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property
SET inftab_prop1 = '$inftab_prop1'
, inftab_prop2 = '$inftab_prop2'
, inftab_prop3 = '$inftab_prop3'
, inftab_prop4 = '$inftab_prop4'
, inftab_prop5 = '$inftab_prop5'
, inftab_prop6 = '$inftab_prop6'
WHERE primary_key = '$primary_key'");
mysql_query("UPDATE investment_property
SET inftab_price1 = '$inftab_price1'
, inftab_price2 = '$inftab_price2'
, inftab_price3 = '$inftab_price3'
, inftab_price4 = '$inftab_price4'
, inftab_price5 = '$inftab_price5'
, inftab_price6 = '$inftab_price6'
WHERE primary_key = '$primary_key'");
?>
<?php // close db connection
include("close_connect.php");
?>
Thanks for your reply Anthony, I’m sure this code is fairly ineloquent, i’ll try and combine these queries and post back - is this the likely cause then do you think?
nope still no joy - the IT company dealing with it are saying it may be an issue with their servers/setup and to leave it with them.
I’m just trying to make sure it’s not an issue i’ve caused though, as long as there’s nothing in that script that’s unusual i’ll wait for them I guess - will update when I know more