PHP:
void usrt_init()
{
SYNC=0;
BRGH=1;
SPEN=1;
CREN=1;
RX9=0;
SPBRG=10;
GIE=1;
PEIE=1;
RCIE=1;
RCIF=0;
}
Now, when any data is received then interrupt will occur. Then in interrupt service routine, if(RCIF==1) then collect the received value from RCREG register and clear RCIF. Choose SPBGR and BRGH value according to the baud rate requirement.
check datasheet of PIC16F87XA: page no 114. (hope you checked this since you already transmitted data)
or You can do it without interrupt also...In this case, you need to disable interrupt (RCIE=0); then you can check the status of RCIF periodically and if it become 1then clear it and read the received data from RCREG.