Jump to content

gerkintrigg

Members
  • Posts

    830
  • Joined

  • Last visited

About gerkintrigg

  • Birthday 05/18/1980

Contact Methods

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

Profile Information

  • Gender
    Male
  • Location
    Bristol, UK
  • Age
    38

gerkintrigg's Achievements

Advanced Member

Advanced Member (4/5)

1

Reputation

  1. 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. 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. in the database it's in a varchar...
  4. Hello. I downloaded the Max Mind database and am trying to use a simple PHP MySQL lookup to find the location of an IP address. I think I may be doing something wrong with the code because it keeps coming up with "United States" even though I'm testing it with UK IPs. Here's my code: <?php $root=''; //include the database: include $root.'includes/db.php'; // IP address $code = '81.17.79.2'; //get where the IP relates to: $q="SELECT `friendly_country` FROM `geo_locator` WHERE '$code' BETWEEN `ip_1` AND `ip_2`;"; $sql=mysql_query($q); $r=mysql_fetch_array($sql); echo 'IP '. $code. " mapped to: " . $r['friendly_country']; ?>
  5. .htaccess can become rather unwieldy if too many members join. While it's good for a few users, I found it becoming a right royal pain in the bum when I had 150 members... now I have almost 550, I can't imagine what it'd have been like without a database!
  6. I'm having problems trying to understand exactly what I'm supposed to be doing. I want to alter my existing a website (www.magic2k.com) by adding a login page, rather than using HTAccess (which is fine for a the moment, but the member list's growing and I'm having problems managing the data - hense the database (to make things easier, which it undoubtably does). I need to know what to do (not necessarily how to do it) in logical steps. For example: I've got a page set up at the moment that determines whether the user COULD login. but I heard something about a session and cookies and all that stuff and don't know what to do. I'd like some advice in this sort of format: 1 - visitor enters info 2 - info checked 3 - if correct start session & write cookie 4 - blah blah blah... you get the idea. I just need to know where I'm starting really. Thanks for your time.
×
×
  • 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.