ユーザーがプロフィール編集ページを離れずに写真をアップロードできるように、ページ内に画像アップロード システムが必要です。ユーザーが自分のプロファイルを編集するときのサウンドクラウドのように。写真がアップロードされ、アップロードされるとプロファイル編集ページに表示されます。すべてが PHP で書かれていますが、いくつかの JavaScript がそこにある必要があると推測しています。このようなものがすでにある場合は、私に知らせてください。
これがプロファイル編集コードです
$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)){
$artisturl = mysql_query("SELECT * FROM members
WHERE username='$username' AND password='$pass' AND artist='Y'");
while($row = mysql_fetch_array($artisturl)){
echo '<form action="phpscripts/artistupdate.php" method="post">
<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"><form action="phpscripts/artistupdate.php" method="post">
<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:artists@newbornsounds.co.uk"><b>tell us about it.</b></a></t1></div>
</div>';
}
?>
<a href="upload.html"><div id="imageright1edit"><img src="<?php
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 ''. $row['image1'].''; }?>" width="100%"></a>
<a href="upload.html"><div id="imageright1edit"><img src="<?php
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 ''. $row['image2'].''; }?>" width="100%"></div></a>
<!-- This is the image upload select box-->
<input type="file" name="imageupload" value="Upload an image" class="filebutton"></div>
<input type="submit" name="submit" value="Done" class="button"></form>