Slice's Profile User Rating: -----

Reputation: 244 Stalwart
Group:
Active Members
Active Posts:
712 (0.34 per day)
Joined:
24-November 08
Profile Views:
19,098
Last Active:
User is offline Yesterday, 01:22 AM
Currently:
Offline

Previous Fields

Country:
GB
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
Intel
Favorite Gaming Platform:
XBox
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   Slice has not set their status

Posts I've Made

  1. In Topic: How far have you commuted?

    Posted 8 Sep 2014

    @AdamSpeight2008 - that breakdown seems about right, although it's 9-5, so only 8 hours working a day. Still not an ideal margin for error though.

    I'd definitley be interested in working remotley when possible, but it's not something I would want to bring up until I have worked there for a little while.
  2. In Topic: How far have you commuted?

    Posted 8 Sep 2014

    Hadn't really given much thought about travelling in winter, especially on public transport. That is going to be a nightmare.

    Well this new job is a pretty big salary increase. I'd love to find something closer to home it's just that I live in a really remote area that doesn't have many businesses in the I.T field.

    But 400 hours over a year? That's just depressing.

    I don't think I could turn it down though, mainly because it's a big step up and I'd be worried about regretting it.
  3. In Topic: Website logo wont show on subdomain

    Posted 7 Sep 2014

    Well your subdomains will be one more down in your folder structure. I can't give a good example without seeing your code, but it sounds like you're not using the correct path to the image. Try putting ../ before your image path, i.e: ../img/logo.jpg which would tell the browser to look one directory up.

    A quick reference guide

    Edit: Added link to example
  4. In Topic: Profile Will not stay public after logout.

    Posted 5 Sep 2014

    It's okay, it's what the forums are here for anyway right?

    Try having a look through the manual on $_GET. Copying my code in won't do anything as it was just to be used as an example to help you get the logic right.

    I'm just curious if you are following some tutorial which is where this code is originally from? If you are, and you are just starting out, I would recommend ditching that tutorial right now. And all this code. If you're just starting out the best thing you can do is learn to do things the right way, rather than getting into some very bad habits. (such as using mysql_ functions).

    Here are some resources:

    Introduction to PDO
    DEVshed tutorial for login/registration system

    Trying browsing the web for "PDO login / registration tutorial" or replacing PDO with mysqli.
  5. In Topic: Profile Will not stay public after logout.

    Posted 5 Sep 2014

    This should be in the users page. At the moment you have this bit of code in your users page:

    <?php
    if (empty($_SESSION['profile']) === false)
    {
    	echo '<img src="', $_SESSION['profile'], '" alt="', $_SESSION['fname'] , '\'s Profile Image">';
    }
    ?>
    
    


    Which would be fine if you want to default it to your own profile is not set.

    For example:

    <?php
    if (isset($_GET['id'])) {
        //code for getting user based on $_GET['id'] url
    }
    elseif (empty($_SESSION['profile']) === false)
    {
    	echo '<img src="', $_SESSION['profile'], '" alt="', $_SESSION['fname'] , '\'s Profile Image">';
    }
    ?>
    
    


    Let's say I'm logged in as roxy. The above code would display my own profile if i went to users_page.php but if i went to users_page.php?id=5 , 5 being dave, then it would load daves profile instead.

    This is a very basic way to look at it. For a strong website you should look into seperating your PHP code and your HTML. Because PHP is processed server-side, you can make all these logic decisions before anything client side. There is a great tutorial on here by CTphpnwb.

My Information

Member Title:
sudo pacman -S moneyz
Age:
24 years old
Birthday:
November 6, 1989
Gender:
Location:
Manchester
Interests:
web design and development

Contact Information

E-mail:
Click here to e-mail me
Website URL:
Website URL  http://ryandone.co.uk
Twitter:
ryandone89

Friends

Comments

Page 1 of 1
  1. Photo

    Slice Icon

    30 Jul 2012 - 09:45
    Do I need to collect my cash reward in person? ;)
  2. Photo

    modi123_1 Icon

    30 Jul 2012 - 09:09
    Oh.. someone got a new award!
Page 1 of 1