PDA

View Full Version : yet another problem >_<


AN-net
07-04-2004, 04:20 PM
ok im getting parse error on line 187

heres my beautiful code:D :

173: if($_POST['do']=="updatejournal")
174: {
175: globalize($_POST, array(
176: 'journalname' => TEXT,
177: 'journaldesc' => TEXT,
178: 'j' => INT,
179: 'private' => INT,
180: 'wcv' => TEXT,
181: 'reset_views' => INT,
182: 'reset_rating' => INT
183: ));
184: $DB_site->query("UPDATE ".TABLE_PREFIX."journals SET journalname='".addslashes($journalname)."',
185: journaldesc='".addslashes($journaldesc."',private='".$private."',whocanview='".$wcv."'
186: WHERE journal_id='".$j."'
187: ");
188: if($reset_views==1)
189: {
190: $DB_site->query("UPDATE ".TABLE_PREFIX."journals SET journalviews='0' WHERE journal_id='".intval($j)."'");
191: }
192: if($reset_rating==1)
193: {
194: $DB_site->query("UPDATE ".TABLE_PREFIX."journals SET journal_totalrating='0' AND journal_totalvotes='0' WHERE journal_id='".intval($j."'");
195: }
196: define('CP_REDIRECT', 'journaladmin.php?do=moderatejournals');
197: print_stop_message('journal_updated_successfully') ;
198: }


any help is appreciated as always:)

AN-net
07-04-2004, 07:21 PM
nvm i solved it lol

all-the-vb
07-04-2004, 08:09 PM
try this

173: if($_POST['do']=="updatejournal")
174: {
175: globalize($_POST, array(
176: 'journalname' => TEXT,
177: 'journaldesc' => TEXT,
178: 'j' => INT,
179: 'private' => INT,
180: 'wcv' => TEXT,
181: 'reset_views' => INT,
182: 'reset_rating' => INT
183: ));
184: $DB_site->query("UPDATE ".TABLE_PREFIX."journals SET journalname='".addslashes($journalname)."',
185: journaldesc='". addslashes($journaldesc)."',private='$private',whocanview='$wcv'
186: WHERE journal_id='$j'
187: ");
188: if($reset_views==1)
189: {
190: $DB_site->query("UPDATE ".TABLE_PREFIX."journals SET journalviews='0' WHERE journal_id='".intval($j)."'");
191: }
192: if($reset_rating==1)
193: {
194: $DB_site->query("UPDATE ".TABLE_PREFIX."journals SET journal_totalrating='0' AND journal_totalvotes='0' WHERE journal_id='".intval($j)."'");
195: }
196: define('CP_REDIRECT', 'journaladmin.php?do=moderatejournals');
197: print_stop_message('journal_updated_successfully') ;
198: }