Webmaster Forum


Go Back   Webmaster Forum > The Webmaster Forums > Forum Lobby > Computers & Internet
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Computers & Internet For all those computer related discussions.

Ezilon Directory   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 11-06-2006, 04:21 PM   #1 (permalink)
Contributing Member
 
Join Date: 05-18-06
Posts: 126
iTrader: 0 / 0%
Latest Blog:
None

mybluehair is liked by many
I need help with a SQL code (for my boss!)

there is a message board system out there called DeluxeBB (deluxebb.com) and its coded sort of like xmb message boards. well anyway im the tech staff there and I was asigned a job to do fast. heres the job:
I was to make a news ticker code for the index. all the admins could edit what it sayes and turn it on and off in the admin panel.
heres the prob. I coded everything, and made the ticker codes. I added the SQL querys. here they are:
Quote:
`tickercontents` mediumtext NOT NULL default '',
`ticker` tinyint(1) default '0',
and added them to a table called "settings". ok, now I added a little on and off button to the admin panel. here it is:
Quote:
<tr bgcolor="<?php echo $tdbgcolor ?>">
<td width="29%"><span class="misctext"><?php echo $lang_tickeroption; ?></span></td>
<td width="71%">
<select name="$newsticker">
<option value="1" <?php if($settings['ticker'] == 1) { echo 'selected="selected"'; } ?>><?php echo $lang_on; ?></option>
<option value="0" <?php if($settings['ticker'] == 0) { echo 'selected="selected"'; } ?>><?php echo $lang_off; ?></option>
</select></td>
</tr>
and then I made a code on on index.php:

Quote:
$ticker = '';

if ($SETTINGS['ticker'] == 'on') {
$contents = '';
$news = explode("\n", str_replace(array("\r\n", "\r"), array("\n"), $SETTINGS['tickercontents']));
for($i=0;$i<count($news);$i++) {
if (strlen(trim($news[$i])) == 0) {
continue;
}
$news[$i] = postify($news[$i], 'no', 'no', 'yes', 'no', 'yes', 'yes', false, 'yes', 'no');
$news[$i] = str_replace('\"', '"', addslashes($news[$i]));
$contents .= "\tcontents[$i]='$news[$i]';\n";
}
include($templatefolder.'/index_ticker.php');
}
ok...now I test it. heres where the problem happens. I go to the admin panel and turn it to on.......I go to index.php and nothing happens. I go back to the admin panel and the on and off option has been turned back off!

I need help quick. ive got to get this done before the next version in december. I cant ask my boss...so..
can someone send me a PM and try to help me out? I dont know what the problem could be! thanks
mybluehair is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 11-06-2006, 09:40 PM   #2 (permalink)
Inactive
 
jeet's Avatar
 
Join Date: 03-04-06
Posts: 181
iTrader: 0 / 0%
jeet is a jewel in the roughjeet is a jewel in the roughjeet is a jewel in the roughjeet is a jewel in the roughjeet is a jewel in the roughjeet is a jewel in the roughjeet is a jewel in the rough
I am not exactly sure, but shouldn't this line:
<select name="$newsticker">

be:
<select name="newsticker">

Hope that helps.
Bye
jeet is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-16-2006, 12:30 PM   #3 (permalink)
Contributing Member
 
Join Date: 05-18-06
Posts: 126
iTrader: 0 / 0%
Latest Blog:
None

mybluehair is liked by many
Quote:
Originally Posted by jeet View Post
I am not exactly sure, but shouldn't this line:
<select name="$newsticker">

be:
<select name="newsticker">

Hope that helps.
Bye
that dident work...I dont know whats wrong. it just keeps turning it self on.
mybluehair is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > The Webmaster Forums > Forum Lobby > Computers & Internet

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
32000 for the Boss joecacia Forum Lobby 15 12-22-2006 03:44 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 01:21 PM.
© Copyright 2008 V7 Inc

Click Here