[Not Working]Do something when Input Button is submited |
[eluser]flyenig[/eluser]
EDIT:Changed a few things Hello. simple Question: how can i run a query or something when someone clicks on a button? This is my stuff, but its not working the controller: Code: //This displays friend requests, and i can approve them here The view: Code: <form action="<?php echo $action; ?>" style="display:block"> What am i doing wrong?
[eluser]flyenig[/eluser]
yes ive read the user guide. but i cant find what im looking for
[eluser]Colin Williams[/eluser]
Look again at the Controllers page. It will reveal how to use the URI to pass parameters to the controller. Then look at the URI Class to see various ways to access the URI parameters
[eluser]flyenig[/eluser]
Ok i changed the Question because im using forms now. Well now that im using this method, its not working. What am i doing wrong?
[eluser]Colin Williams[/eluser]
You are missing key knowledge on how this whole game works. Maybe start here http://www.w3schools.com/php/php_forms.asp
[eluser]flyenig[/eluser]
im not new to php, im just new to the forums, and ive been working with codeigniter for a while now, its just this simple thing that i do not get. Like everytime i click on, for example, deny, it takes me to a blank page with the url http://localhost/www/cl/index/site/process_req?
[eluser]Colin Williams[/eluser]
Didn't claim you were new to anything, just missing a lot of pieces. You might be able to program a lunar mission in PHP, but I just recognize that you are missing very basic Web development fundamentals. First, your buttons contain no "name" attributes. Look at the HTTP Request you are sending and you'll see the problem that causes. And I don't know what your $action variable contains, but whatever is there is why your form is going where it is going.
[eluser]flyenig[/eluser]
Ok I appologize, I didn't put enough of my code on here and yea wow I forgot the name attributes lol Since im typing this from my ipod, Tomorrow I'll post more of my code so I can get more help and so u guys can understand what I need help with. But thank you for ur help so far
|
Welcome Guest, Not a member yet? Register Sign In |