Expand|Select|Wrap|Line Numbers
- <?php
- include 'C:/wamp/www/micropos/condb1.php';
- $con = mysql_connect("localhost","root","");
- if (!$con)
- {
- die('Could not connect: ' . mysql_error());
- }
- mysql_select_db("customer", $con);
- $i=0;
- $i++;
- for($i=0;$i<0;$i++){
- $amount = $_POST[''.$i];
- }
- for($i=1;$i<3;$i++){
- if(isset($_POST['cd'.$i]) && $_POST['cd'.$i] == 'checked')
- {
- echo " Access.";
- }
- else
- {
- echo isset($_POST['$i']);
- echo "Do not access.";
- }
- }
- if(isset($_POST['submit'])){
- echo "checked";
- }
- else
- {
- echo "unchecked";
- }
- $username=$_POST[''];
- $query = "SELECT * FROM reg_form WHERE username='ks'";
- $query = "SELECT * FROM reg_form WHERE username='kodis'";
- $result = mysql_query($query)
- or die("SELECT Error: ".mysql_error());
- $num_rows = mysql_num_rows($result);
- print "There are $num_rows records.<P>";
- print "<table width=800 border=1>\n";
- while ($get_info = mysql_fetch_row($result)){
- print "<tr>\n";
- foreach ($get_info as $field)
- print "\t<td><font face=arial size=3/>$field</font></td>\n";
- print "<input type=\"hidden\" name=\"username\" value=\"$get_info[1]\">";
- print "</tr>\n";
- }
- print "</table>\n";
- ?>
please help me to solve the problem.thanks