-1
我在寫的template.php HTML表單,我有這樣的的script.php:與PHP腳本代碼添加到某個DIV
<?php
include "index.php";
if (isset($_GET['numOfPictures'])){
$times = $_GET['numOfPictures'];
echo '<form name="upload" action="code.php" method="POST">';
for ($i = 1; $i <= $times; $i++){
echo '<br />select picture number '.$i.': <br />';
echo '<input name="file'.$i.'" type="file" />';
}
echo '</br><input name="submitFiles" type="submit" />';
echo '</form>';
}
?>
當我提出我的3號選項選擇的形式,我想追加在同一個DIV中。之後,我寫的PHP腳本會在代碼中添加另一種形式。
我的頁面發生的事情是該腳本在頁面末尾添加新表單。
我該怎麼做?
我不想在我的template.php裏面做代碼,我想讓它們分開。
你怎麼辦呢? –