How to write and read to external memory using SPI (Chip used: 25LC1024)

 invalue = SPI.transfer(address & 255);

There is no way this can work because in order to shift out the data the chip needs the full address. Since the same clock is use for input and output it won't have the full address until this transaction is done, at which time it has already sent the output bits. In Figure 2-1 you see that all 24 address bits go in before the data bits start to come out.

Change it to:

       SPI.transfer(address & 255);   // 3rd byte of address
       invalue = SPI.transfer(0);        // Clock out the data