Welcome Guest, Not a member yet? Register   Sign In
url after using a function
#1

[eluser]poopants[/eluser]
Hi everyone,

I have a small question regarding URL's. I'm justing toying around with CI
and I like it a lot Smile I'm experimenting with a CRUD for an items table.

After following a tutorial online, (and some browsing in the User Guide and Forum)
I managed to get it working.

When I click my add button, the form (I filled in) is captured by the controller, nicely
fed to the models which does the mysql stuff.

However ... after adding an item, my url stays at : <controller>/add
This didn't bother me until I reloaded the page, and noticed the selected item was added
another time.

Probably I'm overlooking some tiny details, but can anyone point out for me where my problem is ?

Many thanks in advance

grtz
PP
#2

[eluser]poopants[/eluser]
Hmm ... seems like I have found a solution
for it, when looking at other tutorials ... Smile

As last rule of my add function, I added :
redirect('list);

(which is the name of the controller)

This seems to do the trick Smile




Theme © iAndrew 2016 - Forum software by © MyBB