PDA

View Full Version : creating a message board with php and mysql



si-skyline
04-14-2008, 06:01 PM
hi guys, i was wondering if someone could help me out of this hard place im in, iv got to create a php and mysql based message board or bulleting board. but i dont really have a clue were to start.

i was thinking of this at the moment...
/mysql database
//tbl_user
userid*
name
dob
email

//tbl_theads
theadid*
userid
dateposted
header
message

* = primary key
underline = forian key

i think iv got the tables sorted. but my main consern is with the php side of things and how im going to present the data, is there any sugestions about how iv done it at the moment? is there any websites what will help me do this directly or indirectly by learning some php.

just one note tho, this is my unis server and can only use the myphp webmin front of things. and cant install any server side things like phpbb.

thank you very much and hope to hear from you soon. simon

SgtM
04-14-2008, 08:07 PM
I was just about to suggest phpbb, it sucks that you can't install it. What about downloading it and sorting through the code?

Tavarin
04-14-2008, 10:18 PM
All righty then. I've been learning how to code PHP for a few months now, and I already have a message board-esque style script under my belt.

Here's a site you can visit to learn some PHP:
http://w3schools.com/
It can teach you how to connect to a database, add and remove items from a table, call items, etc...

What you're going to want to do is create a form that will allow you to post data into your table. Then you're going to want to make a page that uses PHP script to access and display this data. If you'd like I can send you some of my own scripts that might help you out. They're really simple, I'd just need a little bit to customize them to your needs.

Cheers

si-skyline
04-15-2008, 09:39 AM
i think if i did it that sgtm i think i would start being confussed by the code they are using, iv never seen it before by i can guess its going to be quite complacated :eek:

tavarin, that would be cool, the most iv learned about php at the moment is to connect to a database make a query and to diplay the data in a table while not fully understanding how the data is sorted.

thank you very much guys

Tavarin
04-15-2008, 03:26 PM
Well here's a very quick message board script I wrote:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Message Boards</title>
</head>

<body>

<?php
//connect to a database

mysql_connect ("localhost", "username", "password") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("database name") or die ('I cannot connect to the database because: ' . mysql_error());

//Get current date and set as a variable

$dateadd=date("j of F Y, \a\\t g.i a", time());

//If someone wants to delete a message then this is what the command getrs sent to

if($mode=="remove") {
mysql_query("DELETE FROM messageboards WHERE number = $ID");
}

//Saves what the user has inputed to a form into the database along with the date

if($mode=="add") {
mysql_query("INSERT INTO messageboards (name, date, title, message)
VALUES ('$_POST[nameadd]', '$dateadd', '$_POST[titleadd]', '<pre>$_POST[messageadd]</pre>')")
or die ('I cannot add message because: ' . mysql_error()); }

//Get all the table information and arrange newest to oldest

$result = mysql_query("SELECT * FROM messageboards ORDER BY number DESC");

//Make each column an array

while($row = mysql_fetch_array($result)) {
$number[]= $row['number'];
$n_name[]= $row['name'];
$date[]= $row['date'];
$title[]= $row['title'];
$message[]= $row['message']; }

//start making a table

echo "<table border='1' width='500px'>";

//display each message from the database in this table

for ($i = 0; $i < sizeof($number); $i++) {
echo "<tr><td>" . $n_name[$i] . "</td></tr>";
echo "<tr><td>" . $date[$i] . "</td></tr>";
echo "<tr><td><strong>" . $title[$i] . "</strong></td></tr>";
echo "<tr><td>" . $message[$i] . "</td></tr>";
echo "<tr><td><a href=\"$PHP_SELF?ID=$number[$i]&mode=remove\">Delete Message</a></td>";
echo "<tr><td><br /><br /></td></tr>"; }
echo "</table>";

//The form from which someone can post a message

echo "
<form method='POST' action=\"$PHP_SELF?ID=$number[$i]&mode=add\">
<p><strong>Name: </strong><br /><input type='text' size='50' name='nameadd' /><br />
<strong>Message Title: </strong><br /><input type='text' size='50' name='titleadd' /><br />
<strong>Message: </strong><br /><textarea cols='70' rows='20' name='messageadd' wrap='virtual'></textarea><br />
<input type='submit' value='Add Message' /></p><br />
</form>";

?>

</body>

</html>

Any italicized text needs to be changed

It may seem a little crazy, and I'll explain it if you'd like, but if you'd like to use this script you'll need a table like this:


$sql = "CREATE TABLE messageboards
(
number int NOT NULL AUTO_INCREMENT,
PRIMARY KEY(number),
name varchar(50),
date varchar(50),
title varchar(50),
message varchar(10000)
)";

Now the actual message boards page I made is an all in one page without password protection. It allows anyone to submit their name, a title and a message to the database. It then finds and adds the date to the same row. Then it will display each message in order from most recent to oldest.

Go here and you can see the example I made. It looks ugly but it works:

http://www.actonhighschool.ca/7/Message.php

Good luck, and if anyone would like to suggest anything then please do so.

si-skyline
04-15-2008, 07:12 PM
your example is perfect, its jsut what im looking for, im sorry that im not too up to speed with php but can i ask what does

if($mode=="add")

mean? is that like bind to a button on the page? i dont understand the "mode" thing.. i can see that its ment to be adding a message to the board.

thank you so much for taking your time to give me the example :)

