Cognitive radio and cooperative networks are increasingly regarded as revolutionary technologies that utilise the radio spectrum efficiently. In this study, spectrally encoded (spread-time) code division multiple access (SE-CDMA) scheme is proposed as a flexible and adaptable technique for physical layer of cognitive relay networks. All primary and secondary users transmit their signals to a common base station (BS) and then the BS selects one of the cognitive secondary users based on feedback information to relay the primary user's (PU's) data. To study the efficiency of the system, two scenarios are considered. In the first scenario, the secondary users transmit their information using the SE-CDMA technique and the PU is considered narrowband. In the second scenario, both primary and secondary users utilise the SE-CDMA technique. The performance of the system is evaluated in terms of the error probability of the PU, the outage probability of the primary and secondary users and comparing theoretical results with simulations. Moreover, the performance of the proposed method is compared with orthogonal frequency division multiple access-based cognitive relaying scheme. The results indicate the efficiency of the SE-CDMA technique.