Ughhh. Feel really stupid... Forgot to set the method attribute in the <form> tag to post. Wow.
Thanks Anthony! On Sunday, August 11, 2013 6:06:33 PM UTC-4, Anthony wrote: > > request.vars.idnum > > GET variables are in request.get_vars, POST variables are in > request.post_vars, and request.vars includes both the GET and the POST vars. > > Anthony > > On Sunday, August 11, 2013 5:52:43 PM UTC-4, Hunt wrote: >> >> Really stupid question here... but I can't seem to figure it out. In PHP >> when passing url params for say: www.mysit.com/index?name=steve I would >> use: >> >> $_GET["name"] >> >> In web2py I know you can get stuff via request.vars.someNameAttributefor >> stuff like what text is within <input> box. But how do I get params >> straight from the url string? Specifically I have form like this: >> >> <form action="add_comment?idnum=5"> >> <input type="text" name="comment_text"/> >> <input type="submit"/> </form> >> >> In the controller def add_comment(), how do I get that the idnum is 5??? >> I've been trying request.vars.idnum but this doesn't return anything. Am >> I not calling it right? Or is there some issue with the way I'm passing it >> in the "action" attribute? >> >> Thanks, Hunt >> >> >> -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.