You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to add one more field height value from Add Form page along with existing name and firstname. So I have added code accordingly but gets error. Please correct me. Index.html: <select id="height" names ="height" class="js-example-basic-single" type="text" style="width:50%" placeholder = "";'> <option></option> <option value="System Test">System Test</option> <option value="Early FPV">Early FPV</option> <option value="FPV">FPV</option> </select> add.php:
`$name = $mysqli->real_escape_string(strip_tags($_POST['name']));
$firstname = $mysqli->real_escape_string(strip_tags($_POST['firstname']));
$age = 20;
$lastvisit = date('Y/m/d');
$height = $mysqli->real_escape_string(strip_tags($_POST['height']));
$tablename = $mysqli->real_escape_string(strip_tags($_POST['tablename']));
I want to add one more field
height
value from Add Form page along with existingname
andfirstname
. So I have added code accordingly but gets error. Please correct me.Index.html:
<select id="height" names ="height" class="js-example-basic-single" type="text" style="width:50%" placeholder = "";'> <option></option> <option value="System Test">System Test</option> <option value="Early FPV">Early FPV</option> <option value="FPV">FPV</option> </select>
add.php:
`$name = $mysqli->real_escape_string(strip_tags($_POST['name']));
$firstname = $mysqli->real_escape_string(strip_tags($_POST['firstname']));
$age = 20;
$lastvisit = date('Y/m/d');
$height = $mysqli->real_escape_string(strip_tags($_POST['height']));
$tablename = $mysqli->real_escape_string(strip_tags($_POST['tablename']));
$return=false;
if ( $stmt = $mysqli->prepare("INSERT INTO ".$tablename." (name, firstname, age, lastvisit, height) VALUES ( ?, ?, ?, ?, ?)")) {
loaddata.php:
$grid->addColumn('height', 'Height', 'string');
demo.js:
` data: {
tablename : self.editableGrid.name,
name: $("#name").val(),
firstname: $("#firstname").val(),
height: $("#height").val()
},
success: function (response)
{
if (response == "ok" ) {
MySql database:
`height | varchar(30) | latin1_swedish_ci | | Yes | NULL'
The text was updated successfully, but these errors were encountered: