On attendence project

It is my online attendence system project

Page 1 of 1

2 Replies - 398 Views - Last Post: 20 November 2010 - 09:02 AM Rate Topic: -----

#1 menuarora  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 20-November 10

On attendence project

Posted 20 November 2010 - 01:15 AM

it is my online attendence project in this first i enter the attendence through a form in database after that i want to fetch only attendence and rollno from the database i want each rollno must be unique but there is duplicate value when i fetch the attendence after that when i fetch attendence i want the attendence must be in 40 columns and each coloum must take unique value but each row contain only single value in 40 coloums and when i enter another attendence of the same student then again same rollno appear and now entered value appear in 40 coloums and and when i want to fetch value in where clause the while condition takes an error and display while condition must be only one parameter plz help me for this code here i attach fetch page

<html>
<head>
<title>teacher</title>
</head>
<body>
<?php
$rollno=$_POST['rollno'];
	$att=$_POST['att'];
	
if($_POST["submit"]=="submit")
{
     DEFINE ('DB_USER', 'root');
DEFINE ('DB_PASSWORD', '');
DEFINE ('DB_HOST', 'localhost');
DEFINE ('DB_NAME', 'gndp');
$dbc = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() );
mysql_select_db (DB_NAME) OR die ('Could not select the database: ' . mysql_error() );
$result = mysql_query("SELECT * FROM atten");

echo "<table border='1' width='100%' height='100%'>
<tr>
<th>rollno</th>
<th colspan=8>monday</th>
<th colspan=8>tuesday</th>
<th colspan=8>wednesday</th>
<th colspan=8>thrusday</th>
<th colspan=8>friday</th>

</tr>";

while($row = mysql_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . $row['rollno'] . "</td>";
  echo "<td>" . $row['att'] .  "</td>";
    echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";

echo "<td>" . $row['att'] .  "</td>";
    echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";

echo "<td>" . $row['att'] .  "</td>";
    echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";

echo "<td>" . $row['att'] .  "</td>";
    echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";

echo "<td>" . $row['att'] .  "</td>";
    echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";
echo "<td>" . $row['att'] . "</td>";


  echo "</tr>";
  }
echo "</table>";

mysql_close( );
}
?>
<form name="submit" action="fetch1.php" method="post">
   
<input type="submit" name="submit" value="submit">
   </form> 
</body>
</html> 


MOD EDIT: Moved code into post. Please post your code IN YOUR POST, not as an attachment, and use CODE TAGS to do so:

:code:

Attached File(s)


This post has been edited by JackOfAllTrades: 20 November 2010 - 05:33 AM


Is This A Good Question/Topic? 0
  • +

Replies To: On attendence project

#2 ellisgl  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 9
  • View blog
  • Posts: 161
  • Joined: 10-November 07

Re: On attendence project

Posted 20 November 2010 - 03:07 AM

Could you provide the scheme for your table?
Was This Post Helpful? 0
  • +
  • -

#3 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2889
  • View blog
  • Posts: 10,002
  • Joined: 08-August 08

Re: On attendence project

Posted 20 November 2010 - 09:02 AM

I'd be happy with actual sentences! I get dizzy trying to read that run on sentence. :wow:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1