Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 255533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:56:19+00:00 2026-05-11T21:56:19+00:00

I am having a bizare problem where I have a script that works elsewhere

  • 0

I am having a bizare problem where I have a script that works elsewhere on the site but refuses to work for me now. The problem is exclusive to IE, it works fine in Mozilla.
Below is the form:

<form class="element_form" action="general_image.php" method="post">

    <?php generate_input('hidden', '', 'id', $id);?>
    <input type="image" src="../images/delete.gif" name="action" value="delete" class="button" />
    <input type="image" src="../images/tick.gif" name="action" value="active_switch" class="button" />

</form>

Here is the code that is supposed to work:

<?php

include('header.php');

$db->connect();

$table = 'general_image';

$page = 'general';

$region = $_SESSION['region'];

$action = $secure->secure_string($_REQUEST['action']);
$id = $secure->secure_string($_POST['id']);

$max_active = 1;

if($action == 'active_switch' || $action == 'delete'){

    $response = array();

    $response['action'] = $action;
    $response['id'] = $id;

    if($action == 'active_switch'){

        $query = 'SELECT * FROM general WHERE region = "' . $region . '"';

        $result = mysql_query($query);

        if(!$result) {

            $utility->fail($action, 'query error: ' . $query);

        }else{

            $row = mysql_fetch_assoc($result);

            $already_active = false;

            $active = '';

            if($id == $row['fifi']){

                $already_active = true;
            }

            $active .= $row['fifi'];

            $response['results'] = $active;

            if(!$already_active){

                $update = '';
                $active = '';

                $update .= 'fifi="' . $id . '"';

                $active .= $id;

                $query = 'UPDATE general SET ' . $update . ' WHERE region = "' . $region . '"';

                $response['results'] = $active;

            }else{

                    $utility->redirect($page . '.php');

            }
        }

    }elseif($action == 'delete') {

        $query = "DELETE FROM $table WHERE id=" . $id;
    }

    echo $query . "hello";


    if(!mysql_query($query)) {

        $utility->fail($action, 'query error: ' . $query);
    }

If someone could tell me what I’m doing wrong that would be great. Thanks

EDIT

$action = $secure->secure_string does the following:

    function secure_string($string)
    {   
        return (strip_tags(addslashes(mysql_real_escape_string(stripslashes($string)))));
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:56:19+00:00Added an answer on May 11, 2026 at 9:56 pm

    i have found that sometimes it is better to have a hidden field for action then a submit button or image. if someone press RETURN or ENTER to submit the form which action will be returned ?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

having a lot of trouble setting up polymorphic. I have Comments which works fine,
Having used storyboards for a while now I have found them extremely useful however,
Having trouble with an .htaccess file on WAMP. Works on the live server, but
Having issue with slider navigation. Works perfectly fine when there are no other unordered
I'm having trouble with a gradient drawing call. I have a Form that looks
I asked a question yesterday about a problem that Im having with a program
I am having a truly bizarre problem with my code here. It works (seemingly)
I am having a very annoying problem. I have an application with a setup
I'm having a problem with my shader loading code. The bizarre thing that's confusing
I'm having a bizarre problem. On my page, http://radiovalerie.org/ - text that's wrapped in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.