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 715879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:14:11+00:00 2026-05-14T05:14:11+00:00

My insert and update pages (through my admin forlder) into mysql stopped working. When

  • 0

My insert and update pages (through my admin forlder) into mysql stopped working. When I try to insert/update details it stays on the same page without adding or updating anything into the database table.

I really don’t know what happened and don’t know where start looking. I didn’t make any change to the pages whatsoever.

Is there anyone who had the same problem and can kindly give me a clue?

Appreciated
Francesco

Insertng some code if it can be of nay help:

    <?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if(isset($_POST['username'])) {
mysql_select_db($database_satsconn, $satsconn);
$query_rstUname = "SELECT members_ID FROM members WHERE username = '$_POST[username]'";
$rstUname = mysql_query($query_rstUname, $satsconn) or die(mysql_error());
$row_rstUname = mysql_fetch_assoc($rstUname);
$totalRows_rstUname = mysql_num_rows($rstUname);
if($totalRows_rstUname > 0){
$error['uname'] = 'That username is already in use. Please choose another.';
    }
}

if(isset($_POST['pwd']) && isset($_POST['pwd'])) {
 if($_POST['pwd'] != $_POST['con_pwd']) {
   $error['pwd'] = 'Your passwords don\'t match.';
   }
  else {
  $_POST['pwd'] =md5($_POST['pwd']);
  }
}

if(!isset($error)) {
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "addUser")) {
  $insertSQL = sprintf("INSERT INTO members (realname, username, pwd) VALUES (%s, %s, %s)",
                       GetSQLValueString($_POST['realname'], "text"),
                       GetSQLValueString($_POST['username'], "text"),
                       GetSQLValueString($_POST['pwd'], "text"));

  mysql_select_db($database_satsconn, $satsconn);
  $Result1 = mysql_query($insertSQL, $satsconn) or die(mysql_error());
   }
}

if ((isset($_POST['members_ID'])) && ($_POST['members_ID'] != "")) {
  $deleteSQL = sprintf("DELETE FROM members WHERE members_ID=%s",
                       GetSQLValueString($_POST['members_ID'], "int"));

  mysql_select_db($database_satsconn, $satsconn);
  $Result1 = mysql_query($deleteSQL, $satsconn) or die(mysql_error());

  $deleteGoTo = "add_member.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
    $deleteGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $deleteGoTo));
}

mysql_select_db($database_satsconn, $satsconn);
$query_rstAdmin = "SELECT * FROM members ORDER BY realname ASC";
$rstAdmin = mysql_query($query_rstAdmin, $satsconn) or die(mysql_error());
$row_rstAdmin = mysql_fetch_assoc($rstAdmin);
$totalRows_rstAdmin = mysql_num_rows($rstAdmin);
?>
  • 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-14T05:14:11+00:00Added an answer on May 14, 2026 at 5:14 am

    “it stays on the same page without adding or updating anything” is very common problem and can be caused by thousands of errors. There is noway to solve it by finding “anyone who had the same problem”.

    If you’re just user of this code, it would be better to hire a programmer.

    If you supposed to be a programmer yourself, you have to learn how to debug your application. Debugging stands for finding where the error is. Although debugging could help only if you know, what your code does. You can try it anyway.

    There are many things to do. You have to be sure that you can see all possible errors.
    You can start from this useful article

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

Sidebar

Related Questions

I have job insert page which is working fine. I just build an update
I have a trigger for insert/update/delete. That is working fine. Also, I need the
On a Magento installation, I'm trying to insert xml into the Layout Update XML
I am reading a tutorial on how to insert and update data into a
I'm using PDO::query to run the following SQL statement: INSERT INTO pages (template_id,user_id,page_default,page_internal_title,page_menu_text,page_nav_link,globalcontent_id,page_parent_id,page_order,page_active,page_show_in_menu,page_hide,page_created,page_updated,page_deleted,page_type) values
I create SqlConnection objects in every Insert,Update,Delete and Select methods in asp.net web pages.
The routine below inserts a page, sets permalinks to postname then attempts to update
I need to insert/update data by using link or image I need a code
How do I insert/update null values in date columns in Doctrine2? I've set the
What technique shall one use to implement batch insert/update for Backbone.sync?

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.