ps.. there is no italic coding on the post xD

pps. dont want to dp.. i have given the code a wack and everything works fine untill i came to use the functions of adding and deleting a message... i filled the form in and pressed add.. wam it apeared to work but no message. so i hit f5 to refresh thinking that will do it but there is nothing in the database as well..

so i though it might be wrong on my side so i put some values in the database and tryed agian and it showed the data.. i also gave delete a go and that didnt work either :/

do i need to set permissions on the database? can i do it thu php webmin?

Tavarin
04-15-2008, 08:40 PM
you're welcome, and now I shall do my best to answer your questions.

$mode is a variable I made that allows everything to be done on a single page.
The add form begins like this:
<form method='POST' action=\"$PHP_SELF?ID=$number[$i]&mode=add\">
This action reloads the page with the values placed in the form field posted, and with $mode set to add.
The line if($mode=="add") is just checking to see if the variable mode has been set to add, and if it has been (as done by the forms action and submit), executes it's code.

There is also a $mode=="remove" which is set when the remove link below any message is pressed.

The only text I italicized was in the connection portion of the code. the username, password, and database name all had to be changed to whatever your values are.

And I think you're right about why you can't add or remove messages, you may not have the permissions. PHP webmin should let you change the permissions rather easily, but I've never used it, so I'm not 100% sure.

Anyway, hope that helps clear some things up. If you have any more question, or any more problems, just post them up.

Cheers

si-skyline
04-16-2008, 03:04 PM
thanks for the HUGE help, +rep

i still cant get to finding permissions or what im screwing up on.. i think il try on my own server.. see if its the uni being a double s holes or now xD

i did manage to find something similer to your consept but they didnt say anything about permissions either

Tavarin
04-16-2008, 06:07 PM
well the permissions is the only thing I can think of that might be causing the errors, since I've run this exact code on my own server and it works just fine. I do hope you can figure out what is going wrong, and get this working.

And if you'd like to password protect the form at the bottom of the page I have a really simple password protect script that just runs for one page load. It'll be only seconds to put in, the only problem being that the way I did it you can only have one username. I'm still working on creating a multi-user password lock using cookies and a database. If I'm successful I'll send the script your way.

Cheers

si-skyline
04-16-2008, 06:33 PM
yeah that would be quite useful.. is it because you cant get the link between the UN with the PW?

Tavarin
04-16-2008, 10:50 PM
Well the simple one works great.

The problem with the multi user login script is that for some reason I can't save or read cookies with the server I'm using. It's one of the servers at my school, so I think thast might be a problem. Anyway, tomorrow I'm going to take the crash course in sessions, and attempt that.

Also, I think the main reason my multi-user script isn't working very well is because I only started working on it today for about an hour, and have never used cookies before.

Anyway, I'll post up the simple password protect script tomorrow for you since I have it on my laptop, and don't feel like writing the whole thing again.

