close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Notice: Undefined index: id in \editcountry.php on line 17 incorrect INTEGER value:

Thread began 10/20/2020 12:18 am by Ashok | Last modified 10/22/2020 8:56 am by Ray Borduin | 212 views | 2 replies |


Notice: Undefined index: id in \editcountry.php on line 17 incorrect INTEGER value:

I have an update recordset behaviour but somehow on submitting the update, I am getting this error: Notice: Undefined index: id in \editcountry.php on line 17
incorrect INTEGER value:

Website is on localhost.

This is the code:

<?php require_once('Connections/database.php'); ?>
<?php require_once('webassist/mysqli/rsobj.php'); ?>
<?php require_once('webassist/mysqli/queryobj.php'); ?>
$getcity = new WA_MySQLi_RS("getcity",$database,1);
$getcity->setQuery("SELECT database_city.*, database_country.* FROM database_city INNER JOIN database_country ON database_city.city_country = WHERE = ?");
$getcity->bindParam("i", "".(isset($_GET['id'])?$_GET['id']:"") ."", "-1"); //WAQB_Param1
$getcountry = new WA_MySQLi_RS("getcountry",$database,0);
$getcountry->setQuery("SELECT * FROM database_country ORDER BY country ASC");
$UpdateQuery = new WA_MySQLi_Query($database);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "database_city";
$UpdateQuery->bindColumn("city_country", "i", "".($getcity->getColumnVal("id")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("city", "s", "".((isset($_POST["city"]))?$_POST["city"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("date", "t", "".((isset($_POST["date"]))?$_POST["date"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("user", "i", "".((isset($_POST["user"]))?$_POST["user"]:"") ."", "WA_DEFAULT");
$UpdateQuery->addFilter("id", "=", "i", "".($_GET['id']) ."");
$UpdateGoTo = "";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";

<!DOCTYPE html>
<html lang="ru">

<!-- SITE TITTLE -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Pavlino Consulting Database Portal</title>

<link href="plugins/jquery-ui.css" rel="stylesheet" type="text/css">
<link href="plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="plugins/rs-plugin/css/settings.css" media="screen">
<link rel="stylesheet" type="text/css" href="plugins/selectbox/select_option1.css">
<link rel="stylesheet" type="text/css" href="plugins/datepicker/datepicker.css">
<link rel="stylesheet" type="text/css" href="plugins/isotope/jquery.fancybox.css">
<link rel="stylesheet" type="text/css" href="plugins/isotope/isotope.css">

<!-- GOOGLE FONT -->
<link href=',700' rel='stylesheet' type='text/css'>

<!-- CUSTOM CSS -->
<link href="css/style.css" rel="stylesheet">
<link rel="stylesheet" href="css/colors/default.css" id="option_color">

<!-- FAVICON -->
<link rel="shortcut icon" type="image/png" href="image/favicon.png"/>

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src=""></script>
<script src=""></script>


<div class="main-wrapper">

<!-- HEADER -->
<?php include('nav.php'); ?>

<section class="pageTitle" style="background-image:url();">
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="titleTable">
<div class="titleTableInner">
<div class="pageTitleInfo">
<h1>Admin Panel</h1>
<div class="under-border"></div>

<section class="mainContentSection blogSidebar">
<div class="container">
<div class="row">

<div class="col-sm-12 col-xs-12">
<div class="thumbnail blogSinglePost">
<div class="caption">

<h1>Edit City</h1>

<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="POST" role="form" class="form">

<div class="form-group">
<select name="city_country">
$wa_startindex = 0;
while(!$getcountry->atEnd()) {
$wa_startindex = $getcountry->Index;

<option value="<?php echo($getcountry->getColumnVal("id")); ?>" <?php
if ($getcountry->getColumnVal("id")==$getcity->getColumnVal("city_country") )
echo 'selected="selected"' ;
<?php echo($getcountry->getColumnVal("country")); ?></option>

$getcountry->moveFirst(); //return RS to first record
<div class="form-group">
<input type="text" class="form-control" id="city" name="city" value="<?php echo($getcity->getColumnVal("city")); ?>" required>
<div class="form-group">
<input type="hidden" class="form-control" id="date" name="date" value="<?php $date = date('Y-m-d'); echo $date; ?>" />
<div class="form-group">
<input type="hidden" class="form-control" id="user" name="user" value="<?php echo $_SESSION['userid']; ?>" />

<button type="submit" name="submit" class="btn buttonCustomPrimary">Update City</button>



<!-- FOOTER -->
<?php include('footer.php'); ?>


<script src=""></script>
<script src="plugins/jquery-ui/jquery-ui.js"></script>
<script src="plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="plugins/rs-plugin/js/"></script>
<script src="plugins/rs-plugin/js/jquery.themepunch.revolution.min.js"></script>
<script src="plugins/selectbox/jquery.selectbox-0.1.3.min.js"></script>
<script src="plugins/datepicker/bootstrap-datepicker.js"></script>
<script src=""></script>
<script src="plugins/counter-up/jquery.counterup.min.js"></script>
<script src="plugins/isotope/isotope.min.js"></script>
<script src="plugins/isotope/jquery.fancybox.pack.js"></script>
<script src="plugins/isotope/isotope-triger.js"></script>
<script src="plugins/countdown/jquery.syotimer.js"></script>
<script src="js/custom.js"></script>



Sign in to reply to this post

Ray BorduinWebAssist

Please attach the actual page when posting to the forum instead of using copy/paste. That enables me to open the page in Dreamweaver and debug it more easily.

In this case, try changing:
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="POST" role="form" class="form">

<form action="" method="POST" role="form" class="form">

I think that will resolve the problem.

Sign in to reply to this post
Did this help? Tips are appreciated...


This solution worked. Thank you!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...