This script allows the user to store a word in the database:

*submit.php* script:

```
<html>
<body>

<form action="welcome.php" method="post">
Sentance: <input type="text" name="name"><br>
<input type="submit">
</form>

</body>
</html> 

```

*welcome.php* script :

```
<html>
<body>
<?php 
echo $_POST["word"];

mysql_connect("xxxx","xxxx","xxxx");
mysql_select_db("xxxx");
$word1 = $_POST['word'];
mysql_query("INSERT INTO words VALUES ('$word1');");
?>
<br>

</body>
</html> 

```

The problem is that if a user submitted a word containing an apostrophe, it doesn't get stored in the database.

for example word: 

```
hello'world

```

doesn't get stored because it contains an apostrophe..

How can I fix this issue?