Posted on Thursday 6th March 2008 at 03:29 PM | |
atthelibrary Newbie |
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 Senior Member |
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 Newbie |
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) http://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 Senior Member |
Change this PHP Code
1 2 3
print "<option value=\"$cats[id]\" selected=\"selected\">$cats[title]</option>\r\n"; //selected ^^
to PHP Code
1 2 3
print "<option value=\"$cats[id]\" selected=\"selected\">$cats[name]</option>\r\n"; //selected ^^
I swear shadow never tests his scripts :S |
Posted on Thursday 6th March 2008 at 05:28 PM | |
atthelibrary Newbie |
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 Senior Member |
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 Senior Member |
@_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 |
Posted on Thursday 6th March 2008 at 09:06 PM | |
atthelibrary Newbie |
thanks love, would appreciate that. Rewriterule ;) |
Posted on Friday 7th March 2008 at 06:06 PM | |
DanielXP Senior Member |
Shadow put a a extra r in it "Rulre" > "Rule" |
Posted on Tuesday 11th March 2008 at 06:21 PM | |
atthelibrary Newbie |
Just wondered if there was any updates on this yet? ta |