si-skyline
04-19-2008, 05:56 PM
small update on what iv been doing..

well i finally got the time to switch it over to my server at home. i created the table thu the mysql console and copy and pasted the coding into a textfile on my computer.. entered a value into the table and im able to see it on the test page. but once agian i cant add or delete to the database. i still think it is permissions to play here unless there is a fault in the code, but i cant see that as you have got it running :/

any ideas?

if you want to have a look of it your self here is the link to it

simonmcguire.co.uk (http://www.simonmcguire.co.uk/html/testone.php)

Tavarin
04-19-2008, 06:49 PM
Once again I'm at a loss as to why it's not working for you. Mine is removing posts after a while, so I think someone might be deleting them.

Anyway I'm nearly successful with my multi user password protection. I have it fully operational, using sessions (yay for the crash course). What I'm doing with it right now is encrypting the password in the database when someone registers a username (another table) and then having the browser read that instead. So far the verifying of the encrypted password isn't working (although it goes into the database encrypted). So I'm working on fixing that.

If you would however like the multi user password protect script I can implement it into the message board script and then post it up for you. I can make it so that anyone can read the messages, but you have to log in to be able to delete messages or to post messages. This won't have any encryption to it (at least not until I figure out how to fix that) but that shouldn't be a problem. I just wanted to see if I can do it.

If you want to wait until I have the encryption working, I'll post it up here as soon as i do. My goal is to completely program a fully functioning forum by the end of the summer. Wish me luck.

Cheers

si-skyline
04-20-2008, 04:09 AM
good luck :)

si-skyline
04-21-2008, 07:49 AM
is there the possibily that there is some form of error in the coding you have geiven?

iv tried to change and mess about with the coding about a 100 times on both systems.. i just cant get it to work

simon

Tavarin
04-21-2008, 10:31 AM
It could be that there are errors so I'll look into that. I've just been assuming there weren't since I copied and pasted it off of my working page. I'll try to clean up the code a bit for you later today once I've integrated the password protect.

So I should have some news for you later today.

Cheers

si-skyline
04-22-2008, 06:09 PM
ah sweet cool :)

it has been a frustrating week for me with this, will the new one intergrate the password thing?

thank you so much, id give you a big kiss at this stage if i could xD

Tavarin
04-22-2008, 08:22 PM
No trouble.

Anyway, I also ran into a problem. The script on it's own works fine, but when it's placed in a page with html the remove stopped working. The problem for me is that when the php sends the number of the post to be deleted it uses the wrong number. So I'd say check the URL for what ID it's sending and then check your table to see what number the post is. If they aren't the same, then that's the problem. Anyway, I'll try and fix this tomorrow, and send it up.

Also I have made a page with a multi user password protect on it. It actually works like forums, in that it uses the persons username for the person who posted, and only the person who posted the message can delete it. Anyway, once I work out all the bugs I'll post it up.

Here's what I've got so far, but the delete isn't working yet. You can add posts though, that works fine.

http://actonhighschool.ca/7/Boards.php

Cheers

si-skyline
04-23-2008, 02:10 AM
yeah, it dont really explain the reason why its not working when i try to add a new record..

is there a way to get a error log or something of the database, so you can see if data gets knocked back by some validation rule?

your message board it starting to look real nice :) i like that flower design you have got going on the top of the page

si-skyline
04-23-2008, 07:12 AM
i checked the url and index number, the record what iv as trying to delete is number 6 and the url shows up like this after i click delete

messageboard.php?ID=6&mode=remove

so im guessing that right, i was also talking to a friend of mine, he knows a bit more about php then what i do. he was telling me that your not ment to have a double = in the url, is that the reason why it isent working?

he went on to say that the commands are ment to be broke up onto differant pages. so in his example there would be messageboards.php, delete.php and add.php. and those two have the commands to use the database.

is that just a more long around the bush way of doing the example here?

Tavarin
04-23-2008, 11:55 AM
That's another way of doing it yes. You can do it in multiple pages, which is what I originally started with, but I moved it all onto one page for simplicity, and just to see if I could do it. If I'm unable to find out what's wrong I'll break the page up into multiple pages so that it will definitely work.

