need help in sort

i have a program

#!/bin/ksh

echo "enter the id"
read id
echo "enter the name"
read name

if [ "$name" == "rose" ] && [ $id == 1111 ]
then
echo "u r logged in"
echo $name > data.txt
echo $id > data.txt
else

echo "invalid id or name"
fi
--------------------------------------------------------------------

i just want that the file data.txt should not contain any duplicate value.
plz help me in this
it should had only values 1111 rose,no matter how many times i execute the prgm.
also it is not storing the valkue of "rose" in data.txt
thanks in advance

You need to first brush up on shell redirection i.e. a,b,c of shell scripting.

i got the answer anyway thanks for ur suggestion.................