I got a form that I am going to use when I change articles in my mysql database. So when I click the Edit button, this php script is called:
<?php
if (isset($_POST['action']) and $_POST['action'] == 'Edit')
{
include 'connect.php';
$id = mysqli_real_escape_string($link, $_POST['id']);
$sql = "SELECT id, namn, artikel FROM artiklar WHERE id='$id'";
$result = mysqli_query($link, $sql);
while ($row = mysqli_fetch_array($result))
{
include 'testing.php';
}
exit();
}
?>
The testing php file looks like this:
<form action="" method="post">
<div>
<input name="" type="text" style="width:300px;" value="<?php echo $row['namn']; ?>" />
<br />
<br />
<textarea name="" cols="30" rows="30" value="<?php echo $row['artikel']; ?>"></textarea>
</div>
</form>
The problem is that it will not echo all the text in the mysql data field, only some of it. If I dump the form and only write:
"<?php echo $row[‘artikel’];
… it works just fine. What am I missing?
Thank you very much for your help!