Jump to content

Stats website?


Julius95

Recommended Posts

You need an MySQL data base host that'll allow remote connections.

I have one..... then what? what's the steps that needs to be done? any more info appreciated. the mysql part is fine...

Well you need to make a query to insert or select data.

You can try this: http://www.mysqltutorial.org/

I still don't get it data for what? I have my mysql server up and running find and the database to... but thw WEBSITE??? :(

Link to comment

This is a small chat .php code I made, you will have to make the lua code yourself but this should give you an idea on how it works.

<?php 
  
$con=mysqli_connect("localhost","user","pass","db_name"); 
// Check connection 
if (mysqli_connect_errno()) 
  { 
  echo "Failed to connect to MySQL: " . mysqli_connect_error(); 
  } 
  
$result = mysqli_query($con,"SELECT * FROM chat"); 
  
while($row = mysqli_fetch_array($result)) 
  { 
  echo $row["message"]; 
  echo "<br>"; 
  } 
  
mysqli_close($con); 
?> 

To order the chat, making the newest input the first you could create a date table and then use "ORDER BY date DESC"

Link to comment
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...