<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
//define a maxim size for the uploaded images in Kb
define ("MAX_SIZE","1024");
//This function reads the extension of the file. It is used to determine if the file is an image by checking the extension.
function getExtension($str) {
$i = strrpos($str,".");
if (!$i) { return ""; }
$l = strlen($str) - $i;
$ext = substr($str,$i+1,$l);
return $ext;
}
//This variable is used as a flag. The value is initialized with 0 (meaning no error found) and it will be changed to 1 if an errro occures. If the error occures the file will not be uploaded.
$errors=0;
//checks if the form has been submitted
if(isset($_POST['Submit']))
{
//reads the name of the file the user submitted for uploading
$image=$_FILES['image']['name'];
//if it is not empty
if ($image)
{
//get the original name of the file from the clients machine
$filename = stripslashes($_FILES['image']['name']);
//get the extension of the file in a lower case format
$extension = getExtension($filename);
$extension = strtolower($extension);
//if it is not a known extension, we will suppose it is an error and will not upload the file, otherwize we will do more tests
if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png") && ($extension != "gif"))
{
//print error message
echo '<h1>Unknown extension!</h1>';
$errors=1;
}
else
{
//get the size of the image in bytes
//$_FILES['image']['tmp_name'] is the temporary filename of the file in which the uploaded file was stored on the server
$size=filesize($_FILES['image']['tmp_name']);
//compare the size with the maxim size we defined and print error if bigger
if ($size > MAX_SIZE*1024)
{
echo '<h1>You have exceeded the size limit!</h1>';
$errors=1;
}
$newname="users/$userid/" .$albumname->albumno;
//we verify if the image has been uploaded, and print error instead
$copied = copy($_FILES['image']['tmp_name'], $newname);
if (!$copied)
{
echo '<h1>Copy unsuccessfull!</h1>';
$errors=1;
}}}}
//If no errors registred, print the success message
if(isset($_POST['Submit']) && !$errors)
{
header("location: ../member_home.php?cover=1 ");
exit();
}
<!-- end sidebar -->
<!-- end sidebar -->
<!-- end sidebar -->
</div>
<!-- end page -->
<div style="clear: both;"> </div>
<?php
include('include/footer.php')
?>
</body>
</html>
basically its meant to pull the last entry into a database from a band uploading album details and then name and save a file of the albumno (auto_increment).
it basically works for the 1st band. It will for example, create a file called 31 with the correct image. If however the same band uploads another album, and the correct album is displayed in the drop down box, then when you save the file it just updates 31 instead of creating 32.
You have a lot to learn my friend.
You are having big problems with your logic.
You need to understand the logic flow before you are going to have any success.
And I think you were told before, your session won't work because you are starting HTML output before you start the session.
session_start() must be called before any HTML output is started.
Also you can not use the header() command after any HTML output has started.
The above commands must be run before the doctype is declared and before any HTML is output.
I am assuming you included the dropdown box so you can select an album to upload a cover for.
I have made the dropdown box useful.
You select an album from the dropdown box and it will assign the album number to the image file.
PHP Code:
<?php session_start(); include('include/database.php'); include('include/auth.php'); $userid = $_SESSION['SESS_USERID']; $albumno = $_SESSION['albumno']; $query = "SELECT `albumname`, `userid`, `albumno` FROM `banddisco` WHERE userid='$userid'"; $result = mysql_query($query); $select = "<select name='albumname' onchange='get_albumno(this.value);'>"; $select .= "<option value='0>0'>Select an album ...</option>"; for($i=0; $i < mysql_num_rows($result); $i++) { $albumname = mysql_fetch_object($result); $select .= "<option value='".$albumname->albumname.">".$albumname->albumno."'>". $albumname->albumname ." > ". $albumname->albumno ."</option>"; } $select .= "</select>"; //define a maxim size for the uploaded images in Kb define ("MAX_SIZE","1024"); //This function reads the extension of the file. It is used to determine if the file is an image by checking the extension. function getExtension($str) { $i = strrpos($str,"."); if (!$i) { return ""; } $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } //This variable is used as a flag. The value is initialized with 0 (meaning no error found) and it will be changed to 1 if an errro occures. If the error occures the file will not be uploaded. $errors=0; //checks if the form has been submitted if(isset($_POST['Submit'])) { //reads the name of the file the user submitted for uploading $image=$_FILES['image']['name']; //if it is not empty if ($image) { //get the original name of the file from the clients machine $filename = stripslashes($_FILES['image']['name']); //get the extension of the file in a lower case format $extension = getExtension($filename); $extension = strtolower($extension); //if it is not a known extension, we will suppose it is an error and will not upload the file, otherwize we will do more tests if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png") && ($extension != "gif")) { //print error message echo '<h1>Unknown extension!</h1>'; $errors=1; } else { //get the size of the image in bytes //$_FILES['image']['tmp_name'] is the temporary filename of the file in which the uploaded file was stored on the server $size=filesize($_FILES['image']['tmp_name']); //compare the size with the maxim size we defined and print error if bigger if ($size > MAX_SIZE*1024) { echo '<h1>You have exceeded the size limit!</h1>'; $errors=1; } $newname=$_POST["temp_albumno"]?$_POST["temp_albumno"]:"temp_name"; //we verify if the image has been uploaded, and print error instead $copied = copy($_FILES['image']['tmp_name'], $newname); if (!$copied) { echo '<h1>Copy unsuccessfull!</h1>'; $errors=1; } if(!$errors) { header("location: ../member_home.php?cover=1"); exit(); } } } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Welcome to fanjunky.com! - New Music - Bands- MP3 - Tickets - Tour Dates - The Latest Band = <?php $sql = "SELECT * FROM user WHERE userid = '$userid'"; $result = mysql_query($sql) or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo $row['bandname']; } ?> </title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="default.css" rel="stylesheet" type="text/css" media="screen" /> <script> function get_albumno(v) { var v = v.split(">"); if(v[0] == 0) { document.getElementById("cover_msg").style.color = "#f00"; document.getElementById("cover_msg").innerHTML = "You must select and album first." } else { document.getElementById("cover_msg").style.color = "#00f"; document.getElementById("cover_msg").innerHTML = "Album <b>'" + v[0] + "'</b> selected."; document.getElementById("temp_albumno").value = v[1];} } </script> </head> <body> <?php include('include/header.php'); ?> <div id="page"> <div id="content"> <div class="post greenbox"> <div class="title"> <h1>band discography - Album Cover</h1> </div> <div class="entry"> <p>Please upload the album cover</p> <p id="cover_msg" style="color:#f00;font-size:14px;font-style:italic;">Select an album from the dropdown box.</p> <?php echo $select; ?> <p>Upload Cover</p> <form name="newad" method="post" enctype="multipart/form-data" action=""> <input id="temp_albumno" name="temp_albumno" type="hidden"> <table> <tr><td><input type="file" name="image"></td></tr> <tr><td><input name="Submit" type="submit" value="Upload image"></td></tr> </table> </form> </div> <div class="btm"> <div class="l"> <div class="r"> <p class="meta"> </p> </div> </div> </div> </div> <br /> <div class="two-columns"> <div class="columnA"> <div class="title red"> <h2>sponsers</h2> </div> <div class="content"> <script type="text/javascript"> google_ad_client = "pub-1087428711969548";
When you look at the code you will see that all the code, starting with the doctype to the end, can be considered the transmitter.
And all the code before the doctype can be considered the receiver.
And of course some of the code is used to setup certain variables that can be used throughout the program.
Note: I did not check all your code to make sure your html is correct. And I am not sure you are getting the output you may expect for the <title> element.
learning is what I am trying to do, and I reliased that session start had to be first, just wasn't concerntrating on that at the time, but thanks for the reminder!
The only thing I have now is that the image stores to the wrong location, it should store to:
users/$userid/ how would I adapt the code to achieve this? I have not used the
I am sorry, I forgot to change that back after I was done testing the code.
Sense I activated the dropdown box, I don't see where $_SESSION['albumno'] is of any more use.
If there is a reason why you need this variable, then maybe you can explain why it is there.
Also if $_SESSION['albumno'] should contain a value from a previous page and you always get the same value, then maybe you aren't sending the correct value.
Anyways I don't see where it is being used anymore.
If you want to reincorporate it, then tell me how it would be used.
PHP Code:
<?php session_start(); include('include/database.php'); include('include/auth.php'); $userid = $_SESSION['SESS_USERID']; $albumno = $_SESSION['albumno']; $query = "SELECT `albumname`, `userid`, `albumno` FROM `banddisco` WHERE userid='$userid'"; $result = mysql_query($query); $select = "<select name='albumname' onchange='get_albumno(this.value);'>"; $select .= "<option value='0>0'>Select an album ...</option>"; for($i=0; $i < mysql_num_rows($result); $i++) { $albumname = mysql_fetch_object($result); $select .= "<option value='".$albumname->albumname.">".$albumname->albumno."'>". $albumname->albumname ." > ". $albumname->albumno ."</option>"; } $select .= "</select>"; //define a maxim size for the uploaded images in Kb define ("MAX_SIZE","1024"); //This function reads the extension of the file. It is used to determine if the file is an image by checking the extension. function getExtension($str) { $i = strrpos($str,"."); if (!$i) { return ""; } $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } //This variable is used as a flag. The value is initialized with 0 (meaning no error found) and it will be changed to 1 if an errro occures. If the error occures the file will not be uploaded. $errors=0; //checks if the form has been submitted if(isset($_POST['Submit'])) { //reads the name of the file the user submitted for uploading $image=$_FILES['image']['name']; //if it is not empty if ($image) { //get the original name of the file from the clients machine $filename = stripslashes($_FILES['image']['name']); //get the extension of the file in a lower case format $extension = getExtension($filename); $extension = strtolower($extension); //if it is not a known extension, we will suppose it is an error and will not upload the file, otherwize we will do more tests if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png") && ($extension != "gif")) { //print error message echo '<h1>Unknown extension!</h1>'; $errors=1; } else { //get the size of the image in bytes //$_FILES['image']['tmp_name'] is the temporary filename of the file in which the uploaded file was stored on the server $size=filesize($_FILES['image']['tmp_name']); //compare the size with the maxim size we defined and print error if bigger if ($size > MAX_SIZE*1024) { echo '<h1>You have exceeded the size limit!</h1>'; $errors=1; } if(!empty($_POST["temp_albumno"])){$newname="users/$userid/".$_POST["temp_albumno"];} //verify if the image has been uploaded, and print error instead $copied = copy($_FILES['image']['tmp_name'], $newname); if (!$copied) { echo '<h1>Copy unsuccessfull!</h1>'; $errors=1; } if(!$errors) { header("location: ../member_home.php?cover=1"); exit(); } } } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Welcome to fanjunky.com! - New Music - Bands- MP3 - Tickets - Tour Dates - The Latest Band = <?php $sql = "SELECT * FROM user WHERE userid = '$userid'"; $result = mysql_query($sql) or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo $row['bandname']; } ?> </title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="default.css" rel="stylesheet" type="text/css" media="screen" /> <script> function get_albumno(v) { var v = v.split(">"); if(v[0] == 0) { document.getElementById("cover_msg").style.color = "#f00"; document.getElementById("cover_msg").innerHTML = "You must select and album first." } else { document.getElementById("cover_msg").style.color = "#00f"; document.getElementById("cover_msg").innerHTML = "Album <b>'" + v[0] + "'</b> selected."; document.getElementById("temp_albumno").value = v[1];} } </script> </head> <body> <?php include('include/header.php'); ?> <div id="page"> <div id="content"> <div class="post greenbox"> <div class="title"> <h1>band discography - Album Cover</h1> </div> <div class="entry"> <p>Please upload the album cover</p> <p id="cover_msg" style="color:#f00;font-size:14px;font-style:italic;">Select an album from the dropdown box.</p> <?php echo $select; ?> <p>Upload Cover</p> <form name="newad" method="post" enctype="multipart/form-data" action=""> <input id="temp_albumno" name="temp_albumno" type="hidden"> <table> <tr><td><input type="file" name="image"></td></tr> <tr><td><input name="Submit" type="submit" value="Upload image"></td></tr> </table> </form> </div> <div class="btm"> <div class="l"> <div class="r"> <p class="meta"> </p> </div> </div> </div> </div> <br /> <div class="two-columns"> <div class="columnA"> <div class="title red"> <h2>sponsers</h2> </div> <div class="content"> <script type="text/javascript"> google_ad_client = "pub-1087428711969548";
The above line of code is simply Boolean logic.
What it means is:
if $_POST["temp_albumno"] contains a value, then assign it to $newname.
Else assign "temp_name" as the value for $newname.
But as you can see, I have changed that part of the code back to the way you had it.
I only wrote it that way for testing purposes.
I didn't want $newname to end up without a value while testing.
learning is what I am trying to do, and I reliased that session start had to be first, just wasn't concerntrating on that at the time, but thanks for the reminder!
The only thing I have now is that the image stores to the wrong location, it should store to:
users/$userid/ how would I adapt the code to achieve this? I have not used the
before, can I just add my required destination to the line?
The main problem I see is that you are having a hard time understanding which part of the code is used as the transmitter and which part is the receiver.
And which part goes first.
Mostly it depends on what you are trying to accomplish.
The transmitter and receiver don't always have to go in this order as long as the receiver understands that something has been transmitted.
no that session is no longer used, so i took it out. It was basically where I was playimng around trying to get it tio work.
Ok, it again works fine for the 1st album, however the second saves as undefined.
the 1st album appear in the drop down as
Code:
goddamit>35
and the second as
Code:
>36'>maybe ill catch fire>36
I am kinda stubling through this, learning as I go, its a great feeling when you get something to work on your own for the 1st time, only to find out that it works in a way its not supposed to and you dont know why
This is the 1st time I have attempted to design a whole site from scratch, and while quite basic, its giving me a lot of pleasure seeing it come together.
no that session is no longer used, so i took it out. It was basically where I was playimng around trying to get it tio work.
Ok, it again works fine for the 1st album, however the second saves as undefined.
the 1st album appear in the drop down as
Code:
goddamit>35
and the second as
Code:
>36'>maybe ill catch fire>36
I am kinda stubling through this, learning as I go, its a great feeling when you get something to work on your own for the 1st time, only to find out that it works in a way its not supposed to and you dont know why
This is the 1st time I have attempted to design a whole site from scratch, and while quite basic, its giving me a lot of pleasure seeing it come together.
Thanks for your help so far!
Ok, I think I found the problem.
I was using the ">" for the delimiter in the <option> value.
And that was causing confusion to the HTML interpreter.
I changed the delimiter to a "&" and that seems to work better.
PHP Code:
<?php session_start(); include('include/database.php'); include('include/auth.php'); $userid = $_SESSION['SESS_USERID']; $query = "SELECT `albumname`, `userid`, `albumno` FROM `banddisco` WHERE userid='$userid'"; $result = mysql_query($query); $select = "<select name='albumname' onchange='get_albumno(this.value);'>"; $select .= "<option value='0&0'>Select an album ...</option>"; for($i=0; $i < mysql_num_rows($result); $i++) { $albumname = mysql_fetch_object($result); $select .= "<option value='".$albumname->albumname."&".$albumname->albumno."'>". $albumname->albumname ." > ". $albumname->albumno ."</option>"; } $select .= "</select>"; //define a maxim size for the uploaded images in Kb define ("MAX_SIZE","1024"); //This function reads the extension of the file. It is used to determine if the file is an image by checking the extension. function getExtension($str) { $i = strrpos($str,"."); if (!$i) { return ""; } $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } //This variable is used as a flag. The value is initialized with 0 (meaning no error found) and it will be changed to 1 if an errro occures. If the error occures the file will not be uploaded. $errors=0; //checks if the form has been submitted if(isset($_POST['Submit'])) { //reads the name of the file the user submitted for uploading $image=$_FILES['image']['name']; //if it is not empty if ($image) { //get the original name of the file from the clients machine $filename = stripslashes($_FILES['image']['name']); //get the extension of the file in a lower case format $extension = getExtension($filename); $extension = strtolower($extension); //if it is not a known extension, we will suppose it is an error and will not upload the file, otherwize we will do more tests if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png") && ($extension != "gif")) { //print error message echo '<h1>Unknown extension!</h1>'; $errors=1; } else { //get the size of the image in bytes //$_FILES['image']['tmp_name'] is the temporary filename of the file in which the uploaded file was stored on the server $size=filesize($_FILES['image']['tmp_name']); //compare the size with the maxim size we defined and print error if bigger if ($size > MAX_SIZE*1024) { echo '<h1>You have exceeded the size limit!</h1>'; $errors=1; } if(!empty($_POST["temp_albumno"])){$newname="users/$userid/".$_POST["temp_albumno"];} //verify if the image has been uploaded, and print error instead $copied = copy($_FILES['image']['tmp_name'], $newname); if (!$copied) { echo '<h1>Copy unsuccessfull!</h1>'; $errors=1; } if(!$errors) { header("location: ../member_home.php?cover=1"); exit(); } } } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Welcome to fanjunky.com! - New Music - Bands- MP3 - Tickets - Tour Dates - The Latest Band = <?php $sql = "SELECT * FROM user WHERE userid = '$userid'"; $result = mysql_query($sql) or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo $row['bandname']; } ?> </title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="default.css" rel="stylesheet" type="text/css" media="screen" /> <script> function get_albumno(v) { var v = v.split("&"); if(v[0] == 0) { document.getElementById("cover_msg").style.color = "#f00"; document.getElementById("cover_msg").innerHTML = "You must select and album first." } else { document.getElementById("cover_msg").style.color = "#00f"; document.getElementById("cover_msg").innerHTML = "Album <b>'" + v[0] + "'</b> selected."; document.getElementById("temp_albumno").value = v[1];} } </script> </head> <body> <?php include('include/header.php'); ?> <div id="page"> <div id="content"> <div class="post greenbox"> <div class="title"> <h1>band discography - Album Cover</h1> </div> <div class="entry"> <p>Please upload the album cover</p> <p id="cover_msg" style="color:#f00;font-size:14px;font-style:italic;">Select an album from the dropdown box.</p> <?php echo $select; ?> <p>Upload Cover</p> <form name="newad" method="post" enctype="multipart/form-data" action=""> <input id="temp_albumno" name="temp_albumno" type="hidden"> <table> <tr><td><input type="file" name="image"></td></tr> <tr><td><input name="Submit" type="submit" value="Upload image"></td></tr> </table> </form> </div> <div class="btm"> <div class="l"> <div class="r"> <p class="meta"> </p> </div> </div> </div> </div> <br /> <div class="two-columns"> <div class="columnA"> <div class="title red"> <h2>sponsers</h2> </div> <div class="content"> <script type="text/javascript"> google_ad_client = "pub-1087428711969548";
This version doesn't care if you use apostrophes in the album names.
PHP Code:
<?php session_start(); include('include/database.php'); include('include/auth.php'); $userid = $_SESSION['SESS_USERID']; $query = "SELECT `albumname`, `userid`, `albumno` FROM `banddisco` WHERE userid='$userid'"; $result = mysql_query($query); $select = "<select name='albumname' onchange='get_albumno(this.value);'>"; $select .= "<option value='0&0'>Select an album ...</option>"; for($i=0; $i < mysql_num_rows($result); $i++) { $albumname = mysql_fetch_object($result); $select .= "<option value='".str_replace("'","-",$albumname->albumname)."&".$albumname->albumno."'>". $albumname->albumname ." - ". $albumname->albumno ."</option>"; } $select .= "</select>"; //define a maxim size for the uploaded images in Kb define ("MAX_SIZE","1024"); //This function reads the extension of the file. It is used to determine if the file is an image by checking the extension. function getExtension($str) { $i = strrpos($str,"."); if (!$i) { return ""; } $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } //This variable is used as a flag. The value is initialized with 0 (meaning no error found) and it will be changed to 1 if an errro occures. If the error occures the file will not be uploaded. $errors=0; //checks if the form has been submitted if(isset($_POST['Submit'])) { //reads the name of the file the user submitted for uploading $image=$_FILES['image']['name']; //if it is not empty if ($image) { //get the original name of the file from the clients machine $filename = stripslashes($_FILES['image']['name']); //get the extension of the file in a lower case format $extension = getExtension($filename); $extension = strtolower($extension); //if it is not a known extension, we will suppose it is an error and will not upload the file, otherwize we will do more tests if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png") && ($extension != "gif")) { //print error message echo '<h1>Unknown extension!</h1>'; $errors=1; } else { //get the size of the image in bytes //$_FILES['image']['tmp_name'] is the temporary filename of the file in which the uploaded file was stored on the server $size=filesize($_FILES['image']['tmp_name']); //compare the size with the maxim size we defined and print error if bigger if ($size > MAX_SIZE*1024) { echo '<h1>You have exceeded the size limit!</h1>'; $errors=1; } if(!empty($_POST["temp_albumno"])){$newname="users/$userid/".$_POST["temp_albumno"];} //verify if the image has been uploaded, and print error instead $copied = copy($_FILES['image']['tmp_name'], $newname); if (!$copied) { echo '<h1>Copy unsuccessfull!</h1>'; $errors=1; } if(!$errors) { header("location: ../member_home.php?cover=1"); exit(); } } } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Welcome to fanjunky.com! - New Music - Bands- MP3 - Tickets - Tour Dates - The Latest Band = <?php $sql = "SELECT * FROM user WHERE userid = '$userid'"; $result = mysql_query($sql) or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo $row['bandname']; } ?> </title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="default.css" rel="stylesheet" type="text/css" media="screen" /> <script> function get_albumno(v) { var v = v.split("&"); if(v[0] == 0) { document.getElementById("cover_msg").style.color = "#f00"; document.getElementById("cover_msg").innerHTML = "You must select and album first." } else { v[0]=v[0].split("-").join("'"); document.getElementById("cover_msg").style.color = "#00f"; document.getElementById("cover_msg").innerHTML = "Album <b>'" + v[0] + "'</b> selected."; document.getElementById("temp_albumno").value = v[1];} } </script> </head> <body> <?php include('include/header.php'); ?> <div id="page"> <div id="content"> <div class="post greenbox"> <div class="title"> <h1>band discography - Album Cover</h1> </div> <div class="entry"> <p>Please upload the album cover</p> <p id="cover_msg" style="color:#f00;font-size:14px;font-style:italic;">Select an album from the dropdown box.</p> <?php echo $select; ?> <p>Upload Cover</p> <form name="newad" method="post" enctype="multipart/form-data" action=""> <input id="temp_albumno" name="temp_albumno" type="hidden"> <table> <tr><td><input type="file" name="image"></td></tr> <tr><td><input name="Submit" type="submit" value="Upload image"></td></tr> </table> </form> </div> <div class="btm"> <div class="l"> <div class="r"> <p class="meta"> </p> </div> </div> </div> </div> <br /> <div class="two-columns"> <div class="columnA"> <div class="title red"> <h2>sponsers</h2> </div> <div class="content"> <script type="text/javascript"> google_ad_client = "pub-1087428711969548";