Linked Questions

Popular Questions

Why is this data set not being entered into the database?

Asked by At

I'm having a problem with a snippet of my code not entering data into the database. Does anyone see it? Cuz, I don't see it...

I'm using 000's free web hosting for testing purposes if that matters.

$ConnServ is included via another .PHP page and is working on multiple other requests to server. All spelling has been checked multiple times. This script worked at one point but it was a separate page. It was then consolidated onto the same page as the HTML form for 'required field' checking.

Code is throwing zero errors.

<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<!-- this was included to show how the form interacts with the below code. -->
//Add Table Data
$sql = $ConnServ->prepare("INSERT INTO TestingDatabase (file,fileTwo,text,textTwo,tPos,tPosTwo,owner,createDate,invisible,tags)
VALUES (?,?,?,?,?,?,?,?,?,?)");

//echo '<a>'. $fileName . $fileName2 . $textinput . $textinput2 . $textPos . $textPos2 . $ContentOwner . $currentDate . $visState . $lineTags .'</a>'; //<- this will echo the correct data from the form inputs if not commented out.

No data is being input into the database fields, the auto increment is not being incremented either, yet all the data seems to make it to the $sql request.

If it's something simple I'm going to bed...

Related Questions