I am in need of help on this one :( i cannot seem to figure out what i have done wrong, i set up my code just like in teh examples i read and i dont really see anything wrong with the logic (as far as i can tell) but the code will RETURN as data added successfully but i know better cause nothing shows up in teh database.
heres the html
<input type="hidden" name="cnotes" values="<?php echo $u ?>"/>
<textarea class="field span12" id="note_text" name="note_text" type="text" rows="9" maxlength="10000"></textarea>
<input id="add_note" type="submit" class="pull-right" name="add_note" value="Add Note"></submit>
this code is what i used to collect the data for the submission, i used a hidden input to get the value of the rom number for each entry in my table, then i just take the textarea and add that to the database, really im updating the database with that value being added to an already existing entry in my database, but this is where my issue starts.
In my sql line $note_sql it doesnt seem to really update anything
$note_sql = "UPDATE users SET customer_notes='".$customer_notes."' WHERE id='".$row."'";
here is the whole code
$con = mysqli_connect($host,$uname,$pass,$database) or die(mysqli_error($con));
$customer_notes = NULL;
if(isset($_GET['add_note']))
{
$customer_notes = $_GET['note_text'];
$row = $_GET['cnotes'];
}
// $sql = "INSERT INTO userprofile
// (customer_notes)
// VALUES
// ('".$customer_notes."')";
$note_sql = "UPDATE users SET customer_notes='".$customer_notes."' WHERE id='".$row."'";
$result = mysqli_query($con, $note_sql);
if($result){
echo ("DATA SAVED SUCCESSFULLY");
} else{
echo("Input data has failed Please go back and resubmit");
}
if anyone can help it would be GREATLY appreciated!