웹 사이트에서 다른 사람의 코드를 편집해야합니다 (해당 사람에게 연락 할 수 없음). PHP에 대해 많은 경험이 없습니다. 이 양식은 제출시 이전 페이지로 리디렉션됩니다. 현재 페이지를 새로 고침하려면이를 변경해야합니다. 양식의 작업 필드를 변경하는 시도를 여러 차례 시도했지만 빈 페이지 또는 모두 이미 리디렉션 된 페이지로 연결됩니다. 누군가 여기서 약간의 지식을 공유 할 수 있습니까? 그것이 현재 페이지의 링크를 보유하고 있다고 판명 $ 작용 변수의 내용을 확인한 후PHP 양식 - 제출시 다시로드
<div id="tab-general" class="tab-content">
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
<table>
<tr>
<td><span class="required">*</span> <?php echo $entry_title; ?></td>
<td><input type="text" value="<?php echo $title; ?>" name="title" id="title" /><br />
<?php if ($error_title) { ?>
<span class="error"><?php echo $error_title; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_name; ?></td>
<td><input type="text" value="<?php echo $name; ?>" name="name" id="name" /><br />
<?php if ($error_name) { ?>
<span class="error"><?php echo $error_name; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_email; ?></td>
<td><input type="text" value="<?php echo $email; ?>" name="email" id="email" /><br />
<?php if ($error_email) { ?>
<span class="error"><?php echo $error_email; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_end_date; ?></td>
<td><input type="text" value="<?php echo $end_date; ?>" name="end_date" id="end_date" /><br />
<?php if ($error_end_date) { ?>
<span class="error"><?php echo $error_end_date; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><?php echo $entry_type; ?></td>
<td><select name="type" id="type" class="type_list">
<?php if ($type) { ?>
<option value="1" selected="selected"><?php echo $text_private; ?></option>
<option value="0"><?php echo $text_public; ?></option>
<?php } else { ?>
<option value="1"><?php echo $text_private; ?></option>
<option value="0" selected="selected"><?php echo $text_public; ?></option>
<?php } ?>
</select></td>
</tr>
<tr>
<td><?php echo $entry_status; ?></td>
<td><select name="status">
<?php if ($status) { ?>
<option value="1" selected="selected"><?php echo $text_enabled; ?></option>
<option value="0"><?php echo $text_disabled; ?></option>
<?php } else { ?>
<option value="1"><?php echo $text_enabled; ?></option>
<option value="0" selected="selected"><?php echo $text_disabled; ?></option>
<?php } ?>
</select></td>
</tr>
<tr>
<td><br /><h2><?php echo $text_invitees; ?></h2></td>
<td></td>
</tr>
</table>
<table id="attendee" class="list">
<thead>
<tr>
<td class="left"><?php echo $entry_att_name; ?></td>
<td class="right"><?php echo $entry_att_email; ?></td>
<td></td>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="2"></td>
<td class="left"><a onclick="addAttendee();" class="button"><?php echo $button_add; ?></a></td>
</tr>
</tfoot>
<?php $attendee_row = 0; ?>
<?php if ($attendees) { ?>
<?php foreach ($attendees as $attendee) { ?>
<tbody id="attendee-row<?php echo $attendee_row; ?>">
<tr>
<td class="left"><input type="text" name="attendee[<?php echo $attendee_row; ?>][name]" value="<?php echo $attendee['name']; ?>" size="18" />
<?php if (isset($error_name_attendee[$attendee_row])) { ?>
<span class="error"><?php echo $error_name_attendee[$attendee_row]; ?></span>
<?php } ?>
</td>
<td class="right"><input type="text" name="attendee[<?php echo $attendee_row; ?>][email]" value="<?php echo $attendee['email']; ?>" size="18" />
<?php if (isset($error_email_attendee[$attendee_row])) { ?>
<span class="error"><?php echo $error_email_attendee[$attendee_row]; ?></span>
<?php } ?>
</td>
<td class="left"><a onclick="$('#attendee-row<?php echo $attendee_row; ?>').remove();" class="button"><?php echo $button_remove; ?></a>
</td>
</tr>
</tbody>
<?php $attendee_row++; ?>
<?php } ?>
<?php } ?>
</table>
<div class="buttons"><div class="left">
<a onclick="$('#form').submit();" class="button"><?php echo $button_save; ?></a></div><div class="right"><a onclick="location = '<?php echo $cancel; ?>';" class="button"><?php echo $button_cancel; ?></a>
</div></div>
</div>
. 페이지를 새로 고침해야하지만 그렇지 않습니다.
예 :이 링크
localhost/index.php?route=account/projects/editProject&project_id=1&akey=98c27892d1e2a13c0dfb9086539f8275
이며이 $ 액션 변수에 저장됩니다. 대신 방향은 링크입니다
당신은 값을 확인해야을'$ 의회 처리 변수 –
$ action은 어디에 정의되어 있습니까? 변경 그 – black
그것은 전에 코드의 많은 갈기 라인을 정의 ... 그것을 반향 후 나는 그것이 올바른 링크를 보유하고 발견. 그러나 어떤 이유로 그것은 작동하지 않습니다. – Anonymous