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] simpleCMS [PHP / MySQL]
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="Baevus" data-source="post: 310310" data-attributes="member: 24159"><p>I'm not closing it lol, i'm cleaning it. Ohhh, I thought... nvm.</p><p>[DOUBLEPOST=1414910337,1414821658][/DOUBLEPOST]Update; I decided to go MySQLi, thanks to [USER=8605]@TesoMayn[/USER] for fixing up some errors. YES the code is messy :l soz.</p><p>[PHP]<?php</p><p>require 'connect.php';</p><p></p><p>// Create's Connection</p><p>$conn = new mysqli($db_host, $db_user, $db_pass, $db_database);</p><p>// Check's Connection</p><p>if ($conn->connect_error) {</p><p> die("Connection failed: " . $conn->connect_error);</p><p>}</p><p>// Gets into database & posts data.</p><p>$sql = "SELECT id, username FROM users";</p><p>$result = $conn->query($sql);</p><p></p><p>if ($result->num_rows > 0) {</p><p> // Data is now posted.</p><p> while($row = $result->fetch_assoc()) {</p><p> echo 'User ID: <b>' . $row["id"] . '</b> - Username: <b><a href="' . $row["username"] . '.php">' . $row["username"] . '</a></b><br />';</p><p> }</p><p>} else {</p><p> echo "There are no registered users!";</p><p> }</p><p>$conn->close();':'</p><p>?>[/PHP]</p><p></p><p>Now I've got to work on profiles and release v1.0 should be out!</p><p>[DOUBLEPOST=1414913623][/DOUBLEPOST]Sorry for triple-posting!</p><p>Downloads now up;</p><p><a href="http://simple-cms.tk/Downloads" target="_blank">http://simple-cms.tk/Downloads</a></p><p></p><p>Profiles & News are disabled, news will be enabled in the next lot and profiles maybe v1.5?</p></blockquote><p></p>
[QUOTE="Baevus, post: 310310, member: 24159"] I'm not closing it lol, i'm cleaning it. Ohhh, I thought... nvm. [DOUBLEPOST=1414910337,1414821658][/DOUBLEPOST]Update; I decided to go MySQLi, thanks to [USER=8605]@TesoMayn[/USER] for fixing up some errors. YES the code is messy :l soz. [PHP]<?php require 'connect.php'; // Create's Connection $conn = new mysqli($db_host, $db_user, $db_pass, $db_database); // Check's Connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } // Gets into database & posts data. $sql = "SELECT id, username FROM users"; $result = $conn->query($sql); if ($result->num_rows > 0) { // Data is now posted. while($row = $result->fetch_assoc()) { echo 'User ID: <b>' . $row["id"] . '</b> - Username: <b><a href="' . $row["username"] . '.php">' . $row["username"] . '</a></b><br />'; } } else { echo "There are no registered users!"; } $conn->close();':' ?>[/PHP] Now I've got to work on profiles and release v1.0 should be out! [DOUBLEPOST=1414913623][/DOUBLEPOST]Sorry for triple-posting! Downloads now up; [url]http://simple-cms.tk/Downloads[/url] Profiles & News are disabled, news will be enabled in the next lot and profiles maybe v1.5? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Development
[DEV] simpleCMS [PHP / MySQL]
Top