Skip to content

Instantly share code, notes, and snippets.

@dhamidi
Forked from Trevorjoel/Musicandart.php
Last active January 31, 2016 12:01
Show Gist options
  • Save dhamidi/c45d7d747638f705ec6d to your computer and use it in GitHub Desktop.
Save dhamidi/c45d7d747638f705ec6d to your computer and use it in GitHub Desktop.
First project
<head>
<title>About the page</title>
<link rel="stylesheet" href="main.css">
</style>
</head>
<body>
<style type="text/css">
{ background-image: url("images/old-grunge-vector-background.jpg");
margin-left: 1cm;
}
</style>
<div class="nav">
<ul>
<li class="home"><a href="index.html">Home</a></li>
<li class="musicandart"><a href="musicandart.html">Music and Art</a></li>
<li class="Travels"><a href="#">Travels</a></li>
<li class="A better World"><a href="#">A better World</a></li>
<li class="Teach and Learn"><a href="#">Teach and Learn</a></li>
<li class="Marketplace"><a href="#">Marketplace</a></li>
<li class="contact"><a href="#">Contact</a></li>
<li class="About"><a href="about.html">About</a></li>
</ul>
</div>
<h1>About our awesome page</h1>
<h4>Who we are</h4>
<p>This is a community of like minded people. We are artists, writers, comics, travelers, knowledge seekers, teachers, activists, small business owners, entrepeneurs who share their thoughts, travels, adventures, projects; its a place to connect with eachother on a global platform. Bookmark this page and check back for updates.</p>
<p>Why not facebook? Because there is too much negativity, clickbait and mis-information. We will curate our page, like a beautiful garden, only the most useful information will get through to the viewers. </P>
<p>If you like garbage and mis-information but don't like interesting things, then click away, the internet is your oyster. This is a community website where we try make a difference by supporting each other. Submit your ideas, articles, stories and promotions Here (LINK TO CONTACTS)</p>
<h4>Search function</h4>
<p>If you are looking for an article, want to find a service or connect with someone by locality, all posts have been tagged by topic and location. Thus, all information is able to be recalled with the search function. HERE! Or feel free to browse, there is something for everybody.</p>
<h4>Topics</h4>
<p>Below and in the navigation bar at the top of each page are the links to each of our website categories. Scroll down for a description of each.</p>
<h4><A HREF="file:///C:/Users/Trev/Desktop/web/musicandart.html">Music and art for the revolution</A></h4>
<p>Find and share music and art that feeds the soul, makes the body move, calms the nerves, tickles the intellect and/or makes you want to smash the system. Use it to promote our own music and up and coming acts.</p>
<h4><A HREF="https://www.facebook.com/tgarrity">Travels, adventures and stories.</A></h4>
<p> This is where I will be documenting my travels. You will see my best photos, stories and a slightly twisted commentary
on all things foreign. I will also leave travel rescources to help you get on your way</p>
<h4><A HREF="https://www.facebook.com/tgarrity">Make a better world</A></h4>
<p> If you're not a completely selfish you should have some sort of interest in
leaving a better world for future generations. So here is the place to learn about wholesome social movements, inspirational
people, quotes, organic farming. So put flowers in the hair, roll up a fat one, save the whales and smash the system.
Let's try and have a solution based focus here, I myself will try to refrain from fruitless whining. </p>
<h4><A HREF="https://www.facebook.com/tgarrity">Teach, learn and share</A></h4>
<p>Learning is the best thing, you are never too old to learn. Here is the place to find the best knowledge and share what you know. I will be sharing interesting things I've learnt, articles, tutorials and videos on all topics from particle physics and organic farming to how to slap your Ho without spilling your Hennesey.</p>
<h4><A HREF="https://www.facebook.com/tgarrity">Marketplace</A></h4>
<h4>Submit</h4>
<p>Like what we do?<! --- (link)---> Submit your own music, art, articles, stories and pitch your business ideas or advertise your services right here right now. Each location and category will be tagged and be able to be found with the (link)search function.</p>
<p><em>I hope you enjoy and share your thoughts with me.</em></p>
<p>Trevor</p>
<h2 class="tst2">Enjoy the Brains</h2>
<IMG class="tst2"SRC="images/braindeadratmonkey.jpg" ALT="Enjoy" WIDTH=332 HEIGHT=332>
<h4><A HREF="https://www.facebook.com/tgarrity">Click for my facebook page like a good little voyeur</A></h4>
</body>
<html>
<head>
<title>Comments</title>
</head>
<body>
<div class="comment-form">
<h2 class="comments-wrapper-heading"> Leave a comment </h2>
<form id="comment-form" action="comment_form.php" method="POST">
<div class="commentform-element">
<label class="hide" for="name">Full Name</label><br>
<input class="input-fields" id="name" name="name" type="text" placeholder="What's up?" value=""/>
</div>
<div class="commentform-element">
<label class="hide" for="author">Email</label><br>
<input class="input-fields" id="email" name="email" type="text" placeholder="Email" value=""/>
</div>
<div class="commentform-element">
<label class="hide" for="comment">Message</label><br>
<textarea id="comment" class="input-fields" placeholder="Message" name="comment" cols="40" rows="4"></textarea>
</div>
<input name="submit" class="form-submit-button" type="submit" id="submit-comment" value="Post comment">
<input type="hidden" name="comment_post_ID" value="22" id="comment_post_ID">
<input type="hidden" name="comment_parent" id="comment_parent" value="0">
</form>
<?php include('list_comments.php'); ?>
</div>
</body>
</html>
<?php
define ('DB_NAME', 'comments') ;
define ('DB_USER', 'root' ) ;
define ('DB_PASSWORD', '' ) ;
define ('DB_HOST', 'localhost' ) ;
$link = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD);
if (!$link) {
die ('could not connect : ' . mysql_error ());
}
$database_selected = mysql_select_db ('DB_NAME', $link);
if(!'database_selected') {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully database';
$name = $_POST ["name"];
$message = $_POST ["comment"];
$email = $_POST ["email"];
/* Latest work! All seems fine no error messages. Open to improvements, comments and suggestions */
$sql = "INSERT INTO comments.commentform (`name`, `email`, `comment`) VALUES ('$name','$email', '$message');";
echo "$name","<br>", "$message";
if (!mysql_query($sql)) {
die('Error: ' . mysql_error());
}
mysql_close();
?>
<html>
<head>
<div class="nav">
<ul>
<li class="home"><a href="index.html">Home</a></li>
<li class="musicandart"><a href="musicandart.html">Music and Art</a></li>
<li class="Travels"><a href="#">Travels</a></li>
<li class="A better World"><a href="#">A better World</a></li>
<li class="Teach and Learn"><a href="#">Teach and Learn</a></li>
<li class="Marketplace"><a href="#">Marketplace</a></li>
<li class="contact"><a href="#">Contact</a></li>
<li class="About"><a href="about.html">About</a></li>
</ul>
</div>
<title>Adventures, learnings and irregular thoughts from Trevor</title>
<link rel="stylesheet" href="main.css">
</head>
<h1>Adventures, learnings and irregular thoughts from Trev</h1>
<body>
<p>On this page you will find updates on the various topics featured on this site. <p> To learn what this site is about, how to use it and how it can be useful to you.</p>
<p>Go here</p>
<em>I hope you enjoy and share your thoughts with me.</em>Trevor</p>
<article class=articleform>
<header>
<H4 class="tst3">Presenting the Jingles</H4>
</header>
<p>Published: <time pubdate="pubdate">18th Jan 2016</time></p>
<p>They are from Estonia.... they are cool because ... You should listen to them because ...
Here is a video of them </p>
<iframe width="640" height="360" src="https://www.youtube.com/embed/KhKxSyt1HkA" frameborder="0" allowfullscreen></iframe>
...
<footer>
<p><p><A HREF="JINGLES LINK">Clickeyty click for more Jingles</A></p></p>
<p><A HREF="JINGLES LINK">Clickeyty click for more Music and art</A></p>
<div class="comment-form">
<h2 class="comments-wrapper-heading"> Leave a comment </h2>
<form id="commentform" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<div class="commentform-element">
<label class="hide" for="author">Full Name</label><br>
<input class="input-fields" id="author" name="author" type="text" placeholder="Full Name" value=""/>
</div>
<div class="commentform-element">
<label class="hide" for="author">Email</label><br>
<input class="input-fields" id="email" name="email" type="text" placeholder="Email" value=""/>
</div>
<div class="commentform-element">
<label class="hide" for="comment">Message</label><br>
<textarea id="comment" class="input-fields" placeholder="Message" name="comment" cols="40" rows="2"></textarea>
</div>
<input name="submit" class="form-submit-button" type="submit" id="submit-comment" value="Post comment">
<input type="hidden" name="comment_post_ID" value="22" id="comment_post_ID">
<input type="hidden" name="comment_parent" id="comment_parent" value="0">
</form>
</div>
</form>
</div>
</footer>
</article>
<h2 class="tst2">Enjoy the brains</h2>
<IMG class="tst2" SRC="images/braindeadratmonkey.jpg" ALT="Enjoy" WIDTH=332 HEIGHT=332>
<h4><A HREF="https://www.facebook.com/tgarrity">Click for my facebook page like a good little voyeur</A></h4>
</body>
</html>
<?php
define ('DB_NAME', 'comments') ;
define ('DB_USER', 'root' ) ;
define ('DB_PASSWORD', '' ) ;
define ('DB_HOST', 'localhost' ) ;
$link = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD);
if (!$link) {
die ('could not connect : ' . mysql_error ()) ;
}
mysql_select_db (DB_NAME);
if(!'database_selected') {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully to the database';
$sqlquery = mysql_query("SELECT * FROM comments.commentform ORDER BY id DESC");
while ($rows = mysql_fetch_assoc($sqlquery))
{
$id=$rows ['id'];
$name=$rows ['name'];
$comment=$rows ['comment'];
echo $name . '<br/>' . $comment . '<br/>';
}
mysql_close();
?>
h1 { color: #500B0B;
font-family: arial;
text-align: center;
border: solid;
background-color: #BB6F00;
font-size: 225%;
border-radius: 10px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
margin-bottom: 5px;
margin-top: 0px;
}
h2 { font-family: arial;
color: #F00C0C;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 20px;
padding: 5px
}
h4 {text-align: center; font-size: 125%; color: rgba(113, 7, 7, 0.95);
padding: 5px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.6), 0 6px 20px 0 rgba(0, 0, 0, 0.69);
border-radius: 20px;
width: inherit;
}
p {
font-family: times;
color: #500B0B;
font-size: 115%;
font-style: center;
font-weight: 0%;
text-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 20px;
}
iframe { position: center;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 5px;
}
a {color: #500B0B;
}
body {
margin: 0;
padding: 0;
background: #BB6F00; <--- sets back text --->
}
.nav ul {
list-style: inside;
text-align: center;
padding-top: 10px;
border: none;
background-color: none; opacity: 0.8;
margin: none;
padding-bottom: 0px;
}
.nav li {
font-family: 'Oswald', sans-serif;
font-size: 110%;
line-height: 20px;
height: 40px;
border: 0px solid #888;
line-height: 40px;
padding: 5px;
border-collapse: inherit;
text-align: center;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4), 0 6px 20px 0 rgba(0, 0, 0, 0.49);
border-radius: 20px;
position: center;
}
.nav li {
display: inline-block;
}
.nav a {
text-decoration: none;
color: inherit;
}
.nav a:hover {
background-color: #005f5f;
}
a.active {
background-color: #fff;
color: #444;
}
.tst1 {font-family: arial; text-align: center; font-size: 125%;}
.tst2 {
padding: 10px;
background-color: none;
border: rgba(113, 7, 7, 0.95);
border-style: inset; border-radius: 10px ;
}
.tst3
{ padding: 10px;
background-color: none;
border: rgba(113, 7, 7, 0.95);
border-style: inset; border-radius: 10px ;
position: relative; left: 750px;
}
.fuckagoat {
background-color: orange;
color: black;
font-size: 150%;
}
.articleform { background-color: #F8F8F8;
padding: 20px;
border: 5px solid #008000 ;
border-color: rgba(113, 7, 7, 0.95);
border-style: inset;
border-radius: 10px;
margin: 10px;
font: black;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 10px;
}
body { background-repeat: no-repeat;
background-attachment: fixed;
background-image: url("images/old-grunge-vector-background.jpg");
margin-left: 1cm; margin-right: 1cm;
{
border-radius: 10px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 15px;
<html>
<head>
<title>Music and Art</title>
<STYLE>
H1 { color: green }
H1 {font-family: arial; text-align: center;}
H2 {font-family: arial}
H2 { Color: red }
H6
p { color: Black }
p { font-size: 115% ; }
p { background-color: orange = #ffa500 = rgb(255,165,0)}
P {font-style: center;}
A, h4, P, IMG { color: Black; font-size: 115%; text-align: center;}
.tst1 {font-family: arial; text-align: center; }
.tst2 {padding: 20px; background-color: orange; border: medium solid red;
border-style: inset; }
.tst3 { text-align: left; font-size: 125%;}
BODY {margin-left: 1cm}
</STYLE>
</head>
<body>
<H6 class="tst1">TEST</H6>
<BODY BGCOLOR="66CCCC"BACKGROUND="images/old-grunge-vector-background.jpg">
<h1>Music and Art for the revolution</h1>
<p> Here I share music and art that inspires the soul,
makes the body move, makes you laugh, calms the nerves, tickles the intellect and/or makes you want to throw a rock into a
cop's face. I will also use it to shamelessly promote my own and music and my friends. I will be updating about any gigs or concerts I attend. </p>
<p><H4 class="tst3">Here is a band I like</H4></p>
<p>They are from .... they are cool because ... You should listen to them because ...
Here is a video of them </p>
<iframe width="640" height="360" src="https://www.youtube.com/embed/ehu3wy4WkHs" frameborder="0" allowfullscreen></iframe>
<h2>Enjoy the brains</h2>
<IMG class="tst2"SRC="images/braindeadratmonkey.jpg" ALT="Enjoy" WIDTH=332 HEIGHT=332>
<h4><A HREF="https://www.facebook.com/tgarrity">Click for my facebook page like the voyeuristic little faggots you are</A></h4>
</body>
</html>
CREATE DATABASE IF NOT EXISTS comments;
USE comments;
CREATE TABLE comments.commentform (
id int primary key auto_increment,
name text,
email text,
comment text
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment