gpt4 book ai didi

PHP 表单不工作。在 IE/FF 中显示正常,而不是在 chrome 中。

转载 作者:太空宇宙 更新时间:2023-11-04 04:55:51 24 4
gpt4 key购买 nike

我是一名学生助理,我的工作是帮助维护和更新我工作的部分校园的网站和数据库。大多数网站都不是我开发的,而且我在工作中的很多 PHP、CSS 和 HTML 组件方面几乎都是新手。

我们有一个 PHP 网页,上面有一个导师申请表(link -- 不是这个校园的学生,你将无法登录到该页面......)。我们在夏天取下了表格,现在想在秋季重新打开它。 自从我们取下表单后,代码没有任何变化。当我们尝试恢复它时,页面在 IE 和 FF 中加载正常,但在 chrome 中所有内容都会出现,但没有样式的 - 它只是白色背景上的文本。

然后,当我们尝试在 IE 或 FF 中使用该表单时,它就不起作用了。提交导师请求后,用户应该被传送到确认页面,但是用户只是返回到表单,没有任何表单数据被发送到我们的数据库。

我认为问题出在 PHP 的某处,但我对此了解不多,无法看出问题所在。

网页代码如下:

<?php
require_once("../application_processing/config.php");
session_start();

$dbinfo = new DbInfo();
$db = "sss";
$qtr = checkOpen($dbinfo, $db);

if (fetchTicket("sss/tutor_request")) {
$username = $_SESSION['username'];
$fname = $_SESSION['fname'];
$lname = $_SESSION['lname'];

if ($fname == "" || $fname == NULL) {
$fname = "SAS";
$lname = "Admin";
}

$result = getPreviousSubmission($_SESSION['username'], $dbinfo, $db, "tutor_request", $qtr);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us"><!-- InstanceBegin template="/Templates/sas_sss.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!--
Cal Poly Web Template v3.4

Code developed by
Information Technology Services
California Polytechnic State University
San Luis Obispo, CA 93407
-->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Tutor Request Form - Student Support Services - Cal Poly</title>
<?php require_once("../application_processing/restore.php"); ?>
<script type="text/javascript" language="javascript" src="http://sas.calpoly.edu/javascript/jquery.js"></script>
<script type="text/javascript" language="javascript" src="http://sas.calpoly.edu/javascript/form_validation_new.js"></script>
<script type="text/javascript" language="javascript" src="javascript/tut_req_app_form.js"></script>
<!-- InstanceEndEditable -->
<meta name="codebase" content="3.4" />
<meta name="layout" content="cp template" />
<meta name="author" content="Therin Irwin" />
<meta name="keywords" content="Student Academic Services" />
<meta name="description" content="Assisting in the development of academic and personal skills" />
<!--Externally linked stylesheet that stylizes the template-->
<link href="http://sas.calpoly.edu/common/css/cp_screen_3.4.css" rel="stylesheet" type="text/css" media="screen" />
<link href="http://sas.calpoly.edu/common/css/cp_print_3.4.css" rel="stylesheet" type="text/css" media="print" />
<link href="http://sas.calpoly.edu/css/screen.css" rel="stylesheet" type="text/css" media="screen" />
<link href="http://sas.calpoly.edu/css/print.css" rel="stylesheet" type="text/css" media="print" />
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<!--Favicon-->
<link rel="shortcut icon" href="http://sas.calpoly.edu/common/images/favicon.ico" />
</head>
<body>
<!--Container div that encloses the whole template-->
<div id="container">
<!--This skiplink provides easier accessibility-->
<div id="skiplink"><a href="#content">Skip to Content</a></div>
<!--Header-->
<div id="header">
<!--Cal Poly Logo-->
<div id="cplogo"><a href="http://www.calpoly.edu/"><img src="http://sas.calpoly.edu/common/images/header/cp_logo.gif" alt="Cal Poly" title="Go to Cal Poly Home" width="166" height="60" /></a></div>
<!--The Content Area of the Header-->
<div id="headercontent">
<!--Dept Logo-->
<a href="http://sas.calpoly.edu/sss/index.html"><img src="http://sas.calpoly.edu/images/sas_logo.png" alt="dept logo" name="headerimage" width="53" height="50" id="headerimage" title="Go to department home page" /></a>
<!--Dept Name-->
<div id="deptname">
<p id="department_name"><a href="http://sas.calpoly.edu/index.html">Student Academic Services</a></p>
<!--Dept Info-->
<p id="optional_deptinfo">Student Support Services(<acronym>SSS</acronym>)</p>
</div>
</div>
<!--Search Box-->
<div id="search">
<form id="gs" method="get" title="Search Form" action="http://search.calstate.edu/search">
<div>
<input type="hidden" name="site" value="slo-CalPoly" />
<input type="hidden" name="output" value="xml_no_dtd" />
<input type="hidden" name="client" value="slo-CalPoly" />
<input type="hidden" name="proxystylesheet" value="slo-CalPoly" />
<input type="hidden" name="sitesearch" value="sas.calpoly.edu" />
<label for="q">Search SAS</label>
<br />
<input type="text" name="q" id="q" title="Search Text" size="12" maxlength="256" alt="Search Text" />
<input type="image" name="submit" id="submit" src="http://sas.calpoly.edu/common/images/utli_search/search.png" alt="Go" title="Submit Search Query" />
</div>
</form>
</div>
<!--California Polytechnic State University-->
<div id="cp">
<p>California Polytechnic State University</p>
</div>
</div>
<!--End Header-->
<!--Main Image-->
<div id="main-image"></div>

<!--Left Navigation-->
<div id="leftnav">
<!--For accessibility reasons, this "Navigation" text has been added for readability for screen readers-->
<h1>Navigation</h1>
<h2>SSS</h2>
<ul>
<li><a href="http://sas.calpoly.edu/sss/index.html">What is <acronym>SSS</acronym>?</a></li>
<li><a href="http://sas.calpoly.edu/sss/aa.html">Services</a></li>
<li><a href="http://sas.calpoly.edu/sss/eligibility.html">Eligibility</a></li>
<li><a href="http://sas.calpoly.edu/sss/enhancement.html">Academic Enhancement</a></li>
<li><a href="http://sas.calpoly.edu/sss/enhancement.html#gpsa">Graduate and Professional School Advising</a></li>
<li><a href="http://sas.calpoly.edu/main/newsletter.html">Newsletter</a></li>
<li><a href="http://sas.calpoly.edu/sss/staff.html">SSS Staff</a></li>
<li><a href="http://sas.calpoly.edu/sss/grantaward.html">SSS Grant Award</a></li>
</ul><!--Nav Content Area 1-->
<div id="navcontent1"> <!-- InstanceBeginEditable name="navcontent1" --><!-- InstanceEndEditable --> </div>
</div>
<!--Defines 2-Column Layout-->
<div id="content-2col">
<!--Breadrumb-->
<div id="breadcrumb"><a href="http://sas.calpoly.edu/index.html">Student Academic Services</a>&nbsp;<!-- InstanceBeginEditable name="breadcrumb" -->&gt; <abbr><a href="http://sas.calpoly.edu/sss/index.html">SSS</a></abbr> &gt; Tutor Request<!-- InstanceEndEditable --></div>
<!--Begin Main Body Content-->
<div id="content"> <!-- InstanceBeginEditable name="content" -->
<h1>SSS Individual Tutor Request</h1>
<?php
if ($qtr != NULL) {
?>
<h4><?php print($qtr[1]); ?></h4><br />
<h3 class="red"><?php require_once("../application_processing/error_report.php"); ?></h3>
<?php
if (mysql_num_rows($result) > 0) {
?>
<h3>Tutor Requests:</h3><p>
<?php
$first = true;

while ($row = mysql_fetch_array($result)) {
if (!$first)
print(", ");

$subj = $row[0];
$num = $row[1];
$times = $row[2];

print($subj . " " . $num);
$first = false;
}
?></p>

<?php
if (mysql_num_rows($result) >= 6) {
?>
<h3 class="red">The maximum number of tutor requests has been reached for this quarter (6).</h3>
<?php }
} ?>
<span id="error"></span>
<form action="process_tutor.php" method="post" id="TutReqApplication" name="TutReqApplication">
<fieldset>
<legend>Student Information</legend>
<div class="inputBox">
<label for="fname">Name: <?php echo($fname." ".$lname); ?></label><br />&nbsp;<br />
<label for="username">Cal Poly E-mail: <?php echo($username);?>@calpoly.edu</label>
</div>

<input id="username" name="username" type="hidden" value="&lt;?php print($username);?>" />
<input id="fname" name="fname" type="hidden" value="&lt;?php echo($fname);?>" />
<input id="lname" name="lname" type="hidden" value="&lt;?php echo($lname);?>" />

<div class="inputBox">
<label for="phone">Primary Number: </label><input class="phoneInput" name="phone" id="phone" type="text" maxlength="14" />
<em class="annot">e.g. 555-444-3210</em>
</div>
</fieldset>

<fieldset>
<legend>Course and Tutor Information</legend>
<div class="inputBox">
<label for="dept">Course Requested: </label>
<select id="dept" name="dept">
<option value="">Select</option>
<option value="AERO">AERO</option>
<option value="AG">AG</option>
<option value="AGB">AGB</option>
<option value="AGC">AGC</option>
<option value="AGED">AGED</option>
<option value="ANT">ANT</option>
<option value="ARCE">ARCE</option>
<option value="ARCH">ARCH</option>
<option value="ART">ART</option>
<option value="ASCI">ASCI</option>
<option value="ASTR">ASTR</option>
<option value="BIO">BIO</option>
<option value="BOT">BOT</option>
<option value="BRAE">BRAE</option>
<option value="BUS">BUS</option>
<option value="CD">CD</option>
<option value="CE">CE</option>
<option value="CHEM">CHEM</option>
<option value="CM">CM</option>
<option value="CPE">CPE</option>
<option value="CRP">CRP</option>
<option value="CRSC">CRSC</option>
<option value="CSC">CSC</option>
<option value="DANC">DANC</option>
<option value="DSCI">DSCI</option>
<option value="ECON">ECON</option>
<option value="EDES">EDES</option>
<option value="EDUC">EDUC</option>
<option value="EE">EE</option>
<option value="EHS">EHS</option>
<option value="ENGL">ENGL</option>
<option value="ENGR">ENGR</option>
<option value="ENVE">ENVE</option>
<option value="ES">ES</option>
<option value="FNR">FNR</option>
<option value="FORL">FORL</option>
<option value="FR">FR</option>
<option value="FRSC">FRSC</option>
<option value="FSN">FSN</option>
<option value="GEOG">GEOG</option>
<option value="GEOL">GEOL</option>
<option value="GER">GER</option>
<option value="GRC">GRC</option>
<option value="GSA">GSA</option>
<option value="GSB">GSB</option>
<option value="HIST">HIST</option>
<option value="HNRS">HNRS</option>
<option value="HUM">HUM</option>
<option value="IME">IME</option>
<option value="IT">IT</option>
<option value="ITAL">ITAL</option>
<option value="JOUR">JOUR</option>
<option value="JPNS">JPNS</option>
<option value="KINE">KINE</option>
<option value="LA">LA</option>
<option value="LIB">LIB</option>
<option value="LS">LS</option>
<option value="MATE">MATE</option>
<option value="MATH">MATH</option>
<option value="MCRO">MCRO</option>
<option value="ME">ME</option>
<option value="MSC">MSC</option>
<option value="MU">MU</option>
<option value="PE">PE</option>
<option value="PEM">PEM</option>
<option value="PEW">PEW</option>
<option value="PHIL">PHIL</option>
<option value="PHYS">PHYS</option>
<option value="PM">PM</option>
<option value="POLS">POLS</option>
<option value="PSC">PSC</option>
<option value="PSY">PSY</option>
<option value="REC">REC</option>
<option value="RELS">RELS</option>
<option value="SCM">SCM</option>
<option value="SOC">SOC</option>
<option value="SOCS">SOCS</option>
<option value="SPAN">SPAN</option>
<option value="SPC">SPC</option>
<option value="SS">SS</option>
<option value="STAT">STAT</option>
<option value="TH">TH</option>
<option value="VGSC">VGSC</option>
<option value="VS">VS</option>
<option value="WS">WS</option>
<option value="ZOO">ZOO</option>
</select>
<input type="text" class="medInput" name="coursenum" id="coursenum" maxlength="3" /><br />
</div>

<div class="inputBox">
<label for="instructor">Instructor: </label><input name="instructor" id="instructor" type="text" maxlength="30" />
<em class="annot">e.g. Staley, Clinton (Last, First).</em>
</div>
<div class="inputBox">
<textarea id="comments" name="comments" class="dim" cols="40" rows="5">Enter any other things you would like us to know here (available time, preferred tutor, etc.)</textarea>
</div>
</fieldset>

<fieldset>
<legend>Terms of Agreement</legend>
<p><em>I understand that by signing this contract I agree to meet with my tutor a minimum of two hours per week, a maximum of ten hours per week, for the duration of the quarter. <strong>Missing more than two (2) tutorial sessions, without prior clearance from SSS staff, including my tutor, will result in a suspension of individual tutoring services for the following quarter.</strong> I also understand that in the event that I drop my course, it is my responsibility to contact SSS to cancel this request. Failure to do so may also result in my tutor services being suspended.</em></p>

<p>By typing your full name below, you agree to adhere to the statements above and are providing an electronic signature.</p>
<div class="inputBox">
<label for="signature">Student Signature: </label><input type="text" name="signature" id="signature" maxlength="30" /><br />&nbsp;<br />
<p id="errorMessage">&nbsp;</p>
<input type="submit" value="Submit Tutor Request" />
</div>
</fieldset>
</form>
<?php }
else {
?>
<h3>Sorry - The application is closed for the remainder of the quarter. Try again next quarter.</h3>
<?php
}
?>
<!-- InstanceEndEditable --> </div>
<!--End Main Body Content-->
</div>

<!--Footer-->
<div id="footer">
<!--Footer Gold Bar Links-->
<div id="footer_links">
<p> <a href="http://www.calpoly.edu/" title="Cal Poly Home">CP Home</a> <span class="textBullet">&bull;</span> <a href="http://www.calpoly.edu/cpfindit.html" title="Cal Poly Find-It, Directories and Search">CP Find It</a> </p>
<p> <a href="http://get.adobe.com/reader/" title="Download Adobe Reader for viewing PDFs">Get Adobe Reader</a> <span class="textBullet">&bull;</span> <a href="http://office.microsoft.com/en-us/downloads/default.aspx" title="Microsoft Office Converters &amp; Viewers">Microsoft Viewers</a> </p>
</div>
<!--Footer Dept Links-->
<div id="footer_deptlinks">
<p><a href="http://sas.calpoly.edu/main/staff.html" title="Student Academic Services Staff">Staff</a> <span class="textBullet">&bull;</span> <a href="http://sas.calpoly.edu/main/sitemap.html">Site Map</a> <span class="textBullet">&bull;</span> <a href="http://sas.calpoly.edu/employment/index.html">Student Employment</a></p>
<p>Last Update: <!-- InstanceBeginEditable name="lastupdate" --><!-- #BeginDate format:Am2 -->9/20/12<!-- #EndDate --><!-- InstanceEndEditable --></p>
</div>
<!--Footer Dept Info-->
<div id="footer_deptinfo">
<p>Student Support Services<br />
Student Services, Bldg 124, Rm 119<br />
California Polytechnic State University<br />
San Luis Obispo, Ca 93407-0203<br />
805.756.1395<br />
<a href="mailto:cmargari@calpoly.edu">cmargari@calpoly.edu</a></p>
</div>
</div>
<!--End Footer-->
</div>
</body>
<!-- InstanceEnd --></html>
<?php } ?>

我会发布页面在 IE、FF 和 Chrome 中的图片,“但作为垃圾邮件预防机制,新用户不允许发布图片。”

我知道这不是很多事情,但我们将不胜感激任何帮助!

最佳答案

尝试使用验证器网站 - http://validator.w3.org

它会为您发现问题。

编辑

还有一个用于 CSS。 http://jigsaw.w3.org/css-validator/

关于PHP 表单不工作。在 IE/FF 中显示正常,而不是在 chrome 中。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12536522/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com