Forum: Ruby on Rails sending a response back to a PHP site from rails application

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
661ae6e97d0e16c2af2aaf7d197e8387?d=identicon&s=25 Sijo k g (sijo)
on 2008-10-23 13:27
Hi
   I have an existing php application running commercially..Now I have a
new rails application..So I have three fields like user_name ,password
and company in the php page .Which when submitting connecting to my
rails application ..To elaborate
suppose I enter

username= user1
password = pass1
company = company1

    Then when submitting the php page it should goes to my rails
application on port 3000 This I could do..Similary if I give a different
company name then it wii be connected to my rails application on port
3001

       Now my request is if anything error happens for wrong password or
wrong company name (for example)  I need to redirect from rails
controller action to the php login page it self..This I dont know how to
do...I am totally new to this type of interconnecting two
platforms...Could you please help me to solve this problem


Thanks in advance
Sijo
C1071f217bcdd54ab8ee844489eead96?d=identicon&s=25 Ajit Singh (ajitscorpio)
on 2008-10-23 21:01
(Received via mailing list)
you must have some kind of authentication system in Rails app.

so after comparing posted values..

 if user exists then redirect_to "home/index" [home is controller and
index action for rails app]
else
redirect_to "http://abc.com/login.php"

let me know

Ajit
This topic is locked and can not be replied to.