If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Member longislandhub's Avatar
    Join Date
    Jan 2019
    Member #
    7 times

    Wink How To Adjust Images With HTML/CSS Using PHP?

    I am learning PHP right now so I am very novice but know HTML & CSS. My brain is a little fried was wondering if someone could help me out with adjusting an image size using this Local Host PHP Code?

    My code is below thank you!

    include_once 'includes/';

    <!doctype html>
    <meta charset="utf-8">


    $data = "Admin";
    //Created a template
    $sql = "SELECT * FROM players;";
    //Create a prepared statement
    $stmt = mysqli_stmt_init($conn);
    //Prepare the prepared statment
    if (!mysqli_stmt_prepare($stmt, $sql)) {
    echo "SQL statement failed";
    } else {

    //Run parameters inside database
    $result = mysqli_stmt_get_result($stmt);

    while ($row = mysqli_fetch_assoc($result)) {
    echo $counter . ". ".$row['name'] . "<br>";
    echo '<img src="' . $row['image'] . '"><br>';




  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Cottage Grove, Minnesota
    Member #
    725 times
    Do you want to actually change the size of the image permanently (in your database), or just change the size as it is displayed on the web page?

    And also ... you have your images in a directory and the database holds the filename of the image?

    You need to be more specific on what you are trying to do.

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Tags for this Thread

All times are GMT -6. The time now is 01:21 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: