0

My program is not working please tell me the problum in it...

<form action = "http://localhost/third/c2.php" method = "Post">
<pre>    
<input type = 'checkbox' value = 'Stipned' name = 'chk1'/>  stipend </br>
<input type = 'checkbox' value = 'Diciplane' name = 'chk2'/>  Diciplane </br>
<input type = 'checkbox' value = 'Attandance' name = 'chk3'/>  Attandance </br>
<input type = 'checkbox' value = 'Assignment' name = 'chk4'/>  Assignment </br>
<input type = 'checkbox' value = 'Agree' name = 'chk5'/>  Agree </br>

    <input type = "submit" value = 'Go'/>
</pre>
</form>

and the php file is

<?php



    if(isset($_POST['chk5'] && ($_POST['chk5']!==Agree)){  

        echo "sorry you are failed to be selected";
    }

    else {
        $i=1;
            while(isset($_POST['chk&$i']))

            if($_POST['chk&$i']==checked $$ $i<=3 ){

             echo $_POST['chk&$i']. "</br>";

            }
    $i++;
        }




    }

?>
3
Contributors
2
Replies
13
Views
4 Years
Discussion Span
Last Post by YASHASHYA
0

@Misbah khan

My program is not working please tell me the problum in it...

I don't know. What issue are you having?

When you run the code was there an error?

If there is an error then what is the error and line?

What are you trying to do?

0

/***************************************Client Side***************/

<form action="abc.php" method="post">
<input type=text name=c[] />
<input type =text name=c[]/>
<input type=submit name='s1' />
</form>

/*********************** SERVER SIDE ****************************/

<?php
$a= array();
$i=0;
foreach($_POST['c'] as $val)
echo $val;


?>

Enjoy.....!

Edited by YASHASHYA

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.