Jump to content

10 uploads


fazzfarrell

Recommended Posts

There are meny ways mate....

 

Add a field example number_of_pic were the picture names are in that row

 

now each time a user enter a picture you need to let the database no and increment the number...

<?php
$sql="update picture set number_of_pic=number_of_pic+1 where user_id='$user_id'";
?>

 

every time the user uplaods a pic the new database field get added a 1 to it..

 

then do this

 

<?php 
$sql="select * from picture where user_id='$user_id'";

$res=mysql_query($sql)or die(mysql_error());

while($data=mysql_fetch_assoc($res)){

if($data['number_of_pic'])==10)){

echo "To meny pictures!";

}
}
?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/136052-10-uploads/#findComment-709365
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.