#17951 - 08/20/08 01:11 PM
admin panel (help)
|
Anu
Malt-o-Meal
Registered: 08/17/08
Posts: 13
|
Offline
|
|
I have been working on an admin panel to create towns and such, and the only problem that I've run into is making it admin only. I tried if ($userrow["id"] = 1) { trying to limit it to only a specified id, to no effect.
I am sorry for what seems to me like a small hurdle to cross, but after looking through the code, that is all I could find. I'm still trying to figure it out though, but I wouldn't mind someone throwing info my way.
Please, do not tell me how to do it, but suggest the proper syntax. I suppose I would learn either way, but the idea is that I figure it out :X
Edited by Anu (08/20/08 04:58 PM)
_________________________
I've got a lovely bunch of $error's. There just-a standin' in my code. Big one's, small ones, some as big as that error threaaaaad. Doodley doodley doot.
|
|
Top
|
|
|
#17957 - 08/20/08 07:46 PM
Re: admin panel (help)
[Re: Fayt]
|
Anu
Malt-o-Meal
Registered: 08/17/08
Posts: 13
|
Offline
|
|
Worked like a charm. Now to get the rest sorted out, hopefully I'm not the only one wanting something like this.
_________________________
I've got a lovely bunch of $error's. There just-a standin' in my code. Big one's, small ones, some as big as that error threaaaaad. Doodley doodley doot.
|
|
Top
|
|
|
#17963 - 08/21/08 08:28 AM
Re: admin panel (help)
[Re: Fayt]
|
Anu
Malt-o-Meal
Registered: 08/17/08
Posts: 13
|
Offline
|
|
About 33.3% done. Man I code slow, heheh.
_________________________
I've got a lovely bunch of $error's. There just-a standin' in my code. Big one's, small ones, some as big as that error threaaaaad. Doodley doodley doot.
|
|
Top
|
|
|
#17965 - 08/21/08 07:10 PM
Re: admin panel (help)
[Re: Fayt]
|
Anu
Malt-o-Meal
Registered: 08/17/08
Posts: 13
|
Offline
|
|
Oh I am, that's why it's taking me longer. Debugging every part as I go. But it's a pretty simple script, just need to stay concise with which db the info is going in, and what's being inserted. No worries, I wouldn't release something with bugs or errors. That's just ignorant.
_________________________
I've got a lovely bunch of $error's. There just-a standin' in my code. Big one's, small ones, some as big as that error threaaaaad. Doodley doodley doot.
|
|
Top
|
|
|
#17975 - 08/22/08 10:07 AM
Re: admin panel (help)
[Re: Fayt]
|
Anu
Malt-o-Meal
Registered: 08/17/08
Posts: 13
|
Offline
|
|
I'm having some issues getting a query to select and echo current table data. I'm not so good with those. Here's what i've been trying at so far-
$sql = doquery('SELECT `id`, `name`, `unique`, `willdrop` FROM <<itemsuffixes>>');
mysql_select_db('ds');
$retval = mysql_query( $sql );
if(! $retval )
{
die('Could not get data: ' . mysql_error());
}
while($row = mysql_fetch_array($retval))
{
echo "ID :{$row['id']} <br> ".
"Name: {$row['name']} <br> ".
"Unique: {$row['unique']} <br> ".
"Willdrop: {$row['willdrop']} <br> ".
"<br>";
}
echo "Fetched data successfully\n";
This is an attempt to show the admin what's already in the tables, to improve accuracy and prevent repeats. Also as a guide for people who don't know what a value should be.
_________________________
I've got a lovely bunch of $error's. There just-a standin' in my code. Big one's, small ones, some as big as that error threaaaaad. Doodley doodley doot.
|
|
Top
|
|
|
#17978 - 08/23/08 10:00 AM
Re: admin panel (help)
[Re: Fayt]
|
Anu
Malt-o-Meal
Registered: 08/17/08
Posts: 13
|
Offline
|
|
Wow dude, it was a joke. Im sorry. Really.
Edited by Anu (08/23/08 10:11 AM)
_________________________
I've got a lovely bunch of $error's. There just-a standin' in my code. Big one's, small ones, some as big as that error threaaaaad. Doodley doodley doot.
|
|
Top
|
|
|
#18006 - 08/26/08 12:17 AM
Re: admin panel (help)
[Re: Fayt]
|
AnmanIndustries
Cookie Crisp
   
Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth
|
Offline
|
|
... Yes.
|
|
Top
|
|
|
|
|