PHP - Page Content Cutoff In Ipad
http://buildmyweb.org/testing/starter/
at the link above, you can see a test-page. the problem im having is that the content in the footer gets cutoff on the right side of the footer when viewed in an ipad. id love to hear it if anyone can figure out why
here is the html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="keywords" content = "Under Construction" /> <meta name="description" content="is currently Under Construction." /> <title>Under Construction</title> <link rel="stylesheet" type="text/css" href="bmw_footer_abs.css" /> </head> <body id="page_home"> <div id="wrapper"> <div id="banner"> </div> <!-- close banner --> <div id="main"> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </p> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </p> </div> <!-- close main --> </div> <!-- close wrapper --> <div id="footer"> <div id="footer_content"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </div> <!-- close footer_content --> </div> <!-- close footer --> </body> </html>and the css: html { position: relative; min-height: 100%; } body { margin: 0 0 100px; /* bottom = footer height */ } #footer { position: absolute; left: 0; bottom: 0; height: 100px; width: 100%; min-width:1000px; background:gray; } #wrapper { position:relative; top:0px; margin:0 auto; width:1000px; text-align:left; background:pink; padding:0px; } /* **************** BANNER *************** */ #banner { float:left; background:green; width:100%; height:10px; } /* **************** MAIN *************** */ #main { float:left; width:100%; background-color:#f0f3f8; } /* **************** FOOTER *************** */ #footer { font-size:85%; line-height:1.3; } #footer_content { width:1000px; margin:0px auto; background:orange; } Similar TutorialsHi all ! I am using the phpgraphlib library for charting. I am using a bar-graph. (example 3 on https://github.com/elliottb/phpgraphlib/commit/d5096c8cbb38d75452f4d7036b7a64979b5e19db). I am displaying the dates on the x-axis. However the dates only show the month and date but the year is cutoff. Is there some way to get the x-axis to move up to accommodate the complete date along the x-axis? Thank you.
Edited December 20, 2019 by ajoo About a year ago I wrote a mod_rewrite in at sites htaccess file. It was to call a page that queried the database based on a unite code that was assigned to a member. If the member was assigned a code that was FL1001, the URL www.marketingteammates.com/FL1001 would bring up a page that quaried that member and displayed their database content.
In the users table of the site, it quaried the field webPageID and the information was called. It called a page webpage.php that quaried the info. The URL in the address bar still displayed www.marketingteammates.com/FL1001. Here are the lines of code in the htaccess file.
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([A-Za-z])([A-Za-z])([0-9]+)$ /webpage.php?webPageID=$1$2$3 [NC,L]I now have a second page completely different from the webpage.php. It is a page storeNumber.php and would query a field storeNumberID. This field could contain any kind of string such as Store#101, or mystore101, or #101 is my store. I tried using the same rewite rule just replaceing the webpage.php and variable with storeNumber.php and $storeNumberID. This doesn't work. It also leads me to wonder if there can even be two different pages in the mod_rewrite. How would it diferentiate one from the other. Thanks for any help in advance. Mike Hi every one I want to share a page content(or an article) into my facebook page via php . How should I do that ? Thanks Hi Guys,
I have a navigation menu that works great on a desktop however on a mobile or touch screen device the navigation menu doesn't seem to pause when i click on the drop down menu. Any help with a solution to this?
index.php with menu
<div class="header"> <div class="nav"> <ul class="drop-menu"> <li><a class="first current" href="#"><span class="first-border-left"> </span>home</a></li> <li><a href="#" title="About Us">about us</a> <ul> <li><a href="#" title="Latest News">Latest News</a></li> <li><a href="#" title="Why choose us">Why choose us</a></li> <li class="end"><a href="#" title="Mission Statement">Mission Statement</a></li> </ul> </li> <li><a class="last" href="#" title="Contact Us"><span class="first-border-right"> </span>Contact Us</a></li> </ul> </div> </div>css file .header .nav {min-height:58px; position:absolute; top:193px; z-index:6;} .drop-menu { margin:0 0 0 0px; padding:0 0 0 0px; list-style: none; width:940px; font-size:14px; line-height:58px; text-transform:uppercase; } .drop-menu li a { text-decoration:none; color:#fff; font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; width:146px; text-align:center; display:block; border-right:1px solid #616161; background:url(menu-tail.gif) 0 0 repeat-x #0c2362; } .drop-menu li a:hover { color:#fff; background:url(menu-hover.gif) 0 0 repeat-x #0c2362; } .drop-menu li.dropHover a { background:url(menu-hover.gif) 0 0 repeat-x #0c2362; } .drop-menu a.current { color:#3e3e3e; background:url(menu-active.png) 0 0 repeat-x #d8d6d6; border-top:none; } .drop-menu li.dropHover a.current { color:#3e3e3e; background:url(menu-active.png) 0 0 repeat-x #d8d6d6; } .drop-menu ul { position: absolute; top: -999em; background:url(submenu-tail.png) 0 0 repeat !important; } .drop-menu ul li { width: 100%; } .drop-menu li:hover { visibility: inherit; } .drop-menu li { position: relative; background:none; float:left; line-height:58px; height:58px; } .drop-menu li li { font-size:12px; height:40px; line-height:40px; background:url(menu-spacer.gif) center bottom no-repeat; } .drop-menu li .end { border:none; background:none; } .drop-menu li li a { font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; font-weight:bold; color:#fff; line-height:40px; height:40px; width:188px; overflow:hidden; display:block; border:none; background:none !important; } .drop-menu li li li { height:34px; line-height:34px; } .drop-menu li li a:hover, .drop-menu li li.dropHover a { color:#038ee7; } .drop-menu li li li a { height:34px; width:200px; font-size:12px; padding:0; margin:0; color:#fff !important; text-align:center; line-height:34px; border:none; background:url(menu-spacer.gif) center bottom no-repeat; } .drop-menu li li li a:hover { color:#038ee7 !important; } .drop-menu li li li li { height:34px; line-height:34px; } .drop-menu li li li li a { height:34px; width:200px; font-size:12px; padding:0; margin:0; color:#0c2362 !important; text-align:center; line-height:34px; border:none; background:url(menu-spacer.gif) center bottom no-repeat; } .drop-menu li li li li a:hover { color:#038ee7 !important; } .drop-menu a { display: block; position: relative; } .drop-menu li:hover ul, .drop-menu li.dropHover ul { left: -1px; top: 58px; z-index: 99; } ul.drop-menu li:hover li ul, ul.drop-menu li.dropHover li ul { top: -999em; } ul.drop-menu li li:hover ul, ul.drop-menu li li.dropHover ul { left: 188px; top: 0; } ul.drop-menu li li:hover li ul, ul.drop-menu li li.dropHover li ul { top: -999em; } .drop-menu .first { width:84px; border-right:1px solid #616161; position:relative; } .drop-menu .first span.first-border-left { width:6px; height:58px; float:left; background: url(nav_left.png) top left no-repeat; } .drop-menu .last span.first-border-right { width:6px; height:58px; float:right; background: url(nav_right.png) top right no-repeat; } .drop-menu .last { width:120px; border-right:none; position:relative; } I have been using some CSS written by Matthew Taylor (www.http://matthewjamestaylor.com), for displaying my web page on iPad orsimilar device. It works in most cases but for some reason it gives strange results when I try to output a table in the main screen area.
It puts the title heading in the right place, but the table for some reason underneath the footer and the page menu disappears completely.
It is usually caused by unclosed div tags, but I have checked them and they appear to be correct.
There is a good explaination of how the CSS works on his web site.
Here is the code for the PHP/HTML:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="generator" content="CoffeeCup HTML Editor (www.coffeecup.com)"> <meta name="dcterms.created" content="Sat, 02 Mar 2013 20:21:23 GMT"> <meta name="description" content=""> <meta name="keywords" content=""> <meta name="viewport" content="width=768px, minium-scale=1.0, maximum-scale=1.0" /> <title></title> <link rel="stylesheet" href="stylesheets/ipad.css" /> <!--[if IE]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div id="fb-root"> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script></div><!--end fb-root--> <div id="wrap"> <!--Start wrap--> <div id="header"> <!--Start header--> <img src="images/Head!.png" width="100%" height="150px" alt="" title="" border="0" /> <h1>1066 cards4U</h1> </div><!-- end header --> <div id="content"> <!--Start content--> <div id="main"> <!--Start main--> <h3>Statistics for <? echo $Country; ?> in 2014</h3> <h4>If only the header is shown, there is no data for this country</h4> <?php include('connect_visits.php'); doDB7(); $limitStart = $_POST['QUARTER'] - 13; $Visit_data="SELECT WeekNo.WNo, WeekNo.WCom, Countries.Country, ctryvisits.CVisits FROM ctryvisits LEFT JOIN Countries ON ctryvisits.country = Countries.CID LEFT JOIN WeekNo ON ctryvisits.WNo=WeekNo.WNo WHERE Countries.CID = '{$_POST['country']}' ORDER BY ctryvisits.WNo LIMIT {$limitStart}, 13"; $Visit_data_res = mysqli_query($mysqli, $Visit_data) or die(mysqli_error($mysqli)); $display_block = " <table width=\"20%\" cellpadding=\"3\" cellspacing=\"1\" border=\"1\" BGCOLOR=\"white\" > <tr> <th>Week No</th> <th>Week Commencing</th> <th>Visits</th> </tr>"; while ($C_info = mysqli_fetch_array($Visit_data_res)) { $Cid = $C_info['WNo']; $Visits = ($C_info['CVisits']); $WeekNo = ($C_info['WCom']); //add to display $display_block .= " <tr> <td width=\"1%\" valign=\"top\">".$Cid."<br/></td> <td width=\"8%\" valign=\"top\">".$WeekNo."<br/></td> <td width=\"5%\" valign=\"top\">".$Visits."<br/></td> </td></tr>"; } mysqli_free_result($Visit_data_res); $CNo2Cty ="SELECT CID, Country FROM Countries WHERE CID='{$_POST['country']}'"; $CNo2Cty_res =mysqli_query($mysqli, $CNo2Cty) or die(mysqli_error($mysqli)); if (mysqli_num_rows($CNo2Cty_res)<1){ $display_block="<p><em>Invalid Country, Please try again</em></p>"; } while ($C_name = mysqli_fetch_array($CNo2Cty_res)) { } mysqli_free_result($CNo2Cty_res); //mysqli_close(mysqli); ?> <?php echo $display_block; ?> <div class="fb-comments" data-href="http://www.1066cards4u.co.uk" data-width="470"></div><br /> <div class="fb-like" data-href="http://www.1066cards4u.co.uk" data-send="true" data-layout="box_count" data-width="300" data-show-faces="true" data-font="arial"></div> <!-- end fb-like --> </div> <!--end main--> <div id="side"> <!--Start side--> <div id="sidea"> <!--Start sidea--> <h3>Main Menu</h3> <p><ul> <li><a href="index1.html">Home</a></li> <li><a href="iLinks.html">Links</a></li> <li><a href="iTechniques.html">Techniques</a></li> <li><a href="iVerse_Menu.html">Verse's</a></li> <li><a href="icontact.html">Contact Us</a></li> <li><a href="iblog.php">Blog</a></li> <li><a href="iAboutUs.html">About Us</a></li> <li><a href="iGallery.html">Gallery</a></li> <li><a href="iStats_Menu.html">Stats</a></li> <li><a href="iRelHol_Menu.html">Religious Holiday's</a></li> <li><a href="iSub_form.html">Subscribe to Newsletter</a></li> </ul></p> </br> </div> <!--end sidea--> <div id="sideb"> <!--Start sideb--> </div> <!--end sideb--> <div id="sidec"> <!--Start sidec--> </div> <!--end sidec--> </div> <!--end side--> </div> <!--end content--> <div id="footer"> <!--Start footer--> <p>© 2012 Content:1066 Cards 4U. All rights reserved. <br /> With thanks to Matt Taylor - matthewjamestaylor.com</p> </div> <!--end footer--> </div> <!--end wrap--> </body> </html>Here is the CSS: * { margin:0; padding:0; } h2 { padding:1em 0 0 0; } p { line-height:1.4em; } p + p { text-indent:2em; } body { font-size:100%; text-align:center; background:#ddd; } pre { display:block; margin:1em 0 0 0; width:488px; } pre code { background:#eee; display:block; padding:10px; } .r { float:right; padding:0 0 10px 20px; } /* Landscape mode (default) */ #wrap { margin:0 auto; width:1024px; position:relative; overflow:hidden; text-align:left; background:#fff; } #header { float:left; width:1024px; padding:10px 0 20px 0; background:#fff; border-bottom:1px solid #000; } #header h1 { padding:10px 30px 0 30px; } #header p { padding:0 30px; line-height:1.4em; } #content { float:left; width:1024px; background:#eee; position:relative; left:768px; } #main { float:left; width:708px; position:relative; right:738px; padding:20px 0; } #side { float:right; width:216px; position:relative; right:788px; padding-bottom:20px; } #sidea, #sideb, #sidec { clear:left; float:left; width:216px; } #footer { clear:both; float:left; width:1024px; border-top:1px solid #000; background:#ddd; } #footer p { padding:20px 30px; } @media only screen and (orientation:portrait){ /* portrait mode */ #header, #wrap, #footer { } #content { left:0; background:#fff; } #main { float:left; width:708px; position:relative; right:0; left:30px; padding:20px 0; } #side { clear:left; float:left; width:768px; right:0; padding-bottom:20px; background:#eee; } #sidea { clear:none; width:216px; float:left; position:relative; left:30px; padding-top:20px; } #sideb { clear:none; width:216px; float:left; position:relative; left:60px; padding-top:20px; } #sidec { clear:none; width:216px; float:right; position:relative; right:30px; padding-top:20px; } #footer { position:absolute; bottom:0; width:100%; height:60px; /* Height of the footer */ background:#6cf; width:768px; } }I have spent hours trying different things, but I can't find a solution. I believe its a CSS problem, but if you think it is HTML can the moderator move it? Your help would be appreciated. My php and MySQL scripting works perfectly, but when someone enters data into the php form, using an iPad with Safari browser, all number entries are inserted into the database table incorrectly. It is still a number entry but the number differs substantially from the original input. Note: All other entries, where the individual selects something from a drop-down list and date selecter works perfectly from the same form. Please help me here, since at least 70% of my employees use iPads, thus I need to find a cure for this problem ASAP. Thanks in advance for any help offered. JayDude Hello. I am attempting to display content from a database to a web page. I have SELECT * etc to do this, plus the menu that should be displayed has links to pages. This would display text to the page depending on the link, for this to work I use the id of the page ($Get['id']). Following advice (not code), I have attempted the following:
<!DOCTYPE html> <html> <?php include 'includes/headsection.php'; ?> <body> <?php // query database if (!empty($_GET['id']) && (intval($_GET['id']) == $_GET['id'])) { $pdo_statement = $conn->prepare("SELECT * FROM pages WHERE id=:id ORDER BY id ASC"); $pdo_statement->execute(['id' => $_GET['id']]); $result = $pdo_statement->fetchAll(); } ?> <!-- topMenu --> <table id="topMenu"> <tr> <td><h1 class="siteName">Site name</h1></td> <td> <?php if(!empty($result)) { foreach($result as $row) { ?> <a href="index.php?id=<?php echo $row['id']; ?>"><?php echo $row['menuheader']; ?></a> <?php } } ?> </td> </tr> </table> This issue is that the top menu (home, etc), does not appear, and there are no errors to suggest what I have done wrong. Any help will be appreciated. I include a picture of what I mean. There should be Home | other | etc...
Currently, in my files, I echo content through either a function called error() or a funtion called info(). Each function has 3 require statements for the header, body and footer files and that is all that is contained in the function. What I want to do is, if error() is called, is kind of leave the script and exit it. Surprisingly I have used exit; at the end of the functions to stop any more of the script being executed. Is this the best way of doing it? I have a php page in which javascript called like this <script language="JavaScript" type="text/javascript" src="http://www.test.com/test.php"></script> the output of the page shows a well detail table , but when i use file_get_content method to get that all detail in a varaible its just took above javascript like $a=<script language="JavaScript" type="text/javascript" src="http://www.test.com/test.php"></script> when i right click on page to view source it show just <script language="JavaScript" type="text/javascript" src="http://www.test.com/test.php"></script>. But on actual page there is a html table which detail i have to store in table, Can any one tell me method. I'm doing a cURL post to a server and it returns "true No_Error Data was accepted 10356546 3770 false 0 " Form --> Method=Post --> submit.php (this is the page that's doing the cURL post and the server returns data that appears on this page). How do I take this and put it into a string? Good day everyone! I know this is possible but I do not know how to do it. I have a single page, this page has no dynamic content. I have a set of links. What I need is to have content placed on the page based on the link the user clicks. Example: I have pictures of animals. When the user click a Zebra, the Zebra info is placed on the page. So the page does not change, meaning the content on the page changes but not the page it self. The idea is instead of creating different html pages for each animal profile, the profile is generated to the page from a php include file. Is is this possible? Can anyone, some one please point me to how I can get this going. Thanks everyone! IC What I'm trying to do is get a php file with content to load into my basic page template based on the page id, however it's not loading anything, however there are no errors coming up. I've looked everywhere I could find, and tried everything I could think of. I really could use some help on this. Below is the page template code and the code I'm trying to use to get the content to load up. page_templ.php Code: [Select] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" > <link rel="stylesheet" type="text/css" href="templates/content/style.css" > <!--This is the css used for IE because we need to correct some things for it.--> <!--[if IE]> <style type="text/css"> @import 'templates/content/styleIE.css'; </style> <![endif]--> </head> <body> <?php //We need to load our language files with our common text varibles require("content/langeng.php"); ?> <div id="header"> <? //Lets show the header. I use html where I can so smartphones load as little advanced code as possible require_once("header.php"); ?> </div> <div id="menu"> <?//Now our menu. require_once("menu.php"); ?> </div> <div id="mbody"> <?//Now the primary site content. //Load up our postvars.php file require_once("content/postvars.php"); ?> </div> </body> </html> postvars.php Code: [Select] <?php $id = $_POST["id"]; if ( $id == "home" ) { include 'main_c.php'; } elseif ( $id == "guides" ) { include 'guides_c.php'; } elseif ( $id == "trips" ) { include 'trips_c.php'; } ?> Most of the websites I have built have not been large and not dynamic in nature, but I need to make one now with a boatload of content on it. and I’m needing a little resource help where I can research something. I’m sure all developers do this, and I know I need a massive database or 2 and the PHP knowledge I already have, but I’m just looking for a little guidance about how to do this the easiest way. It may actually sound like a stupid question and I might be over-thinking a bit. So… Lets say I have 500 articles that I want to make available to a site visitor and give them the option to choose what they want to look at through nav menus and submenus. I want the same page to display to the user, regardless of what article is chosen. how does PHP play a part in that? Would I be right by saying the following? If the home page had this content on it: This website is a course in PHP coding. <a href="courseTemplate.php" target="_blank">Click here</a> to view course #1. and I wanted all the course content to be displayed through the use of the “courseTemplate.php” file, how simple is that? I would assume that these types of things would be the results and the techniques to accomplish the goal, right? => a resulting URL that looks like this: www.site.com/courseTemplate.php?id=1 => storing all the text of the course material in one single field of a DB record. NOT storing the layout-oriented code (HTML, etc.) and echoing it out with the rest of the text. => making use of the GET() function somehow to pull the course’s text content out of the database. Can someone show me a website that demonstrates this? I don’t think this is very difficult, and I’m sure there are web resources available that show how this is done. I’m almost sure that most news agency websites do this, and I know for a fact that most forum software has this template technique written into it, regardless if SEO is included or not. Sorry for the basic nature of this question. I know some of my previous posts have been such where I’ve asked much more difficult questions than this. I have seen youtube tutorials on issues similar to this, but nothing pulled up by google really shows this in a very simplistic nature. thanks. Hello! I would like to use cURL to login to the website: lockerz.com I have some code, but it doesn't seem to work: <?php // INIT CURL $ch = curl_init(); // SET URL FOR THE POST FORM LOGIN curl_setopt($ch, CURLOPT_URL, 'http://lockerz.com/auth/login'); // ENABLE HTTP POST curl_setopt ($ch, CURLOPT_POST, 1); // SET POST PARAMETERS : FORM VALUES FOR EACH FIELD curl_setopt ($ch, CURLOPT_POSTFIELDS, 'email-email=EMAIL@hotmail.com&password-password=PASSWPRD'); // IMITATE CLASSIC BROWSER'S BEHAVIOUR : HANDLE COOKIES curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); # Setting CURLOPT_RETURNTRANSFER variable to 1 will force cURL # not to print out the results of its query. # Instead, it will return the results as a string return value # from curl_exec() instead of the usual true/false. curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); // EXECUTE 1st REQUEST (FORM LOGIN) $store = curl_exec ($ch); // SET FILE TO DOWNLOAD curl_setopt($ch, CURLOPT_URL, 'http://lockerz.com/auction'); // EXECUTE 2nd REQUEST (FILE DOWNLOAD) $content = curl_exec ($ch); // CLOSE CURL curl_close ($ch); echo $content; ?> Thank you very much if you can help! Hi there, I have updated a webpage and it appears that some users are still seeing the older version of the page. Is there a way I can force the user's version of the page to display the latest content on the page? I have see I can add some meta tags which control the cache, but my site relies quite heavily on cookies, so I guess clearing the cache would reset/have an effect on the cookies? Does anyone have any ideas on how I can make users always see the latest content? Thanks! Hi, I've done some serious google'ing... I'm all googled out and it doesn't appear there is a solution to this the way I'm attempting it and it's probably more a case of my early ventures into development that I'm missing something that may or may not be a better and if not more obvious way to do this... Here's the principle, Customer Logs into webpage - greeted by profile page (all cushty so far) - Can choose to move to view 'audio files' which relate to the products they have purchased (this is where it gets silly...) The idea is that both the profile page and the audio page are controlled by a $_SESSION within PHP scripting so the pages are dynamic. I want to include all of the audio files for every product on the 'audio.php' page BUT I only want the ones that they have purchased to be visible... All the setup is fine because the following works fine: Code: [Select] if($info['halftimerock'] == 1) { echo "<p>Half Time Rock</p>";} Which essentially checks the db, finds a 1 in the appropriate product and displays the name of the product in a list, if no products then nothing in the list etc. What I want to do is control the visibility of some <div>'s using the same kind of idea, so: Code: [Select] if($info['halftimerock'] == 1) { CODE TO DISPLAY DIV IN HERE } I have a 'toggleelement' JS function available which works for mouse clicks but obviously php and js don't exactly go well together so that is probably not the way to go, I'm already running a lot of PHP at the top of the page before the HTML to stop session header errors. A couple of web searches have suggested I insert a <script> tag into the echo command but I can't get that to work and I guess it's a really messy way of trying to do things! So here's the question, any ideas about how to toggle <div> visibility within php or is that purely something for js to handle?... Is there a better/cleaner way of doing it all, perhaps redirecting users to different pages based on their entries in the DB (which could all be handled with headers but I'll end up with a million different pages and combinations eventually? I could always create a .htaccess/.htpasswd file system and handle the folders with audio content in manually so that all files are visible but only a valid username and password will be able to access the file but that's going to get annoying for people having to put in user/pass for every file and also for me updating the users for each individual file every time some1 buys something... Any ideas? Anybody done anything similar? Cheers Hello! I have my own framework through which all modules are loaded and content is stored in specific class. At the end all the content is displayed on screen. I'm stucked at this last step when I want with php function (print or echo) to display the contents of all pages on screen. Then the server obviously can't handle this, because after a few clicks page hangs (stops responding - until I close the browser and reopen the page). Maybe are there some restrictions on server? Page is loading on other server just fine (that other server is a little bit faster). it' online shop with lots of html code (that's the only difference between pages that works and this one that hangs!) Any ideas? This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=357949.0 Hi. I’m hoping someone can help me pull the styling/formatting from a static page onto a category template. The content is pulling fine, but it's not formatted/styled. Code used to pull content from static page onto custom category template: <?php $page = get_page_by_title( 'page-name' ); $content = apply_filters('the_content', $page->post_content); echo $content; ?> With the above code, the content is being pulled, but the formatting and styling is not being pulled. The following code is adapted to pull the styling/formatting: <?php $page = get_page_by_title( 'Wedding Venues in Costa Rica' ); $content = apply_filters('the_content', $page->post_content); echo do_blocks( $content );> It did not pull the styling/formatting. We’re using GeneratePress Pro + Generate Blocks (no page builder). The static page is built with Gutenberg and GenerateBlocks. By the way, I'mm not a coder or a developer. I know a little about this and about that, but this isn't my field of expertise. Could someone please suggest what can be done to this code to get it to pull the styling form the static page onto the custom category template? Thank you very much. This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=314750.0 |