Académique Documents
Professionnel Documents
Culture Documents
S.No. Topic 1 2 3 4 5. 6. 7. 8. About PHP Features of PHP Database MySQL Software and hardware requirement Software development Life cycle (Website) Data Dictionary Project Design & coding Conclusion Page No. 2 3 5 6 7-8 9-10 11-25 26
What is PHP?
PHP (recursive acronym for "PHP: Hypertext Preprocessor") is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.
An Introductory Example
<html>
<head> <title>Example</title> </head> <body>
PHP Introduction
PHP is a server-side scripting language.
What is PHP?
PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.) PHP is an open source software PHP is free to download and use
PHP files can contain text, HTML tags and scripts PHP files are returned to the browser as plain HTML PHP files have a file extension of ".php", ".php3", or ".phtml"
What is MySQL?
MySQL is a database server MySQL is ideal for both small and large applications MySQL supports standard SQL MySQL compiles on a number of platforms MySQL is free to download and use
PHP + MySQL
PHP combined with MySQL are cross-platform (you can develop in Windows and serve on a Unix platform)
Why PHP?
PHP runs on different platforms (Windows, Linux, Unix, etc.) PHP is compatible with almost all servers used today (Apache, IIS, etc.) PHP is FREE to download from the official PHP resource: www.php.net PHP is easy to learn and runs efficiently on the server side
There are three main areas where PHP scripts are used.
PHP can be used on all major operating systems, including Linux, many Unix variants (including HP-UX, Solaris and OpenBSD), Microsoft Windows, Mac OS X, RISC OS, and probably others. PHP has also support for most of the web servers today.
Dealing with Forms:One of the most powerful features of PHP is the way it handles HTML forms. The basic concept that is important to understand is that any form element will automatically be available to your PHP scripts.
Security:-
PHP is a powerful language and the interpreter, whether included in a web server as a module or executed as a separate CGI binary, is able to access files, execute commands and open network connections on the server. These properties make anything run on a web server insecure by default. PHP is designed specifically to be a more secure language for writing CGI programs than Perl or C, and with correct selection of compile-time and runtime configuration options, and proper coding practices, it can give you exactly the combination of freedom and security you need. As there are many different ways of utilizing PHP, there are many configuration options controlling its behavior. A large selection of options guarantees you can use PHP for a lot of purposes, but it also means there are combinations of these options and server configurations that result in an insecure setup. The configuration flexibility of PHP is equally rivaled by the code flexibility. PHP can be used to build complete server applications, with all the power of a shell user, or it can be used for simple server-side includes with little risk in a tightly controlled environment. How you build that environment, and how secure it is, is largely up to the PHP developer.
What is MySQL?
(MySQL is a database.) (The data in MySQL is stored in database objects called tables.) (A table is a collections of related data entries and it consists of columns and rows.) (Databases are useful when storing information categorically. A company may have a database with the following tables: "Employees", "Products", "Customers" and "Orders".)
SOME PAGES ARE:Home page, download and user login form, admin login,movie.songs,wallpaper after login form, user edit profile, change password, Edit Songs,Wallpaper,movie query etc. 4. Coding and unit testing: - Here the coding part is done i.e what happens or should happen whenever certain events occur. How the backend works or how the various information as provided by the users are stored at the server. The individual pages are coded and validations are implemented so that a person whether knowing or unknowingly may not enter wrong or in acceptable values in the database so, it is ensured that all the pages work properly during the phase. 5. Integration and Testing: - Here now navigation as provided from one web-page to the other, so that a user may switch from one page to the other website as per his/she requirement. The website is integrated in a such a way that it appears as a single unit. Now, the whole website is tested, i.e. whether the navigations provided are proper, whether the master pages work well, i.e. there is consistency among all pages and whether the user can easily go through each and every page and can access each and every facilities provided to him. 6.
published and make users aware of its functionalities. This includes reaching the administration as how they can be login, and how are able to find out the various information or details about the students and faculties as per requirement. The maintenance includes a small or specified period of time during which if any error occurs, then they have to be elimininated as soon as possible or if some little requirement arises, have to be settled down.
Head.php <?php session_start(); ?> <html> <head><style> body { font-family: Verdana, Arial, Helvetica, sans-serif; background:black; } .s { background: #ffffff url(images/back_all.gif) repeat-x; font: 13px Arial, Helvetica, sans-serif; color: #000000; } .s1 { background: #ffffff url(images/back_all.gif) repeat-x; font: 15px Arial, Helvetica, sans-serif; color:purple; }
</style> <head> <script> var image5=new Image(); image5.src='images/iim-campus.jpg' var image6=new Image(); image6.src='images/3260110889_3de69dffd0_o.jpg' var image7=new Image(); image7.src='images/clg img.jpg' var image8=new Image(); image8.src='images/nm.jpg' </script> </head> </head> <table width="100%" align="center" border='1' height="" cellspacing=0> <tR> <td colspan='2'> <img src='images/images (3).jpg' width="100%" height=230 name='sl'> <script> var step=5; function sli() { if(!document) return false; else document.images.sl.src=eval("image"+step+".src"); if(step<8) step++; else step=5; setTimeout("sli()",2000); } sli();
</script> </td></tr>
<tr> <td background='images/menu.gif' align='center' colspan='2'> <table width="100%" align='center'> <tr><td> <a href='home.php' style='color:white;font-weight:bold;text-decoration:none;fontsize:13pt'>Home</a> </td> <td> <a href='login.php' style='color:white;font-weight:bold;text-decoration:none;fontsize:13pt'>Login</a> </td><td> <a href='viewcourse.php' style='color:white;font-weight:bold;textdecoration:none;font-size:13pt'>View Course</a> </td> <td> <a href='viewSyllabus.php' style='color:white;font-weight:bold;textdecoration:none;font-size:13pt'>View Syllabus</a> </td> <td> <a href='feedback.php' style='color:white;font-weight:bold;text-decoration:none;fontsize:13pt'>FeedBack</a> </td> <td> <a href='aboutus.php' style='color:white;font-weight:bold;text-decoration:none;fontsize:15pt'>About Us</a> </td> </tr> </table></td></tR> <tR> <td width="20%" class='s1' valign='top'> <ul style='color:white'><li><a href='viewfaculty.php' style='color:purple;fontweight:bold;text-decoration:none;font-size:13pt'> View Faculty</a> </li> <br><br> <?php if(isset($_SESSION["iddd"])) { echo "<br><br><li><a href='logout.php' style='color:brown;font-weight:bold;textdecoration:none;font-size:13pt'>Logout</a></li></ul>"; include('comman.php'); $type=$_SESSION["usertype"];
$sql="select * from addnews where tyeps='$type'"; $r=mysql_query($sql); while($row=mysql_fetch_array($r)) { $id=$row[0]; $nname=$row[2]; $message=$row[3]; echo "<marquee direction='up' align='center' height=300 onmouseover='stop()' onmouseout='start()'> <a href='news.php?a=$id'>$nname</a> <br></marquee>"; } } ?> </td><td width="80%" bgcolor='white'> <?php include('head.php'); ?> <center> <span style='font-weight:bold;color:red;'> Welcome To College System <br/> <img src='images/iim_ahmedabad_convocation_20080929.jpg'> <br><br> </span> <?php include('footer.php'); ?> Foot.php </td></tR> <tr BGCOLOR='#cccccc'> <td colspan='2' align='right' style='color:purple;font-weight:bold;'>Copy Right Resevred 2012-2013 <br> <center> <a href='http://www.google.com' style='font-weight:bold;color:purple;textdecoration:'>Google </a> <a href='http://www.mlsu.ac.in' style='font-weight:bold;color:purple;textdecoration:'>MLSU</a></td></tr>
<?php session_start(); include('comman.php'); include('head.php'); ?> <script> function sa() { var x=document.myform.type.value; var y=document.myform.unm.value; var z=document.myform.pass.value; if(x=="Please Select") { alert("Please Select Type"); return false; } if(y=="") { alert("Please Enter UserName"); return false; } if(z=="") { alert("Please Enter Password"); return false; } return true;
} </script> <br><br> <form action='login1.php' method='post' name='myform' onsubmit='return sa()'> <table border='1' cellspacing=0 align='center' width='40%'> <tr><td colspan='2' align='center' style='color:purple;font-weight:bold' bgcolor='pink'>Login</td> </tr> <tr> <td colspan='2' align='center' style='color:Red;font-weight:bold'> <?php echo $_SESSION["errr"]; ?> </td> </tr> <tR> <td style='color:blue;font-weight:bold'> Select Type</td> <td><select name='type'> <option value='Please Select'>Please Select</option> <option value='Faculty'>Faculty</option> <option value='Student'>Student</option> </td> </tR> <tR> <td style='color:blue;font-weight:bold'> User Name </td><td><input type='text' name='unm' value=''></td> </tr> <tR> <td style='color:blue;font-weight:bold'> Password </td><td><input type='password' name='pass' value=''></td> </tr> <tR> <td colspan='2' align='center' style='color:blue;font-weight:bold'> <input type='submit' value='Login'> </td> </tr> </table><br><br> <?php $_SESSION["errr"]=""; include('footer.php');
?> <?php session_start(); include('comman.php'); $type=$_REQUEST["type"]; $_SESSION["usertype"]=$type; $uname=$_REQUEST["unm"]; $pass=$_REQUEST["pass"]; if($type=="Faculty") { $sq="select * from addfaculty where facultyname='$uname' and password='$pass'"; $r=mysql_query($sq); if($row=mysql_fetch_array($r)) { $_SESSION["iddd"]=$row[0]; header("location:newhome.php"); } else { $_SESSION["errr"]="Invalid User Name And Password"; header("location:login.php"); } } if($type=="Student") { $sql="select * from addstudent where studentname='$uname' and password='$pass'"; $r=mysql_query($sql); if($row=mysql_fetch_array($r)) { $_SESSION["iddd"]=$row[0]; header("location:newhome.php"); } else { $_SESSION["errr"]="Invalid User Name And Password"; header("location:login.php"); } } ?> <?php ?>
<?php mysql_connect("localhost","root",""); mysql_select_db("college"); ?> <?php include('comman.php'); include('head.php'); echo "<center><br><br><fieldset style='width:500px; border:3px solid green'> <legend style='color:purple;font-weight:bold'>DownLoad</legend> <table border='1' align='center' cellspacing=0 width='100%'> <tr bgcolor='black'><td style='font-weight:bold;color:brown'>Course Name</td><td style='font-weight:bold;color:brown'>Class Name</td><td style='fontweight:bold;color:brown'>DownLoad</td></tr>"; $sql="select * from syllabus"; $r=mysql_query($sql); while($row=mysql_fetch_array($r)) { $classname=$row[2]; $coursename=$row[1]; $id=$row[0]; $file=$row[3]; echo "<tR><td style='font-weight:bold;color:blue'> $coursename</td><td style='font-weight:bold;color:blue'> $classname</td><td><a href='admin/syllabus/$file'>DownLoad</a></td></tr>"; }
<?php session_start(); include('head.php'); ?> <form action='feddback1.php' method='post'> <center><br><br> <fieldset style='width:600px;border:4px solid green;'> <legend style='font-weight:bold'>FeedBack </legend> <br><br> <table border='1' align='center' width="100%"> <tR><td align='center' style='font-weight:bold;color:purple;font-size:15pt' colspan='2'>Add FeedBack</td></tr> </tR> <tR> <td colspan='2' align='center' style='color:red;font-weight:bold'> <?php echo $_SESSION["err"]; ?> </td> </tR>
<tr> <td style='font-weight:Bold'> Subject</td><td> <input type='text' name='cname' value='' size=50> </td> </tr> <tr> <td style='font-weight:Bold'> Message</td><td> <textarea rows=10 cols=50 name='address'> </textarea> </td> </tr> <tR><td colspan='2' align='center'> <input type='submit' value='Add FeedBack' style='font-weight:bold;color:purple'> </td></tR> </table> </fieldset></center> </form> <br><br><br><br> <?php $_SESSION["err"]=""; include('footer.php'); ?>
<?php include('head.php'); include('config.php'); ?> <table align='center' border='1' bordercolor='purple' width="100%"> <tr><td align='center' style='font-weight:bold;color:blue;font-size:13pt'>Name: </td><td>Anjali and Santosh</td> </tR> <tr><td align='center' style='font-weight:bold;color:blue;font-size:13pt'>College Name: </td><td>AISHWARYA College</td> </tR> <tr><td style='font-weight:bold;color:blue;font-size:13pt' align='center'>Project Name: </td><td>Online College WebSite</td> </tR> <tr><td align='center' style='font-weight:bold;color:blue;font-size:13pt'> Contact No:</td><td>94141698909</td> </tR>
<?php session_start(); include('comman.php'); include('head.php'); $id=$_SESSION["iddd"]; $ty=$_SESSION["usertype"]; if($ty=="Faculty") { $sql="select * from addfaculty where id='$id'"; $r=mysql_query($sql); if($row=mysql_fetch_array($r)) { $photo=$row["photo"]; echo "<p align='right' style='font-weight:bold;color:purple'>Welcome TO". $row[1],"</p>"; echo "<img src='admin/facultyphoto/$photo' height=200 width=233>"; } } if($ty=="Student") { $sql="select * from addstudent where id='$id'"; $r=mysql_query($sql); if($row=mysql_fetch_array($r)) { $photo=$row["photo"]; echo "<p align='right' style='font-weight:bold;color:purple'>Welcome TO". $row[1],"</p>";
<?php include('head.php'); include('comman.php'); $sql="select * from course"; $r=mysql_query($sql); echo " <center><br><br> <fieldset style='width:800px;border:2px solid green'> <legend>Course Name</legend> <table width='100%' cellspacing=0 border='1' align='center'> <tR bgcolor='black'> <td align='center' style='font-weight:bold;color:purple'>Course Name</td><td style='font-weight:bold;color:purple' align='center'>University</td></tr>"; while($row=mysql_fetch_array($r)) { $name=$row[1]; echo "<tr><td align='center' style='font-weight:bold;color:purple'>$name</td> <td style='font-weight:bold;color:purple' align='center'>MLSU</td></tr>";
<?php include('comman.php'); include('head.php'); echo "<center><br><br><fieldset style='width:500px; border:3px solid green'> <legend style='color:purple;font-weight:bold'>DownLoad</legend> <table border='1' align='center' cellspacing=0 width='100%'> <tr bgcolor='black'><td style='font-weight:bold;color:brown'>Course Name</td><td style='font-weight:bold;color:brown'>Class Name</td><td style='fontweight:bold;color:brown'>DownLoad</td></tr>"; $sql="select * from syllabus"; $r=mysql_query($sql); while($row=mysql_fetch_array($r)) { $classname=$row[2]; $coursename=$row[1]; $id=$row[0]; $file=$row[3]; echo "<tR><td style='font-weight:bold;color:blue'> $coursename</td><td style='font-weight:bold;color:blue'> $classname</td><td><a href='admin/syllabus/$file'>DownLoad</a></td></tr>"; } ?>
<?php session_start(); include('comman.php'); include('head.php'); $id=$_SESSION["iddd"]; $ty=$_SESSION["usertype"]; if($ty=="Faculty") { $sql="select * from addfaculty where id='$id'"; $r=mysql_query($sql); if($row=mysql_fetch_array($r)) { $photo=$row["photo"]; echo "<p align='right' style='font-weight:bold;color:purple'>Welcome TO". $row[1],"</p>"; echo "<img src='admin/facultyphoto/$photo' height=200 width=233>"; } } if($ty=="Student") { $sql="select * from addstudent where id='$id'"; $r=mysql_query($sql); if($row=mysql_fetch_array($r)) { $photo=$row["photo"]; echo "<p align='right' style='font-weight:bold;color:purple'>Welcome TO". $row[1],"</p>";
<?php include('comman.php'); include('head.php'); $id=$_GET["s"]; /////////////// WE have to find out the number of records in our table. We will use this to break the pages/////// /// $bgcolor="#f1f1f1"; echo " <br><br> <table border='1' align='center' cellspacing=0 width='90%'> <tr ><td style='color:brown' colspan='7' align='center' style='fontweight:bold;color:purple;font-size:16pt'>Faculty Information:</td></tr> <tr><th style='color:brown'>Faculty Photo</th><th style='color:brown'>Faculty Name</th>
<th style='color:brown'>Qualification</th><th style='color:brown'>Contact No:</th> <th style='color:brown'>Gender</th> <th style='color:brown'>Address</th></tr>"; ////////////// Now let us start executing the query with variables $eu and $limit set at the top of the page/////////// $query=" SELECT * FROM addfaculty"; $result=mysql_query($query); echo mysql_error(); //////////////// Now we will display the returned records in side the rows of the table///////// while($row=mysql_fetch_array($result)) { if($bgcolor=='#f1f1f1'){$bgcolor='#ffffff';} else{$bgcolor='#f1f1f1';} $id=$row[0]; $photo=$row["photo"]; echo "<tr><td><img src='admin/facultyphoto/$photo' height=60 width=100></td>"; echo "<td style='font-weight:bold;color:purple'>".$row[1]."</td>"; echo "<td style='font-weight:bold;color:purple'>".$row[3]."</td>"; echo "<td style='font-weight:bold;color:purple'>".$row[4]."</td>"; echo "<td style='font-weight:bold;color:purple'>".$row[5]."</td>"; echo "<td style='font-weight:bold;color:purple'>".$row[6]."</td>"; } echo "</table>"; ////////////////////////////// End of displaying the table with records //////////////////////// ?><br><br/> <?php include('footer.php'); ?>
<?php session_start(); ?> <html> <head><style> body { font-family: Verdana, Arial, Helvetica, sans-serif; background:black; } .s { background: #ffffff url(images/back_all.gif) repeat-x; font: 13px Arial, Helvetica, sans-serif; color: #000000; } .s1 { background: #ffffff url(images/back_all.gif) repeat-x; font: 15px Arial, Helvetica, sans-serif; color:purple; } </style> <head>
<script> var image5=new Image(); image5.src='images/images (9).jpg' var image6=new Image(); image6.src='images/images (3).jpg' var image7=new Image(); image7.src='images/images (3).jpg' var image8=new Image(); image8.src='images/images (11).jpg' </script> </head> </head> <table width="100%" align="center" border='1' height="" cellspacing=0> <tR> <td colspan='2'> <img src='images/images (3).jpg' width="100%" height=230 name='sl'> <script> var step=5; function sli() { if(!document) return false; else document.images.sl.src=eval("image"+step+".src"); if(step<8) step++; else step=5; setTimeout("sli()",2000); } sli();
<td width="20%" class='s1' valign='top'> </td><td width="80%" bgcolor='white'> <script> function ss() { var x=document.myform.unm.value; var y=document.myform.pass.value; if(x=="") { alert("Please Enter user Name"); return false; } if(y=="") { alert("Please Enter Password"); return false; } return true; } function checkAlpah(e) { //With FireFox Support //var KeyID = (window.event) ? event.keyCode : e.which; var KeyID=(window.event) ? event.keyCode : e.which; //alert(KeyID); if((KeyID >= 68 && KeyID <= 90) ||(KeyID >= 97 && KeyID <= 122) || (KeyID == 43) || (KeyID == 45)|| (KeyID == 8) || (KeyID == 32) || (KeyID == 37) || (KeyID == 39) || (KeyID == 46)) { return true; } return false; } </script> <form action='adminlogin1.php' method='post' name='myform' onsubmit='return ss()'> <center> <fieldset style='width:600px;border:2px solid green' align='center'> <legend style='font-weight:bold;color:purple;'>Admin Login</legend> <br><br><br> <table width="80%" border='1' cellspacing=0 align='center' bordercolor='000000'> <tR>
<td colspan='2' align='center' style='font-weight:bold;color:purple;fontsize:18pt'>Admin Login</td> </tR> <tR> <td colspan='2' align='center' style='color:red;font-weight:bold'> <?php echo $_SESSION["err"]; ?> </td> </tr> <tR> <td align='right' style='font-weight:bold;color:blue;font-size:13pt'>User Name</td> <td align='center'><input type='text' name='unm' value='' onkeypress="return checkAlpah(event);"> </td></tR> <tR> <td align='right' style='font-weight:bold;color:blue;font-size:13pt'>Password</td> <td align='center'><input type='password' name='pass' value=''> </td></tR> <tr><td colspan='2' align='center'> <input type='submit' value='Login'> </tR> </table><br><br> </fieldset></center> <br><br> <?php $_SESSION["err"]=""; include('footer.php'); ?>
<?php include('head.php'); ?> <center> <span style='font-weight:bold;color:red;'> College</center> </span> <?php include('footer.php'); ?>
<?php session_start(); include('head.php'); include('comman.php'); ?> <script> function va() { var sname=document.myform.sname.value; var course=document.myform.course.value; var class1=document.myform.class.value; var con=document.myform.con.value; var address=document.myform.address.value; if(sname=="") { alert('Please Enter Student Name'); return false; } if(course=="Select Course") { alert('Please Select Course'); return false; } if(class1=="Select Class") { alert('Please Select Class'); return false; } if(con=="") { alert('Please Enter Contact No'); return false; } if(address=="") { alert('Please Enter Address'); return false; } return true;
} function checkNumeric(e) { //With FireFox Support var KeyID = (window.event) ? event.keyCode : e.which; //alert(KeyID); if((KeyID >= 48 && KeyID <= 57) || (KeyID == 43) || (KeyID == 45)|| (KeyID == 8) || (KeyID == 32) || (KeyID == 37) || (KeyID == 39) || (KeyID == 46)) { return true; } return false; } function checkAlpah(e) { //With FireFox Support //var KeyID = (window.event) ? event.keyCode : e.which; var KeyID=(window.event) ? event.keyCode : e.which; //alert(KeyID); if((KeyID >= 66 && KeyID <= 90) ||(KeyID >= 97 && KeyID <= 122) || (KeyID == 43) || (KeyID == 45)|| (KeyID == 8) || (KeyID == 32) || (KeyID == 37) || (KeyID == 39) || (KeyID == 46)) { return true; } return false; } </script> <form action='addstudent1.php' method='post' enctype='multipart/form-data' name="myform" onsubmit='return va()'> <center><br><br> <fieldset style='width:600px;border:2px solid green;'> <br><br> <table border='1' align='center' width='100%' cellspacing=0> <tR><td colspan='2' align='center' style='font-weight:bold;color:blue'>Add Student Information</td></tr> </tR> <tR> <td colspan='2' align='center' style='color:red;font-weight:bold'> <?php echo $_SESSION["err1"]; ?> </td>
</tr> <tR> <td style='font-weight:bold;color:purple'> Student Name</td> </td> <td> <input type='text' name='sname' value='' size=30 onkeypress="return checkAlpah(event);"> </td> </tR> <tr> <td style='font-weight:bold;color:purple'> Course Name</td><td> <select name='course'> <?php $sql="select * from course"; $r=mysql_query($sql); echo "<option value='Select Course'>Select Course </option>"; while($row=mysql_fetch_array($r)) { $name=$row[1]; echo "<option value='$name'>$name</option>"; } ?> </select> </td> <tR> <tr><td style='font-weight:bold;color:purple'>Class Name </td> <td> <select name='class'> <option value='Select Class'>Select Class</option> <option value='First Year'>First Year</option> <option value='Second Year'>Second Year</option> <option value='Third Year'>Third Year</option> </select> </td></tr> <tr> <td style='font-weight:bold;color:purple'>Contact No: </td> <td>
<input type='text' name='con' value='' maxlength=10 onkeypress="return checkNumeric(event);"> </td> </tr> <tR> <td style='font-weight:bold;color:purple'>Address</td> <td><textarea name='address'> </textarea> </tr> <tr> <td style='font-weight:bold;color:purple'>Photo</td> <td><input type='file' name='aa'> </tR> <tR> <td colspan='2' align='center' style='font-weight:bold;color:purple'><input type='submit' value='Add Student'> </td> </tr> </table> </fieldset></center> </form> <?php $_SESSION["err1"]=""; include('footer.php'); ?> <?php session_start(); include('comman.php'); $sname=$_POST["sname"]; $course=$_POST["course"]; $class=$_POST["class"]; $cont=$_POST["con"]; $address=$_POST["address"]; move_uploaded_file($_FILES["aa"]["tmp_name"],"studentphoto/".$_FILES["aa"] ["name"]); $photo=$_FILES["aa"]["name"]; $sql="select * from addstudent"; $r=mysql_query($sql); while($row=mysql_fetch_array($r)) { $pass=$row[0]; } $pass=$pass+1; $pass=$pass."122";
$sql="INSERT INTO `college`.`addstudent` (`id`, `studentname`, `coursename`, `classname`, `contactno`, `address`, `photo`, `password`) VALUES (NULL, '$sname', '$course', '$class', '$cont', '$address', '$photo', '$pass')"; $r=mysql_query($sql); if($r) { $_SESSION["err1"]="Student Addded SuccessFully"; header("location:addstudent.php"); } ?>
<?php session_start(); include('head.php'); ?> <script> function va() { var x=document.myform.cname.value; if(x=="") { alert("Please Enter Course Name"); return false; } return true; } </script> <form action='addcourse1.php' method='post' enctype='multipart/form-data' name='myform' onsubmit='return va()'>
<center><br><br> <fieldset style='width:600px;border:4px solid green;height:200px'> <legend>Add Course </legend> <br><br> <table border='1' align='center' width="100%"> <tR><td align='center' style='font-weight:bold;color:purple;font-size:15pt' colspan='2'>Add Course Name</td></tr> </tR> <tR> <td colspan='2' align='center' style='color:red;font-weight:bold'> <?php echo $_SESSION["err"]; ?> </td> </tR> <tr> <td style='font-weight:Bold'> Course Name</td><td> <input type='text' name='cname' value='' size=50> </td> <tR><td colspan='2' align='center'> <input type='submit' value='send'> </td></tR> </table> </fieldset></center> </form> <br><br><br><br> <?php $_SESSION["err"]=""; include('footer.php'); ?>
<html><head> <script> function showstate(str) { var xmlHttp; if(window.XMLHttpRequest) { xmlHttp = new XMLHttpRequest(); } else { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4 ) { document.getElementById('hint').innerHTML = xmlHttp.responseText; } } xmlHttp.open('GET','get2.php?s='+str,true); xmlHttp.send(); }
</script> </head> <?php include('comman.php'); include('head.php'); echo "<fieldset style='width=:500px;border:2px solid purple'>"; $sql="select * from course"; $r=mysql_query($sql); echo "<center><p style='font-weight:bold;color:purple'>Select Course: <select name='cmb' onchange='showstate(this.value)'> <option value='Selct Course'>Select Course</option>"; while($row=mysql_fetch_array($r)) { $name=$row[1]; echo "<option value='$name'>$name</option>"; } ?> </select> <div id='hint'> </div> <?php include('footer.php'); ?>
<?php session_start();
include('head.php'); include('comman.php'); ?> <script> function va() { var sname=document.myform.sname.value; var course=document.myform.course.value; var qual=document.myform.qual.value; var con=document.myform.con.value; var address=document.myform.address.value; if(sname=="") { alert('Please Enter Faculty Name'); return false; } if(course=="Select Course") { alert('Please Select Course'); return false; } if(qual=="") { alert('Please Enter Qualification'); return false; } if(con=="") { alert('Please Enter Contact No'); return false; } if(address=="") { alert('Please Enter Address'); return false; } } function checkNumeric(e) { //With FireFox Support var KeyID = (window.event) ? event.keyCode : e.which; //alert(KeyID);
if((KeyID >= 48 && KeyID <= 57) || (KeyID == 43) || (KeyID == 45)|| (KeyID == 8) || (KeyID == 32) || (KeyID == 37) || (KeyID == 39) || (KeyID == 46)) { return true; } return false; } function checkAlpah(e) { //With FireFox Support //var KeyID = (window.event) ? event.keyCode : e.which; var KeyID=(window.event) ? event.keyCode : e.which; //alert(KeyID); if((KeyID >= 66 && KeyID <= 90) ||(KeyID >= 97 && KeyID <= 122) || (KeyID == 43) || (KeyID == 45)|| (KeyID == 8) || (KeyID == 32) || (KeyID == 37) || (KeyID == 39) || (KeyID == 46)) { return true; } return false; } </script> <form action='addfaculty1.php' method='post' enctype='multipart/form-data' name='myform' onsubmit='return va()'> <center><br><br> <fieldset style='width:600px;border:2px solid green;'> <br><br> <table border='1' align='center' width='100%' cellspacing=0> <tR><td colspan='2' align='center' style='font-weight:bold;color:blue'>Add Faculty Information</td></tr> </tR> <tR> <td colspan='2' align='center' style='color:red;font-weight:bold'> <?php echo $_SESSION["err1"]; ?> </td> </tr> <tR> <td style='font-weight:bold;color:purple'> Faculty Name</td> </td> <td> <input type='text' name='sname' value='' size=30 onkeypress="return checkAlpah(event);">
</td> </tR> <tr> <td style='font-weight:bold;color:purple'> Course Name</td><td> <select name='course'> <?php $sql="select * from course"; $r=mysql_query($sql); echo "<option value='Select Course'>Select Course </option>"; while($row=mysql_fetch_array($r)) { $name=$row[1]; echo "<option value='$name'>$name</option>"; } ?> </select> </td> <tR> <tr><td style='font-weight:bold;color:purple'>Qualification </td> <td> <input type='text' name='qual' value='' size=34 onkeypress="return checkAlpah(event);"> </td></tr> <tr> <td style='font-weight:bold;color:purple'>Contact No: </td> <td> <input type='text' name='con' value='' maxlength=10 onkeypress="return checkNumeric(event);"> </td> </tr> <tR> <tr> <td style='font-weight:bold;color:purple'> Gender</td> <td style='font-weight:bold;color:purple'> <input type='radio' name='r1' value='male'>Male <input type='radio' name='r1' value='male'>FeMale </td> </tR>
</tR> <td style='font-weight:bold;color:purple'>Address</td> <td><textarea name='address'> </textarea> </tr> <tr> <td style='font-weight:bold;color:purple'>Photo</td> <td><input type='file' name='aa'> </tR> <tR> <td colspan='2' align='center' style='font-weight:bold;color:purple'><input type='submit' value='Add Faculty'> </td> </tr> </table> </fieldset></center> </form> <?php $_SESSION["err1"]=""; include('footer.php'); ?>
<script> var image1=new Image(); image1.src='images/images (9).jpg' var image2=new Image(); image2.src='images/images (8).jpg' var image3=new Image(); image3.src='images/download.jpg' var image4=new Image(); image4.src='images/images (11).jpg' </script> </head><center> <img src='images/download.jpg' name='slide' height=200 width='100%'> <br><br><script> var step=1; function slideit() { if(!document) return false; else document.images.slide.src=eval("image"+step+".src"); if(step<4) step++; else step=1; setTimeout("slideit()",2000); } slideit(); </script>
<form action='addsyllabus1.php' method='post' enctype='multipart/form-data'> <center> <fieldset style='width:600px;border:4px solid green;height:200px'> <legend>Add Syllabus </legend> <br><br> <table border='1' align='center' width="100%" cellspacing=0> <tR><td align='center' style='font-weight:bold;color:purple;font-size:15pt' colspan='2'>Add Syllabuse</td></tr>
<tR> <td colspan='2' align='center' style='color:red;font-weight:bold'> <?php echo $_SESSION["err"]; ?> </td> </tr> <tr> <td style='font-weight:Bold' align='center'> Course Name</td><td align='center'> <?php $sql="select * from course"; $r=mysql_query($sql); echo "<select name='cmb' onchange='showstate(this.value)'> <option value='Selct Course'>Select Course</option>"; while($row=mysql_fetch_array($r)) { $name=$row[1]; echo "<option value='$name'>$name</option>"; } ?> </td> </tr> <tR> <tr><td style='font-weight:bold;color:purple' align='center'>Class Name </td> <td align='center'> <select name='class'> <option value='Select Class'>Select Class</option> <option value='First Year'>First Year</option> <option value='Second Year'>Second Year</option> <option value='Third Year'>Third Year</option> </select> </td></tr> <tR> <td style='font-weight:bold;color:purple' align='center'>Attach Syllabus</td> <td align='center'><input type='file' name='aa'></td> </tr> <tR><td colspan='2' align='center'> <input type='submit' value='send'> </td></tR> </table> </fieldset></center>
</form> <br><br><br><br> <?php $_SESSION["err"]=""; include('footer.php'); ?> <?php session_start(); include('comman.php'); $a=$_REQUEST["cmb"]; $class=$_REQUEST["class"]; move_uploaded_file($_FILES["aa"]["tmp_name"],"syllabus/".$_FILES["aa"] ["name"]); $name=$_FILES["aa"]["name"]; $sql="INSERT INTO `college`.`syllabus` (`id`, `coursename`, `classname`, `files`) VALUES (NULL, '$a', '$class', '$name')"; $r=mysql_query($sql); if($r) { $_SESSION["err"]="Syllabus Added SuccessFully"; header("location:addsyllabus.php"); } ?>
<script> function va() { var se=document.myform.type.value; var newsname=document.myform.unm.value; var message=document.myform.message.value; if(se=="Please Select") { alert("Please Select Type Of News"); return false; } if(newsname=="") { alert('Please ENter News Name'); return false } if(message=="") { alert('Please ENter Message'); return false } return true; } </script> <br><br> <form action='addnews1.php' method='post' name='myform' onsubmit='return va()'> <table border='1' cellspacing=0 align='center' width='60%'> <tr><td colspan='2' align='center' style='color:purple;font-weight:bold' bgcolor='pink'>Login</td> </tr> <tr> <td colspan='2' align='center' style='color:Red;font-weight:bold'> <?php echo $_SESSION["errr"]; ?> </td> </tr><tr><td style='color:blue;font-weight:bold' align='center'> Select Type</td> <td align='center'><select name='type' align='center'> <option value='Please Select'>Please Select</option> <option value='Faculty'>Faculty</option> <option value='Student'>Student</option> </td>
</tR> <tR> <td style='color:blue;font-weight:bold' align='center' > News Name </td><td align='center'><input type='text' name='unm' size=50 value='' style='height:30px'></td> </tr> <tR> <td style='color:blue;font-weight:bold' align='center'> Message </td><td align='center'><textarea rows=10 cols=40 name='message'></textarea></td> </tr> <tR> <td colspan='2' align='center' style='color:blue;font-weight:bold'> <input type='submit' value='Login'> </td> </tr> </table><br><br> <?php $_SESSION["errr"]=""; include('footer.php'); ?> <?php session_start(); include('comman.php'); $type=$_REQUEST["type"]; $uname=$_REQUEST["unm"]; $message=$_REQUEST["message"]; $sql="INSERT INTO `college`.`addnews` (`id`, `tyeps`, `newsname`, `message`) VALUES (NULL, '$type', '$uname', '$message')"; $r=mysql_query($sql); if($r) { $_SESSION["errr"]="News Added Successfully"; header("location:addnews.php"); } else { $_SESSION["errr"]="News Not Added"; header("location:addnews.php"); } ?>
Conclusion
Conclusion is the summary of the result obtained. It helps investigating the causes of the deviation and helps the techniques to remove them from developed software THE Entertaiment Website in PHP mySQL has been a creative approach for both the user that are part of the college and others who are just interested in the information about the movie,songs,wallpaper download. The various facilities provided to users and administrators not only helps in having registrations and keep their profiles update but may helpful in asking for query and direct selection of student for placement considering their percentage and sending other information through the message. The development of the website and its implementations has been a work of few days that has been the result of the hard work, toil and learning of the developmental technologys
The project can be enhanced in the future very easily. It is very easy to expand this project so that it can be used in a large scale in market, indutry. Although the project has been designed with great care and keeping all the points in mind; still there may be certain points left away and can be added. So the project allows various amendments in future. Suggestion and advices are always welcomed.