Need help with Scripting diff command

Here is where I am at so far.....
-------------------------
#!/bin/bash
echo "Enter the output file name"
read output_file
echo "Enter the Orginal file Name"
read write_file
d= ' diff $write_file $output_file '
if $d = 1 ;then
echo "files are not identical"
else
echo "they areidential"
fi
-------------------

I am not sure what I am doing wrong, and I am new at this
so it could be something small..

Perhaps try

d=$(diff $write_file $output_file)

not sure about your d=1 logic ??
I think you want to see if d is blank or has something in it.
Perhaps the difference in files is a '1'

Maybe you want only to get the "$?" result for that matter:

#!/bin/bash
echo "Enter the output file name"
read output_file
echo "Enter the Orginal file Name"
read write_file
diff $write_file $output_file > /dev/null
if [ $? = 0 ];then
echo "files are identical"
else
echo "they are not identical"
fi