Jump to content

wright67uk

Members
  • Posts

    454
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

wright67uk's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. Thankyou for the advice. I went with ipage, a 5th of the price, twice the speed and php mail() is working! I'm working on phpmailer to make things even more reliable.
  2. <?php $to = 'website@mysite.com'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: website@mysite.com' . "\r\n" . 'Reply-To: website@mysite.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ?> All of my websites contact forms have stopped working, so I decided to use the above file as a test. ...no email is sent. Although godaddy will not admit it there is an issue with my hosting account. Is there a way I can bypass godaddy and use a third part service to send my emails until this server issue has been resolved? Can you recommend any hosting providers that are more reliable?
  3. Godaddy.... where do I start? I have been having call after call from various clients of mine saying their webforms have stopped working. All of the contact forms are using the php mail() function. My server is running php 5.3 (which Godaddy fully support). The helpdesk has been unable to help me at all and in fact the conversation basically said we can migrate your 80 sites and 50 daabases at $99 an item.... $4000 !!! and then everything will work as it should. I've decided to look for another hosting provider. This is a two pronged question - 1) Which hosting providers do you recommend? at the moment i'm using 2gb space and 5gb bandwidth, php and mysql. 2) are there any contact form handlers that I can use for the time being that can handle my clients contact forms until I have got to the bottom of what is going on?
  4. Thankyou. I have added return db, and now im getting Fatal error: Call to undefined method mysqli_stmt::bind() <?php function db_connect() { $config = parse_ini_file('config.ini'); $db = new mysqli($config['host'],$config['username'],$config['password'],$config['dbname']); return $db; } if ( isset($_POST['description']) && isset($_POST['name']) ) { $description = $_POST['description']; $name = $_POST['name']; $sql = "UPDATE shrubs SET description=? WHERE name=? "; $stmt = db_connect()->prepare( $sql ) or die( "could not prepare statement"); $stmt->bind("ss",$description,$name) or die( "could not bind parameters"); if ( $stmt->execute() ) { echo "Description Added Successfully" ; } else { echo "Error in query: " . $stmt->error; } } ?>
  5. It's been a while since I have written any php so please excuse me if this code isn't very well constructed. I get an error- Fatal error: Call to a member function prepare() on a non-object in insert2.php on line 12 <?php function db_connect() { $config = parse_ini_file('config.ini'); $db = new mysqli($config['host'],$config['username'],$config['password'],$config['dbname']); } if ( isset($_POST['description']) && isset($_POST['name']) ) { $description = $_POST['description']; $name = $_POST['name']; $sql = "UPDATE shrubs SET description=? WHERE name=? "; $stmt = db_connect()->prepare( $sql ) or die( "could not prepare statement"); $stmt->bind("ss",$description,$name) or die( "could not bind parameters"); if ( $stmt->execute() ) { echo "Description Added Successfully" ; } else { echo "Error in query: " . $stmt->error; } } ?> Where am I going wrong and how can I rectify this problem?
  6. I am trying to find out how I can eliminate the black flash that I see when viewing blackdogDOTlondon in safari on a Mac. I have tested it in v7.2 and v8. The black flash appears when the .swf file is served, and does not appear when the mp4 is served in Chrome for example. I have gone through similar threads and have seen that adding poster images has solved this issue for some people and hiding the video until it has unloaded working for others. I have tried these steps but still have the same issue. Is there anything else that I could try and what steps should I take to find out what causes this rather off-putting black flash? <script> var isMobile = window.matchMedia("(max-width: 760px)").matches; if (!isMobile) { var myvideo = jQuery('<video id="my_video" controls="controls" autoplay="autoplay" poster="/sites/default/files/landingstill.jpg" />').append('<source src="/sites/default/files/walking.mp4" type="video/mp4">\ <source src="/sites/default/files/walking.mpg" type="video/mpeg">\ <source src="/sites/default/files/walking.ogv" type="video/ogg">\ <source src="/sites/default/files/walking.mov" type="video/mov">\ <source src="/sites/default/files/walking.3gp" type="video/3gpp">\ <source src="/sites/default/files/walking.webm" type="video/webm">\ <object width="100%" height="100%" type="application/x-shockwave-flash" data="/sites/default/files/walking.swf">\ <param name="movie" value="/sites/default/files/walking.swf" />\ <param name="loop" value="false" />\ <param name="width" value="100%" />\ <param name="height" value="100%" />\ <param name="wmode" value="opaque">\ <param name="flashvars" value="autostart=true&controlbar=over&image=/sites/default/files/landingstill.jpg&file=/sites/default/files/walking.mp4" />\ <img src="/sites/default/files/landingstill.jpg" alt="walking" title="Your browser does not support the video tag and flash."/>\ </object>'); jQuery('#videoclip').prepend(myvideo); } else { jQuery('#videoclip').css('background-image','url("/sites/default/files/landingstill.jpg")'); jQuery('#videoclip').css('background-repeat','no-repeat'); jQuery('#videoclip').css('background-attachment','fixed'); jQuery('#videoclip').css('height','492px'); jQuery('#videoclip').css('background-position','center top'); jQuery('#videoclip').css('background-size','760px 400px'); jQuery('#space').slideUp("slow"); jQuery('.navbar').slideDown("slow"); } jQuery(document).ready(function() { document.getElementById('my_video').style.visibility = "visible"; setTimeout(function() { var h = jQuery(window).scrollTop(); resize_home_page_image_divs(); setTimeout(function() { resize_home_page_image_divs()}, 200); if (!isMobile && h > 100) { var h1 = jQuery('#space').height(); var nh = h>h1?h-h1-100:h-50; jQuery('#space').hide(); jQuery('body').scrollTo(nh); jQuery('.navbar').slideDown("slow"); } else { jQuery('#space').delay(4000).slideUp("slow"); jQuery('.navbar').delay(4000).slideDown("slow"); setTimeout(function() { var h = jQuery(window).scrollTop(); jQuery('body').scrollTo(h+5).scrollTo(h); },4500); } },100); jQuery(window).on('beforeunload', function() { jQuery("video").hide(); }); }); </script>
  7. Ok great that would actually make a lot of sense for me to do that. Can you reccommend a good referance for when I come to make some new rules? Eg mod rewrite for beginners.
  8. Ok thankyou, I understand how this works now. Can I change this so that instead of http://www.1pw.co.uk/C_Shrubs I can have http://www.1pw.co.uk/shrubs And instead of http://www.1pw.co.uk/P_AMELANCHIER%20CANADENSIS I can have http://www.1pw.co.uk/amalanchier_canadensis ? Thanks for your help on this :-)
  9. Can I change the file so that I can achieve this?
  10. I'm using an .htaccess file but it has no effect. I'm using godaddy for my hosting. #mod_rewrite #RewriteBase / #Fix Rewrite Options -Multiviews RewriteEngine on RewriteBase / Options +FollowSymLinks RewriteRule ^C_(.*)$ cat.php?type=$1 [L] RewriteRule ^P_(.*)$ product_info.php?name=$1 [L] Im trying to make it so if anyone were for an example to click on a link: 1pw.co.uk/product_info.php?name=namehere it would display in the browser as 1pw.co.uk/P_namehere at the moment everything is as it were before i even added the file. Where am i going wrong?
  11. http://php.net/manual/en/features.remote-files.php
  12. Is there a cURL method?
  13. I'm using the below code to display plant names with their accompanying images. The images are hot-linked (with the permission of the owner). The issue is sometimes an image doesn't exist, has been moved or the file name has been changed. When this happens, I want to display an image named sorry_lg.jpg instead. How do I go about doing this? I was thinking about giving the containing div a pre-defined background image, and then covering the background with the hot linked image. But surely there is a cleaner way of doing this? $result = db_query("SELECT * FROM `shrubs` WHERE `type` = '$cat' order by `name` "); if($result === false) { echo "something went wrong with this query"; } else { // Fetch all the rows in an array $rows = array(); while ($row = mysqli_fetch_assoc($result)) { // $rows[] = $row; $name = $row["name"]; $salesprice = $row["salesprice"]; // $image = str_replace(' ', '-', $name); $image = preg_replace('/[\s-]+/', '-', $name); $imagelow = strtolower($image); echo ' <div class="product"> <div style="float:left; width:170px"><img src="http://www.old-hall.com/uploads/images/osb/'.$imagelow.'_lg.jpg" width="150px" height="150px" /></div> <div style="float:right"><div style="margin-left:auto; margin-right:auto"><a href="http://www.1pw.co.uk/product_info.php?name='.$name.'"></div>'.$name.' - £'.$salesprice.'</a></div> </div> '; } }
  14. Below, I have set .navbar to animate after 4 seconds but I have a bit of a problem. I want the navbar to slide down into view. It seems that it's not animating from the top of the page. It 'appears' and then animates on the last few pixels. see: http://black-dog-dev.sites.ac <style type="text/css"> .navbar { display:none; min-height:auto; } video{ width:100%!important; height:auto!important; visibility:hidden; position:fixed; z-index:-20; } #videoclip{ width:100%; position:fixed; z-index:-20; } #space{ width:100%; height:640px; opacity:1.0; filter:alpha(opacity=100); } #opacity{ width:100%; height:450px; color:#fff; opacity:1.0; filter:alpha(opacity=100); } .parallax-main-banner { height:auto; } @media (max-width: 990px){ #opacity{ height:288px; } .parallax-main-banner { min-height: 310px; } video#my_video { width: 130%!important; } } @media (max-width: 760px){ #opacity{ height:168px; } .parallax-main-banner { min-height: 310px; } } </style> <script type='text/javascript'> var resize_home_page_image_divs = function() { jQuery('.field-name-field-landing-page-image img').each( function(i, el) { var el1 = jQuery(el); var h = parseInt(el1.height()*2/3)+'px'; el1.parent().parent().parent().css('height', h).css('overflow','hidden'); } ); } jQuery(document).ready(function(){ jQuery(window).resize( function() { resize_home_page_image_divs(); } ); jQuery(window).scroll( function(ev) { var h = jQuery(window).scrollTop(); var wh = jQuery(window).height(); jQuery('.field-name-field-landing-page-image img').each( function(i, el) { var el1 = jQuery(el); var h1 = parseInt(el1.height()); var off1 = el1.offset(); var mt = 0; if (wh>off1.top-h) { mt = parseInt(h1/3)-parseInt(h1/3*(off1.top-h+h1)/(h1+wh)); } if (off1.top+h1-h<0) { mt = parseInt(h1/3); } mt = -mt; el1.css('margin-top', mt+'px'); } ); } ); jQuery('#space').delay(4000).slideUp("slow"); jQuery('.navbar').delay(4000).slideDown("slow"); setTimeout(function() { jQuery('body').scrollTo(10).scrollTo(0); resize_home_page_image_divs(); },4500); }); </script> can anyone explain where i'm going wrong? I can supply source code, but its a rather big file. Many thanks.
  15. I'm not sure what properties .float-shadow contains, but you could just null the values in a new declaration Eg. /*-------------------[320px]------------------*/ @media only screen and ( max-width: 479px ) { .float-shadow {display:none; } display: none will make it hidden and not affect the flow of the layout.
×
×
  • 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.