news system

Posted on Thursday 6th March 2008 at 03:29 PM
atthelibrary
atthelibrary's Avatar
Hi, this is my first post :)

I'm using the news system tutorial from here for my site. It's all working fine, except for one thing. I can't get any categories to show in the drop down menu on news_admin.php, I've manually added records to the news_cats table in my database, but still nothing is shown in the dropdown selection.

Probably something stupidly simple I am missing, any help would greatly be appreciated.

Thanks, Ruth.
Posted on Thursday 6th March 2008 at 03:57 PM
DanielXP
DanielXP's Avatar
Find
PHP Code
  1. $get_cats = mysql_query("SELECFT * FROM `news_cats` ORDER BY `name` ASC");


In your news_admin.php and replace with

PHP Code
  1. $get_cats = mysql_query("SELECT * FROM `news_cats` ORDER BY `name` ASC");


Thats all i can see while quickly going over the code.
Posted on Thursday 6th March 2008 at 05:01 PM
atthelibrary
atthelibrary's Avatar
Thanks, I changed that, and that listed the news on the news_admin.php page, but this is still coming up with no categories in the dropdown.... Like this.. (not sure what tags are available on here)

https://img.photobucket.com/albums/v168/atthelibrary/newserror.gif

and then if i leave that blank it comes up with the same error - 'must complete all fields'

meh :(
Posted on Thursday 6th March 2008 at 05:16 PM
DanielXP
DanielXP's Avatar
Change this

PHP Code
  1. print "<option value="$cats[id]" selected="selected">$cats[title]</option>rn"; //selected ^^
  2. }else{ //or it isnt
  3. print "<option value="$cats[id]">$cats[title]</option>rn"; //echo regular


to

PHP Code
  1. print "<option value="$cats[id]" selected="selected">$cats[name]</option>rn"; //selected ^^
  2. }else{ //or it isnt
  3. print "<option value="$cats[id]">$cats[name]</option>rn"; //echo regular


I swear shadow never tests his scripts :S
Posted on Thursday 6th March 2008 at 05:28 PM
atthelibrary
atthelibrary's Avatar
haha no! Still not working, Also delete comments doesn't work & when you have to enter the image verification, an image doesn't appear. Oh well, I've given up for today, need some fresh eyes
Posted on Thursday 6th March 2008 at 05:38 PM
DanielXP
DanielXP's Avatar
Ok, im going to do myself something to eat.

I'll message shadow and tell him the url for this topic.
Posted on Thursday 6th March 2008 at 06:22 PM
ShadowMage
ShadowMage's Avatar
@_x a few table errors and such i'll get this updated tonight when i get home as i don't have any of my stuff on me EG my compy T_T server is blocked from here at school so yeah. but for your verification image open .htaccess and add:

Code
RewriteEngine On
RewriteRulre ^ver.jpg$ img.php
failure i sense
Posted on Thursday 6th March 2008 at 09:06 PM
atthelibrary
atthelibrary's Avatar
thanks love, would appreciate that.

Rewriterule ;)
Posted on Friday 7th March 2008 at 06:06 PM
DanielXP
DanielXP's Avatar
Shadow put a a extra r in it "Rulre" > "Rule"
Posted on Tuesday 11th March 2008 at 06:21 PM
atthelibrary
atthelibrary's Avatar
Just wondered if there was any updates on this yet?

ta
Login or register to respond to this forum topic.