Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Error in my shoutbox

Asked Modified Viewed 2,633 times
D
Dunkin
D
Dunkin 10
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

Hi

Every time i go to my shoutbox site, I got this error in the top of my site:
Notice: Undefined variable: action in c:\server\wwwroot\shoutbox.php on line 17

This little piece of code is here(line 17 in red):
if (iADMIN && checkrights("S")) {
[color=red]if ($action == "delete") {[/color]
$result = dbquery("DELETE FROM ".DB_PREFIX."shoutbox WHERE shout_id='$shout_id'");
   }
   }


It works fine if I use this link, to delete a post

Quote

echo "<i><a href='".FUSION_SELF."?action=delete&shout_id=".$data['shout_id']."' class='side'><font color='red'>Delete</font></a></i> ";


And if I do so, the error disappear again, until I go to shoutbox again.

But how can this happens?
If I delete a post, it disappear, until next time I go to the shoutbox.
0 replies

5 posts

D
Dunkin
D
Dunkin 10
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Wow, thanks :D
0 replies
F
Falk
F
Falk 148
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
answered
Super Admin

Insert this line

if (!isset($action)) $action = "";


Before

if (iADMIN && checkrights("S")) {

0 replies
S
Sandrob57
S
  • Member, joined since
  • Contributed 86 posts on the community forums.
  • Started 16 threads in the forums
answered
Member

Talk to your host about thier error reporting level. You may need to send them a snippet of code to help them understand what you are talking about.

If you dont mind me asking, who is your host?
Edited by Sandrob57 on 23-01-2006 05:26,
0 replies
D
Dunkin
D
Dunkin 10
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Okay, but what can I do, to make it go away? :|
0 replies
M
Matonor
M
Impossible things are there to be made possible
  • Veteran Member, joined since
  • Contributed 1,022 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

a notice is not an error. your host just set up the error reporting level really high, this should be adressed for clean code pruposes though
0 replies

Category Forum

Bugs and Errors - 6

Labels

None yet

Statistics

  • Views 0 views
  • Posts 5 posts
  • Votes 0 votes
  • Topic users 4 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet