Login system / or some kind of anonymous commenting ( to add links )
Has it's own webpages for me to edit
Has a 'link' page that is able to take links with name, url, description.
I can't find any after googling
Posted 06 February 2013 - 06:10 PM
Posted 06 February 2013 - 06:23 PM
Posted 06 February 2013 - 06:29 PM
Posted 06 February 2013 - 10:02 PM
Posted 07 February 2013 - 04:29 AM
remiX, on 06 February 2013 - 10:02 PM, said:
Posted 07 February 2013 - 04:45 AM
Posted 07 February 2013 - 04:48 AM
Posted 07 February 2013 - 05:06 AM
Posted 07 February 2013 - 05:22 AM
Posted 07 February 2013 - 05:40 AM
Posted 07 February 2013 - 06:41 AM
Posted 07 February 2013 - 08:11 AM
<?php
//Who wants to bet this won't highlight correctly?
mysql_connect("localhost", "YOURMYSQLUSERNAME", "YOURMYSQLPASSWORD");
$query = mysql_query("SELECT * FROM YOURTABLEHERE");
echo json_encode(mysql_fetch_assoc($query));
//Really, you should be using PDO and perpared statements. I'm not typing that out, and I doubt 000WH has support for it.
?>
--You will need a pure-Lua JSON decoder. There are a few of these floating around.
print("Now fetching data from website")
result = http.get("LINKTOYOURPHPSCRIPT").readAll()
if result ~= "" then
results = json.decode(result)
else
print("Unable to fetch data from website")
end
Posted 07 February 2013 - 08:34 AM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<title>Database Info</title>
</head>
<body>
<h2>Information in the database</h2>
<?php
// Connects to your Database
mysql_connect("xxxx", "xxxx", "xxxx") or die(mysql_error());
mysql_select_db("xxxx") or die(mysql_error());
$data = mysql_query("SELECT * FROM xxxx") or die(mysql_error());
Print "\n<!-- Start of Table -->\n";
Print "<table border=1 cellpadding=15>\n";
Print "\n<!-- First row (Headings) -->\n";
Print "<tr>\n";
Print " <th>ID</th>\n";
Print " <th>User</th>\n";
Print " <th>Title</th>\n";
Print " <th>URL</th>\n";
Print " <th>Description</th> \n";
Print " <th>Post Date</th> \n";
Print "</tr> \n";
while($info = mysql_fetch_array( $data ))
{
Print "<!-- ID NO. <ID>".$info['id']."</ID> -->\n";
Print "<!-- USER <USER>".$info['user']."</USER> -->\n";
Print "<!-- VIDEO_TITLE <TITLE>".$info['video_name']."</TITLE> -->\n";
Print "<!-- VIDEO_URL <URL>".$info['video_url']."</URL> -->\n";
Print "<!-- VIDEO_DESCRIPTION <DESC>".$info['video_desc']."</DESC> -->\n";
Print "<!-- VIDEO_TIMESTAMP <POSTDATE>".$info['video_timestamp']."</POSTDATE> -->\n";
Print "<tr>\n";
Print " <td>".$info['id']."</td>\n";
Print " <td>".$info['user']."</td>\n";
Print " <td>".$info['video_name']."</td>\n";
Print " <td>".$info['video_url']."</td>\n";
Print " <td>".$info['video_desc']."</td>\n";
Print " <td>".$info['video_timestamp']."</td>\n";
Print "</tr>\n";
}
Print "<!-- End of Table -->\n";
Print "</table>\n";
?>
</body>
</html>
0 members, 2 guests, 0 anonymous users