Welcome Guest, Not a member yet? Register   Sign In
Best way to add/edit a listing
#4

[eluser]Rick Jolly[/eluser]
No need for the null parameter. Just use a default parameter in the index method signature.
Code:
function index($id = null)
{
   if (isset($id))
   {
       // editing
   }
   else
   {
       // adding
   }
}


Messages In This Thread
Best way to add/edit a listing - by El Forum - 10-31-2008, 06:06 PM
Best way to add/edit a listing - by El Forum - 10-31-2008, 06:30 PM
Best way to add/edit a listing - by El Forum - 10-31-2008, 06:47 PM
Best way to add/edit a listing - by El Forum - 10-31-2008, 09:30 PM
Best way to add/edit a listing - by El Forum - 11-01-2008, 03:15 AM
Best way to add/edit a listing - by El Forum - 11-01-2008, 05:48 AM
Best way to add/edit a listing - by El Forum - 11-01-2008, 10:13 AM
Best way to add/edit a listing - by El Forum - 11-01-2008, 10:58 AM
Best way to add/edit a listing - by El Forum - 11-01-2008, 12:06 PM
Best way to add/edit a listing - by El Forum - 11-01-2008, 06:23 PM
Best way to add/edit a listing - by El Forum - 11-01-2008, 06:24 PM
Best way to add/edit a listing - by El Forum - 11-01-2008, 07:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB