이 양식을 끈적 거리게 만들려고 시도 중이지만 작동하지 않습니다. 내가하려는 것은 이전 양식에서 사용자가 일부 매개 변수를 입력하고 HTML 표가이 페이지에 생성되는 반면 위에 표시된 표의 데이터를 편집하기 위해 다른 양식이 표시된다는 것입니다. 그러나 값은 아래 양식으로 표시되지 않습니다. 은 PHP의 스틱 양식과 관련하여 문제가 발생합니다.
날I 모바일에 입력 MY 포맷하기를 용서해주세요 도와주세요. 양해 해줘서 고마워.
<?php session_start(); ?>
<?php require 'includes/dbconnect.php' ; ?>
<?php require 'includes/header.inc.php'; ?>
<?php
$matric_no = mysql_real_escape_string($_POST['matric_no']);
if ($_POST['matric_no'] == "")
{
echo"<div id=\"contentRight\">";
echo"<idv id=\"msg\">" ;
echo "You didn't enter a <span style=\"color:red\">Matric Number</span>";
echo"</div>";
echo"</div>";
exit();
}
$query = "SELECT matric_no
FROM students
WHERE matric_no = '$_POST[matric_no]'";
$result = mysql_query($query);
$duplicates = mysql_num_rows($result);
if ($duplicates < 1)
{
echo"<div id=\"contentRight\">";
echo"<idv id=\"msg\">" ;
echo "You dont have a record for <span style=\"color:red\">$matric_no</span>" ;
echo "</div>" ;
echo "</div>" ;
exit();
}
$result = mysql_query("SELECT matric_no, first_name, last_name, other_name
FROM students
WHERE matric_no = '".mysql_real_escape_string($_POST['matric_no'])."'") or die(mysql_error());
$number_cols = mysql_num_fields($result) ;
echo "<div id=\"contentRight\">" ;
echo "<span class=\"header\">";
echo "<p><b>Matric Number: ".mysql_real_escape_string($_POST['matric_no']) ."</b></p>";
echo "<table border = 1 , cellspacing = 0 , cellpadding = 2 bgcolor=lemonchiffon >\n";
echo "<tr align=center>\n";
for ($i=0; $i<$number_cols; $i++)
{
echo "<th>" . mysql_field_name($result, $i). "</th>\n";
}
echo "</tr>\n";
while ($row = mysql_fetch_row($result))
{
echo "<tr align=center>\n";
for ($i=0; $i<$number_cols; $i++)
{
echo "<td>";
if (!isset($row[$i]))
{echo "NULL";}
else
{echo $row[$i];}
echo "</td>\n";
}
echo "</tr>\n";
}
echo "</table>";
echo"</span>" ;
echo"</div>";
?>
<br />
<?php
while($row = mysql_fetch_array($result)){
?>
<div id="contentRight">
<p>
Select the Score options you will like to update:
<form action="student_update2.php" method="post">
<ul>
<li>Matric Number: <input type="text" name="matric_no" value="<?php echo $row['matric_no'] ; ?>"> </li><br/><br/>
<li>First Name: <input type="text" name="first_name" value="<?php echo $row['firts_name'] ; ?>"> </li><br /><br/>
<li>Last Name: <input type="text" name="last_name" value="<?php echo $row['last_name'] ; ?>"> </li><br /><br />
<li>Other Names: <input type="text" name="other_name" value="<?php echo $row['other_name'] ; ?>"</li> <br /><br />
<input type="submit" name="submit" value="Update" />
<input type="hidden" name ="submitted" value="TRUE" />
<input name="Reset" type="reset" value="Reset" />
</ul>
</div>
</div>
</form>
<?php
}
require 'includes/footer.php'; ?>
formmatting cleaned a little
모바일에 입력하는 데 어려움이 있었음에 틀림 없음 0_0 – CountMurphy
도움이되지만 질문을 게시하십시오. * 열정 * (~ _ ~) –