/extremedating/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/extremedating/trunk

« back to all changes in this revision

Viewing changes to index.php

  • Committer: Daniel Johansson
  • Date: 2013-04-13 23:33:25 UTC
  • Revision ID: maila@danieljohansson.nu-20130413233325-ube31nulwhf3z2s2
Fixed list of people in index.php

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
                                </form>
57
57
                        </div>
58
58
                        <div id="profileimg">
59
 
                                <img src="img/profilemockup.jpg"/>
 
59
                                <img src="./get_image.php?userName=<?PHP echo $username;?>"/>
60
60
                                <a href="profile.php?uid=<?php echo $username; ?>" class="profilename"><?php echo $firstName . " " . $surName;?></a>
61
61
                                <p class="smallheader">Personer jag vill träffa:</p>
62
 
                                <p class="profilelink">Herp Derp</p>
63
 
                                <p class="profilelink">Jane Doe</p>
 
62
                                <?PHP
 
63
                                        $relationinfo = $db->query("SELECT user2 from dateInterests WHERE(user1='$username')");
 
64
                                        $relationstring = $relationinfo->fetchAll();
 
65
                                        echo '<UL>';
 
66
                                        foreach ($relationstring as $relationquery) {
 
67
                                                $userinfo = $db->query("SELECT firstName from Users WHERE loginName='$relationquery[0]'");
 
68
                                                $self = $userinfo->fetchAll();
 
69
                                                $firstName = $self [0]['firstName'];
 
70
                                                $userinfo = $db->query("SELECT surName from Users WHERE loginName='$relationquery[0]'");
 
71
                                                $self = $userinfo->fetchAll();
 
72
                                                $surName = $self [0]['surName'];
 
73
                                                echo '<li><a href="./profile.php?uid=' . $relationquery[0] . '">' . $firstName . ' ' . $surName . '</a></li>';
 
74
                                        }
 
75
                                        echo '</UL>';
 
76
 
 
77
                                ?>
64
78
                                <p class="smallheader">Personer som vill träffa mig:</p>
65
79
                                <p class="profilelink">Jane Doe</p>
66
80
                        </div>