내 프로필 편집 페이지의 내 이미지 업로드 양식이 작동하지 않습니다. 두 양식은 독립적으로 작동하므로 별도로 작성해야합니다. 이미지 업로드 스크립트는 프로필 편집 양식을 제출하기 전에 이미지를 업로드합니다.한 페이지에 두 개 이상의 양식이 있습니다.
이미지 업로드가 페이지의 유일한 것이고 작동하는 별도의 페이지에서 테스트되었습니다. 그래서 나는 그것을 엉망으로 만드는 다른 형태라고 가정하고 있습니다. 두 양식은 다른 스크립트에서 작동하며 두 방법 모두 게시물입니다. 여기
는 다음의 JScript<script type="text/javascript" src="imageupload/scripts/jquery.min.js"></script>
<script type="text/javascript" src="imageupload/scripts/jquery.form.js"></script>
<script type="text/javascript" >
$(document).ready(function() {
$('#photoimg').live('change', function() {
$("#preview").html('');
$("#preview").html('<img src="imageupload/loader.gif" alt="Uploading...."//>');
$("#cropimage").ajaxForm({ target: '#preview' }).submit();
});
});
</script>
인 형태이다;
<form id="cropimage" method="post" enctype="multipart/form-data" action="../imageupload/ajaximage.php">
<input type="file" name="photoimg" id="photoimg" class="filebutton"/><br>
</form>
다른 형태가 있습니다. 그 긴 하나;
echo '<form action="phpscripts/artistupdate.php" method="post" id="profileedit"><input type="text" name="artistname" value="'. $row['artistname'].'" class="name" maxlength="80"><span id="editlink"><t1>Your profile link will be: <br><a href="http://newbornsounds.co.uk/artists/artist.php?artist='.$row['artistname'].'"> <b>http://newbornsounds.co.uk/artists/artist.php?artist=<FONT style="BACKGROUND-COLOR: yellow">'.$row['artistname'].'</font></b></a></span><br><div id="urlwarn"><t1>Please note that if you change your url all the links you have placed outside of NBS will be affected.</t1></div>';
}
}
?>
<hr>
<?php
$username = $_SESSION['username'];
$pass = $_SESSION['password'];
include ("../database.php");
$result = mysql_query("SELECT * FROM members WHERE username='$username' AND password='$pass' AND artist='Y'");
while($row = mysql_fetch_array($result)){
echo '<div id="artistsbio"><textarea name="bio" rows="10" cols="80" name="bio" value="'. $row['bio']. '" class="bio">'. $row['bio']. '</textarea><br><div id="probwarn"><t1>Everything is still in the beta stage so there are bound to be a few problems. If you spot one please <a href="mailto:[email protected]"><b>tell us about it.</b></a></t1></div>';
}
?>
<br><br>
<input type="submit" name="submit" value="Done" class="button"></form>
양식의 전체 HTML은 어떻게 생겼습니까? 양식을 중첩 할 수 없습니다. – jeroen
다른 양식은 어디에 있습니까? –
각 양식에 대해 두 개의 제출 단추가 있는지 확인하십시오. –