you can DL the code from this link: http://test.mr-potatoes.com/app.rar
[cliff's notes]: basically i'm not passing the parameter thru the URL or even getting it thru the form and getting it into the hyperlink. i see that no matter what i do i can't seem to get it. i've made another page to get the information and put it in there but it doesn't seem to work. not to mention that i can't get the information anyways from that new file. so i'm a little at ends here as how to solve this little problem i have here. help would be greatly appreciated
i don't think it's nessessary to post all the code here but i'll post snippets. you can DL the full source if you can't help me from what i have
you'll notice that the first link works just fine. that's not the one. that one uses java script and i was hoping to not have to do that. the second link you see that you can get in fine but you'll also notice that when you try to do the add operation it doesn't do anything. that is because i was trying to send the URL data thru a hyperlink in a form. maybe it's not the best way but i figured it would be ok. you'll also notice that no matter what numbers/letters you but in there you'll still get zeros. i echoed then out at the bottom for referance. it's easier to understand me
the view file has this one line that is supposed to put stuff into the URL for you to get the information from.
Code: Select all
<a href="http://localhost/framework/index.php?name=base&command=sum&a=<?=$this->model->a?>&b=<?=$this->model->b?>"> add</a>Code: Select all
$gets = $this->get_params();
if (isset ($gets['command']))
$this->model->command = $gets['command'];
if (isset ($gets['a']))
$this->model->a = $gets['a'];
if (isset ($gets['b']))
$this->model->b = $gets['b'];
if (!isset ($gets['command']))
$this->model->command = "index";
// set default view
$this->setView("plugins/_base/views/index.tpl");
switch ($this->model->command)
{
case 'index':
break;
case 'sum':
$this->model->calcSum();
break;
}