And I'm not sure if you're allowed more than one equals sign in a URL at once. It works fine so long as you don't send a doctype, so I never bothered changing it.

Code to come later.

Cheers

Tavarin
04-23-2008, 02:49 PM
So I fixed it for me. This is still the single page variation of my script, and it works for me on both IE and Firefox. I split it into multiple pages, but that didn't work, so here is the single page code.

So this is the multiple user variation, an example of which is here:
http://www.actonhighschool.ca/7/Boards.php

First you'll need a table to keep track of users:


<?php
mysql_connect ("localhost", "username", "password") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("database name") or die ('I cannot connect to the database because: ' . mysql_error());

$sql = "CREATE TABLE users
(
number int NOT NULL AUTO_INCREMENT,
PRIMARY KEY(number),
name varchar(50),
password varchar(50),
avatar varchar(50),
signature varchar(1000)
)";

mysql_query($sql) or die ('I cannot create table because: ' . mysql_error());

echo "table created";

?>

Once you have that in you make a registration page (call it Register.php):


mysql_connect ("localhost", "username", "password") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("database name") or die ('I cannot connect to the database because: ' . mysql_error());

/*Get results from users table and then set initial variables*/
$result = mysql_query("SELECT * FROM users");

$userexist="0";

$usercreated="0";

/*Arrange table data into arrays*/
while($row = mysql_fetch_array($result)) {
$number[]= $row['number'];
$l_name[]= $row['name'];
}

/*Run a loop to see if the username entered exists or not*/
for($j = 0; $j < sizeof($number); $j++) {
if ($_POST[txtUsername] == $l_name[$j]) {
$userexist="1";
}
}

