Simple default images switcher

완료 등록 시간: 6년 전 착불
완료 착불

I am trying to figure out how I can display a default number of image thumbnails with the same default image set for each one when there are no image results available in the database.

So basically I am wanting to show 6 default images in 2 rows of 3 and if a user submits a link to an image then replace the first default thumbnail image with their own which would leave 5 default images still showing etc. Once the user has 6 images submitted then there should be no more default images shown unless the user deletes some images and that number falls under 6 again. After having 6 images submitted the script should still continue showing images in rows of 3 as they are submitted by the user.

The default image location for the 6 images is /images/def.png. The mysql table is images and the column with the user submitted urls is img_urls. I use the users session to match the images submitted by them to the database as you can see below.

function images($user)

{

$db = new DbConn;

$user = $_SESSION['user'];

$sql = "SELECT img_url FROM images WHERE username = :user";

$stmt = $db->conn->prepare($sql);

$stmt->bindParam(':user', $user);

$stmt->execute();

while ($result = $stmt->fetch(PDO::FETCH_ASSOC)){

}

}

MySQL PHP

프로젝트 ID: #14966337

프로젝트 소개

6 건(제안서) 재택 근무형 프로젝트 서비스 이용 중: 6년 전

수상자:

Sonicoders

I have more than 4 years core php programming experience I can provide you the solution quickly we can talk more over [login to view URL] Relevant Skills and Experience PHP,PDO,MYSQL Proposed Milestones $15 USD - pay m 기타

$10 USD (0일 이내)
(150건의 리뷰)
6.5

이 일자리에 대한 프리랜서 6 명의 평균 입찰가: $12

expertjlm

I have 5 years experience about CMS ( WordPress, Joomla), PHP, HTML, CSS, Javascript, PSD to CMS, PSD to HTML. Relevant Skills and Experience MySQL, PHP, Website Testing, WooCommerce, WordPress, CSS, Javascript, HTML5 기타

$10 USD (10일 이내)
(56 리뷰)
5.8
beestechnology

i am ready for work expert in php Relevant Skills and Experience html,css,php Proposed Milestones $15 USD - after half work

$15 USD (10일 이내)
(14 리뷰)
4.0