Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Development
[DEV] LinkTheDay
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="SystemSequence" data-source="post: 370925" data-attributes="member: 66293"><p><strong>Hello, </strong></p><p>I am here today to show off my project that is my way of learning PHP and MySQL(Maybe some JS later on?). I've been working on this for 2 weeks.</p><p></p><p>So, what it is? Well, it's not the best idea. But this is a way to save any links on the web and access it very easy by giving it a title and sort it in orders. What I mean with that is the first link you upload will be the last one after adding some more, and the newer one will always be on top.</p><p></p><p>So, when you upload the link your link also goes on the "Flow" of the site, this is a place where ALL links shared is being shown, easy like that. </p><p>Well, this is good. But there's alot of sites like this, so what I wanted to do is create a user system so I can search for users or friends and see their profile and links and heart/Favourite them.</p><p></p><p><strong><span style="color: #00ff00">So what steps has been done? </span></strong></p><ul> <li data-xf-list-type="ul"><strong>Create an account and login (<span style="color: #00ff00">100%</span><span style="color: #000000">)</span></strong></li> <li data-xf-list-type="ul"><strong>Post links to your profile and flow(<span style="color: #ff8000">85%</span><span style="color: #000000">)</span></strong></li> <li data-xf-list-type="ul"><strong><span style="color: #000000">See registered users (</span><span style="color: #00ff00">100%</span><span style="color: #000000">)</span></strong></li> <li data-xf-list-type="ul"><strong><span style="color: #000000">Admin panel (</span><span style="color: #ff0000">10%</span><span style="color: #000000">) - It works good, but more admin power to come!</span></strong></li> </ul><p><strong><span style="color: #00b3b3">What to come?</span></strong></p><ul> <li data-xf-list-type="ul"><span style="color: #000000"><strong>Heart/Favourite other users links</strong></span></li> <li data-xf-list-type="ul"><span style="color: #000000"><strong>Follow other users</strong></span></li> <li data-xf-list-type="ul"><span style="color: #000000"><strong>Search for users</strong></span></li> <li data-xf-list-type="ul"><span style="color: #000000"><strong>Publish or not publish to the public Flow</strong></span></li> <li data-xf-list-type="ul"><span style="color: #000000"><strong>Profile editing(Profile picture, bio, sex, country, etc) </strong></span></li> </ul><p><span style="color: #000000">This will be a good mix of keeping stuff at one place for those who uses links alot and a way to keep in touch with other people.</span></p><p><span style="color: #000000">Notice that this is NOT the final design, it's just a template for me to keep stuff clean. </span></p><p><span style="color: #000000"><strong>Code snippets(Not the best, Im not so familiar with this yet) </strong></span></p><p><span style="color: #000000">[PHP]if(isset($_POST['btn-update'])) {</span></p><p><span style="color: #000000"> $updateMyPost = mysqli_real_escape_string($con, $_POST['updateMyPost']);</span></p><p><span style="color: #000000"> $user_id = mysqli_real_escape_string($con, $_POST['user_id']);</span></p><p><span style="color: #000000"> $prefix = mysqli_real_escape_string($con, $_POST['prefix']);</span></p><p><span style="color: #000000"></span></p><p><span style="color: #000000"> if(mysqli_query($con, "INSERT INTO posts(link, user_id, prefix) VALUES('$updateMyPost', '$user_id', '$prefix')")) {</span></p><p><span style="color: #000000"></span></p><p><span style="color: #000000"> } else {</span></p><p><span style="color: #000000"> echo 'fail!';</span></p><p><span style="color: #000000"> }</span></p><p><span style="color: #000000">}[/PHP]</span></p><p><span style="color: #000000"></span></p><p><span style="color: #000000">[PHP]</span></p><p><span style="color: #000000">if(isset($_SESSION['user'])) {</span></p><p><span style="color: #000000"></span></p><p><span style="color: #000000">$sql = "SELECT * FROM posts WHERE user_id=".$_SESSION['user'];</span></p><p><span style="color: #000000">$result = $con->query($sql);</span></p><p><span style="color: #000000"></span></p><p><span style="color: #000000">if ($result->num_rows > 0) {</span></p><p><span style="color: #000000"> while($row = $result->fetch_assoc()) {</span></p><p><span style="color: #000000"> ?> <span style="float:right"> Your ID: <?php echo $row['user_id']; ?></span> <?php</span></p><p><span style="color: #000000"> ?> <span style="float:left"><a href="<?php echo $row['link']; ?>" target="_blank"><?php echo $row['prefix']; ?></span></p></a><br><br> <?php</span></p><p><span style="color: #000000"> }</span></p><p><span style="color: #000000"> } else {</span></p><p><span style="color: #000000"> ?> <center> <?php echo "Update your first link!"; ?> </center> <?php</span></p><p><span style="color: #000000"> }</span></p><p><span style="color: #000000"> }</span></p><p><span style="color: #000000">}</span></p><p><span style="color: #000000">[/PHP]</span></p><p><span style="color: #000000"></span></p><p><span style="color: #000000"><strong>Pictures</strong></span></p><p><span style="color: #000000"><strong>Keep in mind that some pictures are taken with different databases.</strong></span></p><p><span style="color: #000000"><img src="https://i.gyazo.com/fbd2aa6c61a4468798c6311fe17e757f.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </span></p><p><span style="color: #000000"><img src="https://i.gyazo.com/d8d07190762afa8ddf1a6ab71dc46f78.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </span></p><p><span style="color: #000000"><img src="https://i.gyazo.com/af79e47704c956c4426c372a74de6a0b.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </span></p><p><span style="color: #000000"><img src="https://i.gyazo.com/7033dc86aca07005d05915da100fdde8.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </span></p><p><span style="color: #000000"></span></p><p><span style="color: #000000"></span></p><p><span style="color: #000000">A special thanks to Tommy for giving me knowledge and being supportive. </span></p><p><span style="color: #000000">- <strong>Best regards.</strong></span></p></blockquote><p></p>
[QUOTE="SystemSequence, post: 370925, member: 66293"] [B]Hello, [/B] I am here today to show off my project that is my way of learning PHP and MySQL(Maybe some JS later on?). I've been working on this for 2 weeks. So, what it is? Well, it's not the best idea. But this is a way to save any links on the web and access it very easy by giving it a title and sort it in orders. What I mean with that is the first link you upload will be the last one after adding some more, and the newer one will always be on top. So, when you upload the link your link also goes on the "Flow" of the site, this is a place where ALL links shared is being shown, easy like that. Well, this is good. But there's alot of sites like this, so what I wanted to do is create a user system so I can search for users or friends and see their profile and links and heart/Favourite them. [B][COLOR=#00ff00]So what steps has been done? [/COLOR][/B] [LIST] [*][B]Create an account and login ([COLOR=#00ff00]100%[/COLOR][COLOR=#000000])[/COLOR][/B] [*][B]Post links to your profile and flow([COLOR=#ff8000]85%[/COLOR][COLOR=#000000])[/COLOR][/B] [*][B][COLOR=#000000]See registered users ([/COLOR][COLOR=#00ff00]100%[/COLOR][COLOR=#000000])[/COLOR][/B] [*][B][COLOR=#000000]Admin panel ([/COLOR][COLOR=#ff0000]10%[/COLOR][COLOR=#000000]) - It works good, but more admin power to come![/COLOR][/B] [/LIST] [B][COLOR=#00b3b3]What to come?[/COLOR][/B] [LIST] [*][COLOR=#000000][B]Heart/Favourite other users links[/B][/COLOR] [*][COLOR=#000000][B]Follow other users[/B][/COLOR] [*][COLOR=#000000][B]Search for users[/B][/COLOR] [*][COLOR=#000000][B]Publish or not publish to the public Flow[/B][/COLOR] [*][COLOR=#000000][B]Profile editing(Profile picture, bio, sex, country, etc) [/B][/COLOR] [/LIST] [COLOR=#000000]This will be a good mix of keeping stuff at one place for those who uses links alot and a way to keep in touch with other people. Notice that this is NOT the final design, it's just a template for me to keep stuff clean. [B]Code snippets(Not the best, Im not so familiar with this yet) [/B] [PHP]if(isset($_POST['btn-update'])) { $updateMyPost = mysqli_real_escape_string($con, $_POST['updateMyPost']); $user_id = mysqli_real_escape_string($con, $_POST['user_id']); $prefix = mysqli_real_escape_string($con, $_POST['prefix']); if(mysqli_query($con, "INSERT INTO posts(link, user_id, prefix) VALUES('$updateMyPost', '$user_id', '$prefix')")) { } else { echo 'fail!'; } }[/PHP] [PHP] if(isset($_SESSION['user'])) { $sql = "SELECT * FROM posts WHERE user_id=".$_SESSION['user']; $result = $con->query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { ?> <span style="float:right"> Your ID: <?php echo $row['user_id']; ?></span> <?php ?> <span style="float:left"><a href="<?php echo $row['link']; ?>" target="_blank"><?php echo $row['prefix']; ?></span></p></a><br><br> <?php } } else { ?> <center> <?php echo "Update your first link!"; ?> </center> <?php } } } [/PHP] [B]Pictures[/B] [B]Keep in mind that some pictures are taken with different databases.[/B] [IMG]https://i.gyazo.com/fbd2aa6c61a4468798c6311fe17e757f.png[/IMG] [IMG]https://i.gyazo.com/d8d07190762afa8ddf1a6ab71dc46f78.png[/IMG] [IMG]https://i.gyazo.com/af79e47704c956c4426c372a74de6a0b.png[/IMG] [IMG]https://i.gyazo.com/7033dc86aca07005d05915da100fdde8.png[/IMG] A special thanks to Tommy for giving me knowledge and being supportive. - [B]Best regards.[/B][/COLOR] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Development
[DEV] LinkTheDay
Top