What i mean is on my site at the moment i upload the files manually by editing the html. So would it be possible to create an upload script that has themename, size, comments etc and uploads the info into a database. Then use php to make it so that there is a page full of 25 previews and names, then when you click the preview you goto a theme info page which has the name, comment, file size etc on it?
I don't mind uploading the files my self so it doesn't need to do that.
Anyway all i want to know is if it's possible, not asking anyone to do it for me as it's a challenege for me
. May need a hell of a lot of help though
.
Ok first stage done i have completed the upload script, it's the displaying bit now. Well my question really was suppose to be for displaying the info. Would the whole thing work e.g will i be able to display the info.
Maybe somthing like
$name="SELECT name FROM table";
$url="SELECT url FROM table;"
echo "$name";
echo "<br>";
echo 'a href="'
echo "$url";
echo '">click here to download</a>';
Ok this is going to be alot of work. How do sites like mobile 9 do it though? As i can see you'll still have to add the pages manually.
Humm, need to research how to do the stuff like this: .../k700/index.php?id=1
even bigger security issue
Edit: ok, idealy i'd like somthing like this:
Code: Select all
echo '<table width=720 border=0 style="border-collapse: collapse">';
echo '<tr><td width="130px height="122px""><a target="_blanc" href="./assets/images/large/$filenameVZ.jpg">
<img class="preview" src="./assets/images/
$filenameVZ.jpg" alt="$name Preview-
Click here for a full size preview"
width="128" height="160" border="0"></td><td><br><b>Name:</b> $name
<br><b>Date Created:</b> $date
<br><b>Animated:</b> $ani
<br><b>Size:</b> $size
<br><b>Comments:</b> $comment
<br><br><a href="http://members.lycos.co.uk/vthemes/k700/assets/themes/$name.thm">Click here
to download</a></p><.td>';
$name=mysql_query(SELECT `name` FROM `themes`);
$flname=mysql_query(SELECT `filename` FROM `themes`);
$date=mysql_query(SELECT `date` FROM `themes`);
$ani=mysql_query(SELECT `animation` FROM `themes`);
$size=mysql_query(SELECT `size` FROM `themes`);
$comment=mysql_query(SELECT `comments` FROM `themesvz`);and i want the 2 <td> bits to keep repeating 5 times then close the table.
However, i don't want it to be the same data in each field but instead the next row of the table, so $name isn't the name of the first line in the database but instead the second on the second line down in the table. If you understand what i mean?
Also is there a way of getting variables to appear in that one echo without having to go onto another one e.g at the moment i'd have to do this:
Code: Select all
echo '<table width=720 border=0 style="border-collapse: collapse">';
echo '<tr><td width="130px height="122px""><a target="_blanc" href="./assets/images/large/';
echo "$filename";
echo 'VZ.jpg"><img class="preview" src="./assets/images/';
...
Thanks in advanced
Edit 2: Second part complete (i have managed to find a way of displaying the results on the page). Now it's time to find a way of getting 5 on page one then getting the next 5 on page 2 etc. Humm
Edit 3: i think i've cracked it and will finnish it off tommorrow
.BTW forgot to say after edit 2 i'm using:
Code: Select all
$result1=mysql_query("SELECT `name` FROM `themes` ORDER BY `dateuploaded` DESC ");
$result2=mysql_query("SELECT `filename` FROM `themes` ORDER BY `dateuploaded` DESC ");
$result3=mysql_query("SELECT `date` FROM `themes` ORDER BY `dateuploaded` DESC ");
$result4=mysql_query("SELECT `animtaion` FROM `themes` ORDER BY `dateuploaded` DESC ");
$result5=mysql_query("SELECT `size` FROM `themes` ORDER BY `dateuploaded` DESC ");
$result6=mysql_query("SELECT `comments` FROM `themes` ORDER BY `dateuploaded` DESC ");
echo '<table width=720 border=0 style="border-collapse: collapse">';
/*change no.s below depending on which results i want e.g 5 < 10 for second page*/
$i=0;
$n=5;
while ($i < $n) {
$name=mysql_result($result1,$i);
$flname=mysql_result($result2,$i);
$date=mysql_result($result3,$i);
$ani=mysql_result($result4,$i);
$size=mysql_result($result5,$i);
$comment=mysql_result($result6,$i);
echo "<!--$name Theme-->";
echo '<tr><td width="130px" height="122px"><a target="_blanc" href="./assets/images/large/';
echo "$flname";
echo 'VZ.jpg">
<img class="preview" src="./assets/images/';
echo "$flname";
echo 'VZ.jpg" alt="';
echo "$name";
echo ' Preview-
Click here for a full size preview"
width="128" height="160" border="0"></a></td><td><br><b>Name:</b>';
echo " $name
<br><b>Date Created:</b> $date
<br><b>Animated:</b> $ani
<br><b>Size:</b> $size
<br><b>Comments:</b> $comment
<br><br><a href=";
echo '"http://members.lycos.co.uk/vthemes/k700/assets/themes/';
echo "$flname";
echo '.thm">Click here
to download</a></td></tr>';
$i++;
}



