Soldato
- Joined
- 12 Feb 2006
- Posts
- 17,625
- Location
- Surrey
anyone know why the background colour of the code box has gone back to the horrible dark blue? they changed it to a lovely white but just noticed it is no longer this.
if you're reading this and have the powers that can do fix it please do, everyone here will thank you for it.
e.g.
if you're reading this and have the powers that can do fix it please do, everyone here will thank you for it.
e.g.
PHP:
<?php
try{
$conn=$dbh=mysql_connect ("localhost", "", "");// or die ('Cannot connect to the database because: ' . mysql_error());
mysql_select_db("kimmystr_wordpress");// or die('Could not select database ');
$pauthor=$_POST["author"];
$pcontent=$_POST["comment"];
$result = mysql_query("insert into wp_comments(comment_author, comment_date, comment_content) values('$pauthor', now(), '$pcontent')");// or die('Fail');
header('Location: http://www.kimmystravels.co.uk/wp-content/themes/main/messages.php?result=success');
}
catch (Exception $e) {
header('Location: http://www.kimmystravels.co.uk/wp-content/themes/main/messages.php?result=fail');
}
?>
Code:
[COLOR=#000000] [COLOR=#0000bb]<?php
try[/COLOR][COLOR=#007700]{
[/COLOR][COLOR=#0000bb]$conn[/COLOR][COLOR=#007700]=[/COLOR][COLOR=#0000bb]$dbh[/COLOR][COLOR=#007700]=[/COLOR][COLOR=#0000bb]mysql_connect [/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]"localhost"[/COLOR][COLOR=#007700], [/COLOR][COLOR=#dd0000]""[/COLOR][COLOR=#007700], [/COLOR][COLOR=#dd0000]""[/COLOR][COLOR=#007700]);[/COLOR][COLOR=#ff8000]// or die ('Cannot connect to the database because: ' . mysql_error());
[/COLOR][COLOR=#0000bb]mysql_select_db[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]"kimmystr_wordpress"[/COLOR][COLOR=#007700]);[/COLOR][COLOR=#ff8000]// or die('Could not select database ');
[/COLOR][COLOR=#0000bb]$pauthor[/COLOR][COLOR=#007700]=[/COLOR][COLOR=#0000bb]$_POST[/COLOR][COLOR=#007700][[/COLOR][COLOR=#dd0000]"author"[/COLOR][COLOR=#007700]];
[/COLOR][COLOR=#0000bb]$pcontent[/COLOR][COLOR=#007700]=[/COLOR][COLOR=#0000bb]$_POST[/COLOR][COLOR=#007700][[/COLOR][COLOR=#dd0000]"comment"[/COLOR][COLOR=#007700]];
[/COLOR][COLOR=#0000bb]$result [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]mysql_query[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]"insert into wp_comments(comment_author, comment_date, comment_content) values('$pauthor', now(), '$pcontent')"[/COLOR][COLOR=#007700]);[/COLOR][COLOR=#ff8000]// or die('Fail');
[/COLOR][COLOR=#0000bb]header[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]'Location: http://www.kimmystravels.co.uk/wp-content/themes/main/messages.php?result=success'[/COLOR][COLOR=#007700]);
}
[/COLOR][COLOR=#0000bb]catch [/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]Exception $e[/COLOR][COLOR=#007700]) {
[/COLOR][COLOR=#0000bb]header[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]'Location: http://www.kimmystravels.co.uk/wp-content/themes/main/messages.php?result=fail'[/COLOR][COLOR=#007700]);
}
[/COLOR][COLOR=#0000bb]?>[/COLOR] [/COLOR]