こんにちは私は、これらのフォームを参考にして記入してください。しかし、私は5行目でエラーが発生し続けています。問題は見られません。誰も私を導くことができますか?ありがとう!フォームフィリングの問題
<?php session_start();
require_once 'opendb.php'
$subject = "Refrence";
$refemail = "Here is the list for your refrence";
$class_name = $_POST['course_name'];
$class_venue = $_POST['class_venue'];
$date_of_lesson =$_POST['date_of_lesson'];
$time_of_lesson =$_POST['time_of_lesson'];
$class_duration =$_POST['class_duration'];
$date_of_exam =$_POST['date_of_exam'];
$class_in_charge =$_POST['class_in_charge'];
$contact =$_POST['contact'];
$email =$_POST['email'];
$zone =$_POST['zone_no'];
$cl_name =$_POST['cl_name'];
$ce_name =$_POST['ce_name'];
$todayis = date("l, F j, Y, g:i a") ;
$message = " $todayis \n
From: $cl_name ($email)\n
Class name: $class_name \n
Class Venue: $class_venue \n
Date of lesson: $date_of_lesson \n
Time of lesson: $time_of_lesson \n
Class duration: $class_duration \n
Date of exam: $date_of_exam \n
Class in charge: $class_in_charge \n
Contact: $contact \n
Zone: $zone \n
Cl Name: $cl_name \n
Ce Name: $ce_name \n
";
$from = "From: $email\r\n";
mail($email, $subject, $refemail, $message, $from);
?>
<img style="width: 190px; height: 184px;" alt=""
src="images/Picture1.jpg">
<form enctype="multipart/form-data" action = 'function.php' method='post' />
</head>
<body>
<span
style="text-decoration: underline; font-weight: bold;"> </span>
<head><title>Success!</title></head>
<h1>Class Successfully Created !</h1>
<h3>Thank you. An email has been sent to your account for futher reference.</h3>
<?
// Read variables from the $_POST array
$i = 0;
while ($i < $_SESSION['numberOfStudents'])
{
$student_name = $_POST['student_name'.$i.''];
$classId = $_SESSION['class_id'];
$nric = $_POST['nric'.$i.''];
$age = $_POST['age'.$i.''];
$sql = "INSERT INTO b_student (bs_nric_no,student_name,age,b_class_id) VALUES
('$nric','$student_name','$age','$classId')";
mysql_query($sql) or die(mysql_error());
$i++;
}
?>
<tr>
<td></td>
<table style="text-align: left;"
<td><input type = 'submit' value = 'Back to Function List!'></td>
</tr>
</table>
</form>
</html>
</body>
</html>
を経由してアクセスできるとなります今私は新しいエラーを取得します。 "すべての変数のインデックスを定義解除する" –
POSTの様子を確認して、var_dump($ _ POST)とタイプしてください。 – usoban
詳しく教えてもらえますか?申し訳ありませんが、私はこれでうまくいきません.. –