Jump to content

Search the Community

Showing results for tags 'grid'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 3 results

  1. First off, I am very new to php and I am learning the best I can. I am trying to display a dynamic grid style table within a loop and display my mysql data inside of it. The data is a Image URL, directory URL, URL description, and it prints all this data as an image with a link to the gallery. The code works fine as... 5 wide x 5 down. It's supposed to look a little something like this: [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Now that works, however when I change my rows and column variable # to 7 and 7 is when the problems start.. Here is my main code for this function: //define variables $uniqhash = ""; $modelname = ""; $email = ""; $galleryurl = ""; $gallerydesc = ""; $category = ""; $datesubmitted = ""; $gallerythumb = ""; $rows = 0; $count = 0; $columns = 0; $select = "SELECT * From `models`"; $images_rows = mysqli_query($conn, $select); $images = array(); if( empty( $images ) ) { echo 'Sorry, there was a fatal error in selecting images from database.'; } while ($image = mysqli_fetch_assoc($images_rows)) { $images[] = $image; } echo '<table align="center" border="0"><tr>'; $size = sizeOf($images) - 1; //get count of array and put into $size foreach($images as $image){ if($rows == 7) { echo '</tr><tr>'; // if our count is x wide, start a new row $rows = 0; } if ($columns == 7){ echo '</tr><tr>'; $columns = 0; } echo "<td><a href=" . $image['galleryurl'] . " target=\"new\"><img src=" . $image['gallerythumb'] . " height=\"160\" width=\"160\" alt=\"" . $image['gallerydesc'] . "\"></a></td>"; $rows++; $count++; $columns++; echo ($rows == 7 && $columns == 5 && $count != $size) ? '</tr>': ''; } echo '</tr></center></table>'; When I change $rows and $columns to 7 each it will display images like: (sample of 13 images) [] [] [] [] [] [] [] [] [] [] [] [] [] [] I would like it to print x images across for $rows and x amount of rows for $columns in a grid like fashion. If anyone can give me some help on this I would appreciate it...I have been desperately reading up on loops trying to figure it out but so far no luck. P.S I am familiar with sanitizing all my data and that I need to implement this but I want to make sure my code functions first.
  2. Hi I have one issue. I do not know how to solve and also no idea. It is my scenario. I have Product table with details,selling price, purchase price and so on. I want to invoice to clients. Clients can buy lots of item in single invoice. If I select product, it will display the Name of item,Sell price Uom in text box. If I click the add button, it will show in grid in php page. I have to do this one by one until client's ordered items completed. Then I click submit, then the items in Grid should be saved into Mysql Data table. It look like cart, but not If there is any idea and how to do this, pls share your knowledge with me. Thank you Maideen
  3. I have a table like this (please see the image attached) in excel which i need to get from the database The database columns are Table : ExpenseLedger expenseHead : This is the head of the expense eg Rent, CESC,TEA etc which comes from a master table[/size] Amount : This is the amount entered on the head on the date[/size] paidDate : This stores the date when the expense is entered[/size] I need to create the view and possible edit option to update the database using ajax/jquery. The data should be every month basis and i need to see the dates for that month Can anybody help me with a similar code or direct me to any example. Thanks in advance
×
×
  • 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.