[UberCMS v1.xx] UberCMS v1.01

Status
Not open for further replies.

Leader

github.com/habbo-hotel
Aug 24, 2012
1,030
307
Seen that released before, I had to fix it myself. It has two of the same codes or something like that I forgot and it sends two queries to the table so instead of one comment, theres two posted.

PHP:
<?php
if(isset($_POST['post_comment']))
  $posted_on = date("M j, Y g:i A");
if (! isset($_POST['comment'])) {
  $_POST['comment'] = '';  // nu bestaat de variabele ten minste
}
 
$comment = strip_tags ($_POST['comment']);
if($comment == NULL){
    $error_message = 'You have left a field empty.<br /><br />';
  }else{
if (LOGGED_IN)
{
    mysql_query("INSERT INTO site_news_comments (article, userid, comment, posted_on) VALUES ('".$news_article_id."', '".$_SESSION['id']."', '".$comment."', '".$posted_on."');");
    $error_message = 'You have successfully left a comment.<br /><br />';
  }
}
?>
Since I cant code php anymore, I say remove
if (! isset($_POST['comment'])) {
$_POST['comment'] = ''; // nu bestaat de variabele ten minste
 

PatrickGERMAN

New Member
Jan 19, 2013
9
0
I have a shit Problem.
Have everything set. in config etc.

CONFIG:
PHP:
// $config['Site']['www'] = http://localhost
// $config['Site']['hash_secret'] = "xCg532%@%gdvf^5DGaa6&*rFTfg^FD4\$OIFThrR_gh(ugf*/"; Leave this well alone.
// $config['MySQL']['hostname'] = "localhost"; your hostname. Leave this as localhost unless need to be changed.
// $config['MySQL']['username'] = "root"; your MySQL username.
// $config['MySQL']['database'] = "testdb"; Database where your db is.
// $config['MUS']['enabled'] = false; unless you need MUS, leave this.
// $config['MUS']['ip'] = "MY IP IS there (should not see ^ ^)"; ""
// $config['MUS']['port'] = 2001; ""
 
$config['Site']['www'] = "http://localhost";
$config['Site']['hash_secret'] = "xCg532%@%gdvf^5DGaa6&*rFTfg^FD4\$OIFThrR_gh(ugf*/";
 
$config['MySQL']['hostname'] = "localhost";
$config['MySQL']['username'] = "root";
$config['MySQL']['password'] = "MY password IS there (should not see ^ ^)";
$config['MySQL']['database'] = "testdb";
 
$config['MUS']['enabled'] = false;
$config['MUS']['ip'] = "MY IP IS there (should not see ^ ^)";
$config['MUS']['port'] = 2001;
 
?>
I have. no domain or root

Domain as I did localhost.

My mistake is now this:

4q9ab77f_png.htm
 

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
I have a shit Problem.
Have everything set. in config etc.

CONFIG:
PHP:
// $config['Site']['www'] = http://localhost
// $config['Site']['hash_secret'] = "xCg532%@%gdvf^5DGaa6&*rFTfg^FD4\$OIFThrR_gh(ugf*/"; Leave this well alone.
// $config['MySQL']['hostname'] = "localhost"; your hostname. Leave this as localhost unless need to be changed.
// $config['MySQL']['username'] = "root"; your MySQL username.
// $config['MySQL']['database'] = "testdb"; Database where your db is.
// $config['MUS']['enabled'] = false; unless you need MUS, leave this.
// $config['MUS']['ip'] = "MY IP IS there (should not see ^ ^)"; ""
// $config['MUS']['port'] = 2001; ""
 
$config['Site']['www'] = "http://localhost";
$config['Site']['hash_secret'] = "xCg532%@%gdvf^5DGaa6&*rFTfg^FD4\$OIFThrR_gh(ugf*/";
 
$config['MySQL']['hostname'] = "localhost";
$config['MySQL']['username'] = "root";
$config['MySQL']['password'] = "MY password IS there (should not see ^ ^)";
$config['MySQL']['database'] = "testdb";
 
$config['MUS']['enabled'] = false;
$config['MUS']['ip'] = "MY IP IS there (should not see ^ ^)";
$config['MUS']['port'] = 2001;
 
?>
I have. no domain or root

Domain as I did localhost.

My mistake is now this:

4q9ab77f_png.htm
Webgalery
 
Status
Not open for further replies.

Users who are viewing this thread

Top