php - Get a different image from the database depending on screen size -
I am starting to create a web app and the idea is that this load is based on the URL Will be accessed and pictures from the data base. Www.mitdomà | ne.dk /? Id = 1 0.2 0.3 etc. Up to 50 pieces.
The problem is now that I should have dynamic content to turn on the mobile or pad (depending on the screen size).
What type of screen can I choose PHP and can I remove the correct picture?
So if this is an image that looks in the side which is 320px wide then it is a full one and if this one iPad is 1024px wide.
I have formed the basis of a MySQL base with these areas.
ID: Company: Billed_fil
And the code looks like this.
html:
& lt; Div data-role = "page" id = "side1" & gt; & Lt; Div data-role = "header" data-noblebutton = "true" & gt; & Lt; / Div & gt; & Lt; Div data-role = "content" & gt; & Lt; P class = "broad" & gt; By & lt;? Php echo $ company? & Gt; & Lt; / P & gt; & Lt; Div id = "billede" & gt; & Lt; Img src = "& lt;? Php echo $ billed_fil?"; Alt = "" border = "0" /> & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div data-role = "footer" & gt; & Lt; / Div & gt; & Lt; / Div & gt; PHP:
& lt;? Php includes 'firmaer_db_cnx.inc.php'; $ Id = $ _GET ['id']; $ Sql = mysql_query ("SELECT * FROM info_int WHERE id = '$ id'"); $ Company List = mysql_fetch_array ($ sql); $ Id = $ Company List ['id']; $ Company = $ Company List ['Company']; $ Billed_fil = $ Company List ['billed_fil']; ? & Gt;
This can be just an easy way to use CSS is. Take a look at this demo:
Hint: Resize your browser window.
And here's how to do it. Besides anything else.
Comments
Post a Comment