Sijo Kg
2008-Oct-23 11:27 UTC
sending a response back to a PHP site from rails application
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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ajit
2008-Oct-23 16:44 UTC
Re: sending a response back to a PHP site from rails application
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 On Oct 23, 7:27 am, Sijo Kg <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> 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 > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---