/*Check to see if a username and password has been entered and if so
Check to see if the entered passwords match and if they do
Check to see if the user already exists and if not
Register the new username*/
if($mode=="register") {
if($_POST[txtUsername] == "" || $_POST[txtPassword] == "") {
Echo "<p>Please enter a username and/or a password</p>";
}
elseif($_POST[txtPassword]==$_POST[txtPasswordc]) {
if($userexist != "1") {
mysql_query("INSERT INTO users (name, password)
VALUES ('$_POST[txtUsername]', md5('$_POST[txtPassword]'))")
or die ('I cannot add user: ' . mysql_error());
echo "<p>User Added</p>";
echo "<p><a href='Boards.php'>Return To The Boards</a></p>";
$usercreated="1"; }
else {
echo "This username already exists, please enter another";
}
}
else {
echo "Your password did not match, please type it in again";
}
}

/*If a new user hasn't signed up then show a form through which they can enter a username, password and confirmation*/
if($usercreated == "0"){
echo "
<p>
<strong>Register</strong>
<form name='form' method='post' action=\"$PHP_SELF?ID=&mode=register\">
<p><label for='txtUsername'>Username:</label>
<br /><input type='text' title='Enter your Username' name='txtUsername' /></p>
<p><label for='txtpassword'>Password:</label>
<br /><input type='password' title='Enter your password' name='txtPassword' /></p>
<p><label for='txtpasswordc'>Confirm Your Password:</label>
<br /><input type='password' title='Confirm your password' name='txtPasswordc' /></p>
<p><input type='submit' name='Submit' value='Register' /></p>
</form>
</p>";
}

And finally the actual boards page (call it Boards.php):


<?php

session_start();

mysql_connect ("localhost", "username", "password") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("database name") or die ('I cannot connect to the database because: ' . mysql_error());

/*Login Variable to check if user logged in. Default is zero*/
$logged="0";

/*Get the current time and date*/
$dateadd=date("j of F Y, \a\\t g.i a", time());

/*Get user name as variable*/
$nameadd=$_SESSION['user'];

/*Add a post if the add post form has been submitted*/
if($mode=="add") {
mysql_query("INSERT INTO messageboards (name, date, title, message)
VALUES ('$nameadd', '$dateadd', '$_POST[titleadd]', '<pre>$_POST[messageadd]</pre>')")
or die ('I cannot add message because: ' . mysql_error());
}

/*Delete a post if the remove button has been clicked*/
if($mode=="remove") {
mysql_query("DELETE FROM messageboards WHERE number = $ID");
}

/*End the users session*/
if($mode=="logout") {
unset($_SESSION['user']);
}

/*Get all the user names and passwords*/
$result = mysql_query("SELECT * FROM users");

while($row = mysql_fetch_array($result)) {
$number[]= $row['number'];
$l_name[]= $row['name'];
$password[]= $row['password'];
}

/*If the login form has been submitted, check the database user names and passwords against the entered ones. Done with encryption.*/
if($mode=="login") {
$enteredpw=md5($_POST['txtPassword']);
for($i = 0; $i < sizeof($number); $i++) {
if ($_POST['txtUsername'] == $l_name[$i] && $enteredpw == $password[$i]) {
$logged = "1";
}
if ($_SESSION['user'] == $l_name[$i]) {
$logged = "2";
}
}

if ($logged == "1") {
session_start();
$_SESSION['user'] = $_POST['txtUsername'];
$nameadd=$_SESSION['user'];
}
}

/*Check to see if a session exists, and if so set logged to be 2*/
for($j = 0; $j < sizeof($number); $j++) {
if ($_SESSION['user'] == $l_name[$j]) {
$logged = "2";
$nameadd=$_SESSION['user'];
}
}

/*echo in the html doctype and head*/
echo "
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
<title>The Boards</title>
</head>
<body>
<font face='Times New Roman' color='#FFFFCC'>";

include("header.inc.php");

/*If the user is logged in print out the table of messages with the remove button. Also print out a form for adding messages.*/
/*If no user if logged in then print the table of messages without a remove button, and print a login form.*/
$i="0";
if ($logged == "2") {
print "<p>". $_SESSION['user'] ." Is logged in </p>";
echo "<a href=\"$PHP_SELF?ID=$number[$i]&mode=logout\">Logout</a><br /><br />";
$result = mysql_query("SELECT * FROM messageboards ORDER BY number DESC");
while($row = mysql_fetch_array($result)) {
$numbers[]= $row['number'];
$n_name[]= $row['name'];
$date[]= $row['date'];
$title[]= $row['title'];
$message[]= $row['message']; }
echo "<table border='1' width='500px'>";
for ($n = 0; $n < sizeof($n_name); $n++) {
echo "<tr><td>" . $n_name[$n] . "</td></tr>";
echo "<tr><td>" . $date[$n] . "</td></tr>";
echo "<tr><td><strong>" . $title[$n] . "</strong></td></tr>";
echo "<tr><td>" . $message[$n] . "</td></tr>";
if($nameadd == $n_name[$n]) {
echo "<tr><td><a href=\"$PHP_SELF?ID=$numbers[$n]&mode=remove\">Delete Message</a></td></tr>";
}
echo "<tr><td><br /><br /></td></tr>"; }
echo "</table>";
echo "
<form method='POST' action=\"$PHP_SELF?mode=add\">
<p><strong>Message Title: </strong><br /><input type='text' size='50' name='titleadd' /><br />
<strong>Message: </strong><br /><textarea cols='70' rows='20' name='messageadd' wrap='virtual'></textarea><br />
<input type='submit' value='Add Message' /></p><br />
</form>";
}
else {
$result = mysql_query("SELECT * FROM messageboards ORDER BY number DESC");
while($row = mysql_fetch_array($result)) {
$number[]= $row['number'];
$n_name[]= $row['name'];
$date[]= $row['date'];
$title[]= $row['title'];
$message[]= $row['message']; }
echo "<table border='1' width='500px'>";
for ($m = 0; $m < sizeof($n_name); $m++) {
echo "<tr><td>" . $n_name[$m] . "</td></tr>";
echo "<tr><td>" . $date[$m] . "</td></tr>";
echo "<tr><td><strong>" . $title[$m] . "</strong></td></tr>";
echo "<tr><td>" . $message[$m] . "</td></tr>";
echo "<tr><td><br /><br /></td></tr>"; }
echo "</table>";
echo "
<p>
<strong>Login</strong>
<form name='form' method='post' action=\"$PHP_SELF?ID=&mode=login\">
<p><label for='txtUsername'>Username:</label>
<br /><input type='text' title='Enter your Username' name='txtUsername' /></p>
<p><label for='txtPassword'>Password:</label>
<br /><input type='password' title='Enter your password' name='txtPassword' /></p>
<p><input type='submit' name='Submit' value='Login' /></p>
</form>
</p>
<p>Don't have a login, <a href='Register.php'>Register</a></p>";
}

echo "</font>";

?>

</body>

</html>


This is actually my page which includes a header file, as well as some fonts. So if you want to use this code as is then you'll need to make a header.inc.php, otherwise remove the include line and change the font tag to whatever font you want. Right now the font is off white, so if you run this and see nothing, just check the font.

Anyway, this is the exact code from my working page so it should work. If you have any problems, or questions let me know.

Cheers

si-skyline
04-25-2008, 02:03 AM
lol.. complete madness, it wont add things to the database. even when i try and reg a new user, the registration page stays up with blank fields.. when i look at the db, there is nothing there.

i added a user manually but when i try and log in it seems to just refresh the page with the login fields still apearing, with no option to add, so i suppose it didnt log me in..

si-skyline
04-25-2008, 12:17 PM
hmm, well iv managed to get a workable site going, this one uses multifiles, one is the board, add and the other is delete..

live @ <<link removed for reconstruction, siskyline>>

Id thought that i just post snippits of the file, of course the tags and connection are there
do you think there is anything differant in this to the version you had? its clear that there isent a problem posting information to the database from a website

im confussed to the reason why your one file form wont work.



index/

<form action="latestadded.php" method="post">
<p><span class ="style3">Create a new message:</span><br />
<span class = "style2">*You must fill all fields to post a message</span> </p>
<p><span class="style2">Your name: </span><br />
<input type="text" name="name" />
</p>
<p><span class="style1">Title: </span><br />
<input type="text" name="title" />
<br />
<span class="style2">Message: </span><br />
<textarea name="message" cols="40" rows="6"></textarea>
<br />
<br />
<input type="submit" name="add" value="add message" />
</p>
</p>
</form>
$query = "SELECT * FROM messageboards ORDER BY number DESC";

$result = mysql_query($query) or die(mysql_error());

while($row = mysql_fetch_array($result)){
echo "<p><input type='radio' name='number' value='" .$row['number']."'/>";
echo "<span class=style1>" .$row['title']."";
echo " - ".$row['date']."</span><br>";
echo "<span class = style2>" .$row['message']. "<br>";
echo "-- " .$row['name']. "</span></p>";



/add

$name = $_POST['name'];
$title = $_POST['title'];
$dateadd = date("j of F Y, \a\\t g.i a", time());
$message = $_POST['message'];

mysql_query("INSERT INTO messageboards
(name,date,title,message) VALUES('$name','$dateadd','$title','$message') ")
or die(mysql_error());

echo "<span class = style2>Your data has been added to the database,<br> Please wait while the server processes the new database...</span>";

Tavarin
04-28-2008, 02:43 PM
I can't see a difference in our overall code, just that you've done this in multiple pages. In order for my script to work I had to go into the cPanel X and make all the permissions for my page 7.

Have you changed the permissions at all?

And you could easily split my code into multiple pages by pulling commented sections off add and remove onto other pages and changing the form actions.

And I think the only reason the login wouldn't work is because of permissions, since it is the one thing that has never failed for my page.

Sorry for the silence, I had no internet this weekend.

si-skyline
04-29-2008, 03:57 AM
ah, no its oki. i dont know how to change permissions tbh. i do have a server with full control. but i would perfer to have it working on the uni one. were i can only use phpmyadmin

XcOM
04-29-2008, 02:34 PM
dude, this is well above my head, i used to play about with sql for ages, not my best friend.

Tavarin
04-30-2008, 11:10 AM
SQL isn't too bad to work with, it can just be very annoying at times. I just wrote a delete script for a page and even though everything was going through correctly the server refused to get rid of the file. I'm checking my syntax to see if that's the problem, but so far the code looks fine, and on some servers runs fine. I think that mySQL's ability to work is dependent on the server it's running on.