Simple default images switcher

Fertiggestellt Veröffentlicht vor 6 Jahren Bezahlt bei Lieferung
Fertiggestellt Bezahlt bei Lieferung

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

Projekt-ID: #14966337

Über das Projekt

6 Vorschläge Remote Projekt Aktiv vor 6 Jahren

Vergeben an:

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 Mehr

$10 USD in 0 Tagen
(150 Bewertungen)
6.5

6 Freelancer bieten im Durchschnitt $12 für diesen Job

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 Mehr

$10 USD in 10 Tagen
(56 Bewertungen)
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 in 10 Tagen
(14 Bewertungen)
4.0