Simple controller is not so simple,Trying to animate with Bools

I’m struggling to get this script to run, I would really appreciate the help, this is my first script for animating the legs of my character, what am I doing wrong? I’m trying to set bools to false/positive with getkeydown and getkeyup for idle, walking forward, walking back, left, and right.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class walk1 : MonoBehaviour
{

 public Animator anim;
 // Use this for initialization
 void Start()
 {
     anim = GetComponent<Animator>();
 }

 // Update is called once per frame
 void Update()

{
if (Input.GetKeyDown(KeyCode.W))
{
anim.SetBool(“forward”, true);

}

if (Input.GetKeyDown(KeyCode.A))
{
    anim.SetBool("left", true);

}

if (Input.GetKeyDown(KeyCode.S))
{
    anim.SetBool("back", true);

}

if (Input.GetKeyDown(KeyCode.D))
{
    anim.SetBool("right", true);

}

if (Input.GetKeyUp(KeyCode.W))
if (Input.GetKeyUp(KeyCode.A))
if (Input.GetKeyUp(KeyCode.S))
if (Input.GetKeyUp(KeyCode.D))
{
    anim.SetBool("idle", true);

}

}

Dont do it like this.

It is less painful if you just used Input.GetAxis()

Try this code :