Php-js Determine whether the text box is empty, why my code can not judge, on the pointing

Source: Internet
Author: User
Keywords PHP HTML Javascrpit
Phphtmljavascrpit

$conn = mysql_connect (' localhost ', ' root ', ' admin ') or die (' could not connect: '. Mysql_error ());
mysql_select_db (' sybgtjxt ') or die (' could not select database ');
mysql_query ("Set names GBK");

?>


Lab Report Submission System
H2, font {font-style:oblique; color: #FCC898; font-weight:normal id=top; valign =top; position:relative;} function Yanzheng () {var cname = document.getElementById ("CNAME"). value; var tname = document.getElementById ("Tname"). Value var Ppro = document.getElementById ("Ppro"). Value; var pgrade = document.getElementById ("Pgrade"). Value; var pcol = document.getElementById ("Pcol"). Value; var pcutdate = document.getElementById ("Pcutdate"). Value; var pname = document.getElementById ("PName"). Value; var paim = Document.form1.paim.value; var pcontent = document.getElementById ("Pcontent"). Value; var pstep = document.getElementById ("Pstep"). Value; var Panalyse = document.getElementById ("Panalyse"). Value; var presult = document.getElementById ("Presult"). Value; This function does not implement if (cname== ") {Window.alert (" Please enter all contents "); return false;}} function Reset () {document.getElementById ("CNAME"). Value = ""; document.getElementById ("Tname"). Value = 0; document.getElementById ("Ppro"). Value = 0; Document.geteleMentbyid ("Pgrade"). Value = 0; document.getElementById ("Pcol"). Value = 0; document.getElementById ("Pcutdate"). Value = ""; document.getElementById ("PName"). Value = ""; document.getElementById ("Paim"). Value = ""; document.getElementById ("Pcontent"). Value = ""; document.getElementById ("Pstep"). Value = ""; document.getElementById ("Panalyse"). Value = ""; document.getElementById ("Presult"). Value = "";} function Yyyymmddstart () {monhead = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];///give under decade the contents of the frame var y = new Date (). getf Ullyear (); for (var i = (y-30); i < (y+30); i++)//Based on this year, first 30 years, 30 years after Document.form1.YYYY.options.add (new Option ("" + I, i)); Assigns the month drop-down box for (var i = 1; i < i++) {if (i>=1&&i<10) Document.form1.MM.options.add (New Option ("" + "0" + I, i)); else{Document.form1.MM.options.add (New Option ("" +i, I));}} Document.form1.YYYY.value = y; Document.form1.MM.value = new Date (). GetMonth () + 1; var n = monhead[new Date (). GetMonth ()]; if (new Date (). GetMonth () ==1 &AMP;&Amp Ispinyear (Yyyyvalue)) n++; Writeday (n); Assignment Date drop-down box Document.form1.DD.value = new Date (). GetDate (); } if (document.attachevent) window.attachevent ("onload", Yyyymmddstart); else Window.addeventlistener (' Load ', Yyyymmddstart, false); function Yyyydd (str)//year changes in date (mainly judging leap common year) {var mmvalue = document.form1.mm.options[ Document.form1.mm.selectedindex].value; if (Mmvalue = = "") {var e = Document.form1.DD; Optionsclear (e); return;} var n = monhead[mmvalue-1]; if (Mmvalue ==2 && ispinyear (str)) n++; Writeday (N)} function MMDD (str)//month changed date linkage {var yyyyvalue = document.form1.yyyy.options[ Document.form1.yyyy.selectedindex].value; if (Yyyyvalue = = "") {var e = Document.form1.DD; Optionsclear (e); return;} var n = monhead[str-1]; if (str ==2 && ispinyear (yyyyvalue)) n++; Writeday (N)} function Writeday (n)//The drop-down box of the conditional write date {var e = Document.form1.DD; Optionsclear (e); for (var I=1; i< (n+1); i+ +) E.options.add (new Option ("" + I, I));} function Ispinyear (year)//Determine if leap common year {RETurn (0 = = year%4 && (year%100!=0 | | year%400 = 0)); } function Optionsclear (e) {e.options.length = 1;}



Onsubmit= "return Yanzheng ();" >
        

        

Job Placement

Course Name:
Instructor: Please select /option>!--? php $sql = "Select Tname from Tblteacher", $result = mysql_query ($sql); while ($row = Mysql_fetch_ Assoc ($result)) {?>     :
Please select
!--? php $sql = "Select Colna Me from college ";
$result = mysql_query ($sql);
while ($row = Mysql_fetch_assoc ($result)) {
,

Special     :


Select
!--? php $sql = "Select Pro_name from Pro";
$result = mysql_query ($sql);
while ($row = Mysql_fetch_assoc ($result)) {
,

Year     :


Select
!--? php $sql = "Select Sgrade from Tblstudent";
$result = mysql_query ($sql);
while ($row = Mysql_fetch_assoc ($result)) {
?

Due Date:


Year

Month

Day
Experiment Name:
Experimental Purpose:
Experimental content:
Experimental steps:
Experimental results:
Analysis and discussion:


  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.