It's better to separate the input from the update.
Is there a maximum number of categories that anyone can enter?
Is there a predefined set of categories that the user could choose from?
If the max number is 5, say, then
<form action="update.php" method="post">
Enter your name <input type="text name="name"> <br>
Enter Categories<br>
<? for ($i=0; $i<5; $i++) { ?>
<?=$i+1?> <input type="text" name="category[]" ><br>
<? } ?>
Or, iff there is a predefined set of categories you may want to consider a list that the user can select from.
Select categories
<select name="category[]" size="10" multiple>
<option value="biology"> biology</option>
<option value="physics"> physics</option>
<option value="chemistry"> chemistry</option>
<option value="maths"> maths</option>
<option value="english"> english</option>
<option value="french"> french</option>
<option value="latin"> latin</option>
/ etc /
</select>
<input type="submit" value="Submit">
</form>
In update.php you can process each posted category with a [man]foreach[/man] loop
<?
$name = $_POST["name"];
mysql_query ("INSERT INTO member (name) VALUES ('$name')";
$id = mysql_insert_id();
foreach ($_POST["category"] as $cat) {
$sql = "INSERT INTO category (id,category) VALUES ($id,' $cat')";
myql_query("$sql);
}
header("location: another.php"); /* redirect to another page */
?>
hth