Sunteți pe pagina 1din 4

Warning: session_start() [function.

session-start]: Cannot send session cache lim iter - headers already sent (output started at C:\wamp\www\onlinegradeinquiry\st udent\home.php:2) in C:\wamp\www\onlinegradeinquiry\student\lock.php on line 2 Warning: Cannot modify header information - headers already sent by (output star ted at C:\wamp\www\onlinegradeinquiry\student\home.php:2) in C:\wamp\www\onlineg radeinquiry\student\lock.php on line 15 ?>

http://sourceforge.net http://www.zend.com http://www.extremeprogramming.org Apache tomcat 6.0 https://auth.netacad.net/idp/Authn/NetacadLogin Class id 3914403 Who asks and answers the secret of love? I am like a bird but I have one wing I could not fly so that where is my lover who she has one wing like me that she want to share her wing with my wing to fly together like bird flies? TblSubjects ----------SubjectID VARCHAR(10) SubjectName VARCHAR(100) SubjectDescription VARCHAR(100) IsActive BIT TblQuestions -----------QuestionID VARCHAR(10) SubjectID VARCHAR(10) Question VARCHAR(MAX) Option1 VARCHAR(MAX) Option2 VARCHAR(MAX) Option3 VARCHAR(MAX) Option4 VARCHAR(MAX) CorrectAnswer VARCHAR(MAX) IsActive BIT TblAnswers ---------AnswerID VARCHAR(10) RegistrationID VARCHAR(10) QuestionID VARCHAR(10) SelectedAnswer VARCHAR(MAX) TblExam ------ExamID VARCHAR(10) ExamDescription VARCHAR(100) ExamDate DATETIME TimeDuration INT NoOfQuestions INT

TblRegistration --------------RegistrationID VARCHAR(10) UserID VARCHAR(10) Password VARCHAR(100) CandidateName VARCHAR(100) Address VARCHAR(100) Email VARCHAR(100) RegistrationDate DateTime ExamID VARCHAR(10)

<? $host $user $pass $db

= = = =

"127.0.0.1"; ""; ""; "";

$connection = mysql_connect($host, $user, $pass); mysql_select_db($db); $number_of_scripts = 5; //Randomise the table. $update = "update scripts set random_order = 65536 * rand(random_order)"; mysql_query($update); //Retrieve from the beginning and the end. $upper_limit = floor($number_of_scripts / 2); $lower_limit = $number_of_scripts - $upper_limit; $select = "(select id, name from scripts order by random_order limit " . $upper_ limit . ")" . " union " . "(select id, name from scripts order by random_order desc limit " . $l ower_limit . ")" . " order by name"; $scripts = mysql_query($select); $index = 0; ?> <html> <head> <title>Random MySQL Result Set</title> </head> <body> <? while($script = mysql_fetch_assoc($scripts)) { ?> <a href="http://scripts.franciscocharrua.com/<?= $script["name"] ?>.php" target= "blank"> <?= $script["name"] ?></a><br /> <? } ?> </body </html> ///////////////////////////////////////// create table scripts (

id int primary key auto_increment, name tinytext, random_order int ); insert into scripts (name) values ('absolute-include'); insert into scripts (name) values ('database-file-upload-download'); insert into scripts (name) values ('email'); insert into scripts (name) values ('forum_threads'); insert into scripts (name) values ('link-words'); insert into scripts (name) values ('login'); insert into scripts (name) values ('params'); insert into scripts (name) values ('upload'); insert into scripts (name) values ('users'); insert into scripts (name) values ('mouse-events'); insert into scripts (name) values ('countdown-clock'); insert into scripts (name) values ('dhtml_layers'); insert into scripts (name) values ('javascript_cookies'); insert into scripts (name) values ('javascript-get-variables'); insert into scripts (name) values ('xray'); insert into scripts (name) values ('ssl-whm'); insert into scripts (name) values ('ftp-client'); //////////////////////////////////////////////////////////////////////////////// / <html> <head> <title>Paging Using PHP</title> </head> <body> <?php $dbhost = 'localhost:3036'; $dbuser = 'root'; $dbpass = 'rootpassword'; $rec_limit = 10; $conn = mysql_connect($dbhost, $dbuser, $dbpass); if(! $conn ) { die('Could not connect: ' . mysql_error()); } mysql_select_db('test_db'); /* Get total number of records */ $sql = "SELECT count(emp_id) FROM employee "; $retval = mysql_query( $sql, $conn ); if(! $retval ) { die('Could not get data: ' . mysql_error()); } $row = mysql_fetch_array($retval, MYSQL_NUM ); $rec_count = $row[0]; if( isset($_GET{'page'} ) ) { $page = $_GET{'page'} + 1; $offset = $rec_limit * $page ; } else {

$page = 0; $offset = 0; } $left_rec = $rec_count - ($page * $rec_limit); $sql = "SELECT emp_id, emp_name, emp_salary ". "FROM employee ". "LIMIT $offset, $rec_limit"; $retval = mysql_query( $sql, $conn ); if(! $retval ) { die('Could not get data: ' . mysql_error()); } while($row = mysql_fetch_array($retval, MYSQL_ASSOC)) { echo "EMP ID :{$row['emp_id']} <br> ". "EMP NAME : {$row['emp_name']} <br> ". "EMP SALARY : {$row['emp_salary']} <br> ". "--------------------------------<br>"; } if( $page > 0 ) { $last = $page - 2; echo "<a href=\"$_PHP_SELF?page=$last\">Last echo "<a href=\"$_PHP_SELF?page=$page\">Next } else if( $page == 0 ) { echo "<a href=\"$_PHP_SELF?page=$page\">Next } else if( $left_rec < $rec_limit ) { $last = $page - 2; echo "<a href=\"$_PHP_SELF?page=$last\">Last } mysql_close($conn); ?>

10 Records</a> |"; 10 Records</a>";

10 Records</a>";

10 Records</a>";

///////////////////////////////////////////////////////// setTimeout(function() { window.close(); }, 300000);

S-ar putea să vă placă și