FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » test if $_POST variable is set
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: test if $_POST variable is set [message #175837 is a reply to message #175831] Sat, 29 October 2011 18:39 Go to previous message
cerr is currently offline  cerr
Messages: 33
Registered: September 2010
Karma:
Member
On Oct 28, 10:40 pm, cerr <ron.egg...@gmail.com> wrote:
> Hi There,
>
> I have a form with various checkboxes, they got names i have from a db
> to identify them.
> Now I would like to check what has been posted by the form. For that I
> would like to read all the field names from the db and check if they
> have been set something like this:
>
>           $result = mysql_query("SELECT * FROM specialty");
>           while($row = mysql_fetch_array($result)) {
>             if (isset($_POST[$row['name']])) {
>               var_dump($POST);
>               session_unset();
>             }
>
> But this doesn't seem to work the way I expected it to? I.e. I would
> liek to check if $_POST['MyCheckbox'] is set now but MyCheckbox is a
> name from the database. How do I do this best, the easiest way?
>

Thanks for all the replies you guys, I actually got it resolved that I
posted the values with an integer index and to receive i would just
loop with a for loop through all the results and then i can fetch data
from the db that are indexed the with the same identifier.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: `********AMAZING HOT PHOTOS & VIDEOS ********
Next Topic: Suche Buch zur OOA/OOD
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 01:35:00 GMT 2024

Total time taken to generate the page: 0.03457 seconds