I have striped down the following code to the minimum for clarity html
<form action="insert.php" method="post">
<textarea name="ff1" disabled="disabled">Monday 11 february</textarea>
<textarea name="ff2" disabled="disabled" >Selected Match is</textarea>
<input type="submit" name="submit" value="Submit Bet" >
</form>
php
<?php
$myvarA = $_POST['ff1'];
$myvarB = $_POST['ff2'];
$sql="INSERT INTO bestmatch (ddate, mmatch)
VALUES ('$myvarA','$myvarB')";
?>
I cannot get anything into the variables, if I change the following
VALUES ('$myvarA','$myvarB')";
to
VALUES ('anytext','anytext2')";
then everything is fine, and anytext is entered into my database, so there is no problem connection wise. I am puzzled as to why the variables will not work
print_r($_POST)and your error will probably be made pretty apparent. Also, you should be using prepared statements to insert any user-supplied values into your database. Blindly inserting them like that is just asking for your site to be hacked.if (isset($_POST['ff1']))at any given time?mysqli_with prepared statements.