Part of the EllisLab Network
   
 
Display results from a form on the same page
Posted: 15 May 2008 09:47 PM   [ Ignore ]  
Summer Student
Total Posts:  6
Joined  2008-05-15

I know this is probably a stupid question but I am new to this.  I have a form which submits and I want the results to display on the same page I submitted the form from. 

Could someone point me in the right direction.

Profile
 
 
Posted: 15 May 2008 09:52 PM   [ Ignore ]   [ # 1 ]  
Grad Student
Avatar
Rank
Total Posts:  36
Joined  2008-02-12

You can submit the form to a controller that loads the same view. This will result in the page being reloaded, but it will be the same page.

You can also try using an Ajax library like JQuery.

 Signature 

Zoe and Gavin
Gavin on PHP

Profile
 
 
Posted: 16 May 2008 06:02 AM   [ Ignore ]   [ # 2 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  758
Joined  2007-09-25

check out the validation section of the documentation there is example code on how to do exactly what you want.

http://codeigniter.com/user_guide/libraries/validation.html

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 59087 Total Logged-in Users: 17
Total Topics: 70111 Total Anonymous Users: 1
Total Replies: 377919 Total Guests: 196
Total Posts: 448030    
Members ( View Memberlist )