Jump to content

gerkintrigg

Members
  • Content Count

    830
  • Joined

  • Last visited

Community Reputation

1 Neutral

About gerkintrigg

  • Rank
    Magician
  • Birthday 05/18/1980

Contact Methods

  • Website URL
    http://www.bristolmagicshop.com

Profile Information

  • Gender
    Male
  • Location
    Bristol, UK
  • Age
    38
  1. gerkintrigg

    Upgrading from PHP 4

    Thanks for the very comprehensive reply. I've tried your code and seem to be getting a problem with this line: $pdo = new pdo("mysql:host=$DB_HOST;dbname=$DB_NAME;charset=$DB_ENCODING",$DB_USER,$DB_PASS);
  2. gerkintrigg

    Upgrading from PHP 4

    Oh my oh my. The mysqli protocols confuse me. I know php4 inside out but I’ve been out of the game for many years and need to work out how the hell mysqli works. All I need is a simple syntax to grab a record from a table and output it using an echo command. Can anyone help me? All the websites I’ve visited seem to get too deep into it too quickly and I end up getting lost.
  3. gerkintrigg

    PHP & MiniCart Javascript

    It seems so many of these topics cross over, so I hope it's in the right place. I've got a site using minicart.js to add things to the shopping cart. I love the way it works so-far, but I want to now output it using PHP variables so I can link it to PayPal. All I want is a dump into a PHP script. I don't care how, particularly... ideally an array of some kind with item ID and quantity... but anything. Once it's in PHP, I'm good... I can do the rest, but I'm a ludite with Javascript. Please help.
  4. gerkintrigg

    Not working on iPad

    Hi, I've tried to program a shopping cart App and it works fine on my Mac and my Android Phone, but on the IPad, it's not adding the items to the shopping cart. I've used a free template that does most of the hard work for me, but used some database stuff to get the shop actually listing stuff. My URL is: http://www.bristolmagicshop.com/single.php?id=14 So-far, so-good, but the iPad issue is starting to bug me now. Any suggestions? Neil
  5. I hope this is in the right place, if not, please redirect. Since Google's update to rank mobile-friendly sites higher than mere mortals, I made a website to accomodate the new rules. It's acting weird though. Google are indexing everything correct for the homepage, but the URL they've got is for a random blog article I wrote. I have no clue why these are being mixed. The Javascript screen resolution redirect is working fine and doesn't take me to that article. There are no htaccess issues and the php scripts work fine for everything I test on. Do we know about any issues that might cause this? Neil
  6. gerkintrigg

    PHP Class (to make XML) getting encoding error

    No offence taken... It's not my script. I just changed it. Was RSS around 12+ years ago? The error is found with the output: error on line 42 at column 8: Encoding error But this is found at: http://www.tingifts.co.uk/RSS/blog_feed.xml
  7. Hi everyone. I'm not too up on XML (shame on me!) I've written the following class, but it keeps getting an encoding error... I know the other elements of the procedure (the other scripts) are right... or at least I think they are. I've narrowed the issue down to somewhere in this script (probably the first few lines) Can anyone help? I'm lost! Thanks, Neil <?php class RSSFeed { // VARIABLES // channel vars var $channel_url; var $channel_title; var $channel_description; var $channel_lang; var $channel_copyright; var $channel_date; var $channel_creator; var $channel_subject; // image var $image_url; // items var $items = array(); var $nritems; // FUNCTIONS // constructor function RSSFeed() { $this->nritems=0; $this->channel_url=''; $this->channel_title=''; $this->channel_description=''; $this->channel_lang=''; $this->channel_copyright=''; $this->channel_date=''; $this->channel_creator=''; $this->channel_subject=''; $this->image_url=''; } // set channel vars function SetChannel($url, $title, $description, $lang, $copyright, $creator, $subject) { $this->channel_url=$url; $this->channel_title=$title; $this->channel_description=$description; $this->channel_lang=$lang; $this->channel_copyright=$copyright; $this->channel_date=date("Y-m-d").'T'.date("H:i:s").'+01:00'; $this->channel_creator=$creator; $this->channel_subject=$subject; } // set image function SetImage($url) { $this->image_url=$url; } // set item function SetItem($url, $title, $description) { $this->items[$this->nritems]['url']=$url; $this->items[$this->nritems]['title']=$title; $this->items[$this->nritems]['description']=$description; $this->nritems++; } // output feed function Output() { $output .= '<?xml version="1.0" encoding="UTF-8" ?>'."\n"; $output .='<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">'."\n"; $output .= '<channel>'."\n"; # rdf:about="'.$this->channel_url.'">'."\n"; $output .= '<title>'.$this->channel_title.'</title>'."\n"; $output .= '<atom:link href="http://www.tingifts.co.uk/blog/" rel="self" type="application/rss+xml"/>'."\n"; $output .= '<link>'.$this->channel_url.'</link>'."\n"; $output .= '<description>'.$this->channel_description.'</description>'."\n"; $output .= '<lastBuildDate>'.$this->channel_date.'</lastBuildDate>'."\n"; $output .= '<language>'.$this->channel_lang.'</language>'."\n"; $output .= '<sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency>'."\n"; $output .= '<generator>http://www.tingifts.co.uk</generator>'."\n"; $output .= '<item>'."\n"; for($k=0; $k<$this->nritems; $k++) { $output .= '<title>'.$this->items[$k]['title'].'</title>'."\n"; $output .= '<link>'.$this->items[$k]['url'].'</link>'."\n"; $output .= '<image>'."\n"; $output .= ' <url>'.$this->image_url.'</url>'."\n"; $output .= ' <title>'.$this->items[$k]['title'].'</title>'."\n"; $output .= ' <link>'.$this->items[$k]['url'].'</link>'."\n"; $output .= '</image>'; $output .= '<description>'.$this->items[$k]['description'].'</description>'."\n"; }; $output .= '</item>'."\n"; $output .= '</channel>'."\n"; $output .= '</rss>'."\n"; return $output; } }; ?>
  8. gerkintrigg

    Xcart accessing admin

    Hi all, I've tried to access the admin.php of the xcart installation here: http://www.cleaningshopuk.com but it doesn't allow me to access it, saying that it's a 404 page not found error. That page does in fact exist, but I think the issue might be something to do with a redirection. The site owner apparently clicked on something in the admin section (possibly https or something similar) but what can I do to avoid this issue without having to re install everything? Thanks, Neil
  9. Hi all, Recently I have found myself repeating a very monotonous task on amazon's kindle direct publishing website and (being the kinda guy I am), I figured I could probably automate it without too much trouble. I'm a publisher who needs to maintain my library of lots of books and ensure that any offers are kept up-to-date. I have made screen scrapes before without too much problem, but filling in forms is a little bit more difficult. There are no CAPCHA images to enter and this is specific to my own login so I don't think I can be considered "evil", so all I want to know is how to automate my own login, click a specific link and fill in forms. Ideally I want it as easy as recording a macro, or maybe just a list of instructions. If I told a human to do it, I'd just say "go to this page and click on that, enter these details to login, then click that" and I wondered if there is something out there in cyber world that allows me to do the same? Thanks, Neil
  10. gerkintrigg

    need help with a login in php

    Did you read that this is not a code repository? Please explain what the issue is and what you have done to try to work out what the error is. This looks like you have taken someone else's code and because it doesn't work first time, you want us to sort it out. I don't want to read pages of code in the hope I might find something wrong and that's probably why you have no responses to your post. Start by working out which page of code it is. To do that, use the die() command to stop the process part way through and output variables using echo. Use some logic to check it's doing what it should. Then once you have narrowed it down a bit on your own, post something more specific. That's called debugging.
  11. gerkintrigg

    wraping text and floating images

    Hi, I'm having issues trying to get the image of the author in the top right of the text section on this page: http://theperilouspostman.co.uk/meet_the_author.php Is there an easy way to do this without having to mess with my template? I did the wrapping around the postman, but the issue is now that the images in the page content appears at the bottom of the section. Any ideas? Neil
  12. gerkintrigg

    irregular wrapping

    One tiny niggle... I have sorted the homepage like this: http://theperilouspostman.co.uk/index.php But the author page, I want the author's picture to sit on the right at the top, with text wrapping around it. I can't do this in the template. The only way I worked out how to (sort of) do it is by putting the floating image code before the wrap tags, but even that isn't ideal. Any suggestions? Example: http://theperilouspostman.co.uk/meet_the_author.php
  13. gerkintrigg

    irregular wrapping

    fantastic! thanks for that: http://theperilouspostman.co.uk/index.php
  14. gerkintrigg

    irregular wrapping

    Hi everyone, I want to use CSS to wrap around an irregular shape (kinda like I've tried to do here: http://theperilouspostman.co.uk/index.php) I have had a look at some of the experimental CSS exclusions and stuff but I wondered whether there's a robust way of ensuring that people see it as I want them to, regardless of whether they have the latest browser and settings. After all, many of the audience for this site might access it from schools - and they're not well known for having the latest technology anyway. Can I do it using blank PNG files like I have here? if so, how do I make it actually work? Are there tutorials online? I've had a search and can't find what I need. Neil
×

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.