0
안녕하세요 세션에 문제가 있습니다. 세션을 사용하여 변수를 다른 페이지로 전달할 때 해당 변수의 값은 다른 페이지에서 항상 동일합니다. 내가 선택한 행이 무엇이든간에. 변수가있는 동일한 페이지로 "작업"을 변경하면 값이 올바르게 표시됩니다. 누군가 스페인어를하면 내 나쁜 영어로 유감스럽게 생각합니다. 이 일에 정말로 도움이 필요해. 이 경우 문제PHP 및 세션 오류
<?php
include_once 'rnheader.php';
session_start();
$ticket_select = $_POST['serviceID'];
echo '<a href = "rnservices.php"> Create Service</a> ';
echo '<table border="1" >';
echo '<tr>';
echo '<th>Service ID</th>';
echo '<th>Title</th>';
echo '<th>Description</th>';
echo '<th>Notes</th>';
echo '<th>Submit By</th>';
echo '<th>Assigned Employee</th>';
echo '<th>Assigned Group</th>';
echo '<th>Category</th>';
echo '<th>Status</th>';
echo '<th>Urgency</th>';
echo '<th>Customer</th>';
echo '<th>Day Created</th>';
echo '</tr>';
$query = ("SELECT ServiceID, Title, Description, Notes, SubmitBy, AssignedEmp, " .
"AssignedGroup, NameCategory, TipoStatus, TiposUrgencia, CustomerName, DayCreation FROM Service");
$result = queryMysql($query);
while ($row = mysql_fetch_assoc($result)) {
echo '<tr>';
echo '<td><form method ="post" action="rnservices1.php">';
?>
<input type="submit" name="serviceID" value=<?php echo $row['ServiceID']?>
<?php
echo '</form>';
echo '<td>'.$row['Title'].'</td>';
echo '<td>'.$row['Description'].'</td>';
echo '<td>'.$row['Notes'].'</td>';
echo '<td>'.$row['SubmitBy'].'</td>';
echo '<td>'.$row['AssignedEmp'].'</td>';
echo '<td>'.$row['AssignedGroup'].'</td>';
echo '<td>'.$row['NameCategory'].'</td>';
echo '<td>'.$row['TipoStatus'].'</td>';
echo '<td>'.$row['TiposUrgencia'].'</td>';
echo '<td>'.$row['CustomerName'].'</td>';
echo '<td>'.$row['DayCreation'].'</td>';
echo '</tr>';
}
mysqli_free_result($result);
echo $ticket_select;
$_SESSION['serviceID'] = $ticket_select;
'</table>';
?>
uery = "서비스에서 제목 선택 ServiceID = '$ ticket_select'"; $ result = queryMysql ($ query); 'Number of Rows :'를 echo합니다. mysql_num_rows ($ result); ?>
php – maltad
값은 다음과 같습니다. echo $ ticket_select를 사용할 때 작동합니다. 그러나 변수가 생성 된 페이지에서. 다른 페이지에서 사용할 때 변수의 값이 변경되지 않습니다. – maltad
다른 페이지를 게시 할 수 있습니까? –