1.

Solve : MYSQL and Form Help.?

Answer»

I am creating a kind of ONLINE music library for myself, so far it looks something like this:


I need help when posting new links tho, I want to be able to insert a song name and link and then it will be added to the list above, then these links will be stored in a MYSQL table so that they load every time I open the page. Also I want to be able to remove songs just by clicking remove next to them.

I am not sure how to make the song be 'posted' into the list and how to make it save and load from a MYSQL database.

Here is the html for the page so far, I understand some may need to be in PHP. Thank you for any help you can offer.

Code: [Select]<html>
<head>
<SCRIPT TYPE="text/javascript">
<!--
FUNCTION popup(mylink, windowname)
{
if (! window.focus)RETURN true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=550,height=400,scrollbars=yes');
return false;
}
//-->
</SCRIPT>

</head>
<title>iListen</title>
<style type="text/css">
.MAIN{
top:0px;
margin-left:-8px;
position:absolute;
width:100%;
height:25px
}
.hiden {
visibility:hidden;
}
</style>
<script language=javascript type='text/javascript'>
function debug() {
document.getElementById('loader').style.visibility = 'visible';
}
function hide() {
document.getElementById('loader').style.visibility = 'hidden';
}
</script>
<body>

<div id="main" class="main">
<TABLE BORDER="0" CELLPADDING="0" WIDTH="100%">
<TR onMouseover="this.bgColor='#CCCCFF'"onMouseout="this.bgColor='#FFFFFF'">
<TD>Wiley - Rain (Ft. Charlie Brown) <a href="http://www.youtube.com/watch?v=xDBNr64cXt8" onClick="statuscolor.bgColor='#00ff00'" target="frame" ></a>
<A HREF="http://www.youtube.com/watch?v=xDBNr64cXt8" onClick="return popup(this, 'stevie')">Listen</A>
| Remove</TD>
</TR>
<TR onMouseover="this.bgColor='#CCCCFF'"onMouseout="this.bgColor='#FFFFFF'">
<TD>Kid Cudi vs Wiley - Day 'N' Nite Rolex (Justin Fry remix) <a href="http://www.youtube.com/watch?v=5YyrFGJ1Snk" onClick="statuscolor.bgColor='#00ff00'" target="frame" >Listen Now</a>
| Remove</TD>  </TD>
</TR>
<TR onMouseover="this.bgColor='#CCCCFF'"onMouseout="this.bgColor='#FFFFFF'">
<TD>Boy Better Know - Too Many Men <a href="http://www.youtube.com/watch?v=1B6oz7eadZc" onClick="statuscolor.bgColor='#00ff00'" target="frame" >Listen Now</a>
| Remove</TD>  </TD>
</TR>
<TR onMouseover="this.bgColor='#CCCCFF'"onMouseout="this.bgColor='#FFFFFF'">
<TD>Wiley - Westwood Freestyle <a href="http://www.youtube.com/watch?v=FKzc385G5wU" onClick="statuscolor.bgColor='#00ff00'" target="frame" >Listen Now</a> 
| Remove</TD>  </TD>
</TR>
<TR onMouseover="this.bgColor='#CCCCFF'"onMouseout="this.bgColor='#FFFFFF'">
<TD>Skepta - Heartless Remix <a href="http://www.youtube.com/watch?v=XtebhjPscik" onClick="statuscolor.bgColor='#00ff00'" target="frame" >Listen Now</a>
| Remove</TD>  </TD>
</TR>
<TR onMouseover="this.bgColor='#CCCCFF'"onMouseout="this.bgColor='#FFFFFF'">
<TD>Skepta - Westwood Freestyle <a href="http://www.youtube.com/watch?v=uxPF9Vl3zwM" onClick="statuscolor.bgColor='#00ff00'" target="frame" >Listen Now</a>
| Remove</TD>  </TD>
</TR>
<TR onMouseover="this.bgColor='#CCCCFF'"onMouseout="this.bgColor='#FFFFFF'">
<TD>The Underdog Project - Summer Jam <a href="http://www.youtube.com/watch?v=pMcaDSN3dRo" onClick="statuscolor.bgColor='#00ff00'" target="frame" >Listen Now</a>
| Remove</TD>  </TD>
</TR>

<TR>
<TD><a onClick="statuscolor.bgColor='#00ff00'" target="frame" >

<center>Song Title: <input type="text" name="song" /> </br>
Song URL:   <input type="text" name="url" /> <br>
<a href="#">Add Song</a></center>
</a>
</TD>
</TR>



</TABLE>
</div>

</body>
</html>I'm not sure about the others, but I don't have time to get involved in something of this size (for free! ) sorry.

There are plenty of MEDIA libraries you could install on a web server without going to the trouble of making your own though.  Jinzora Media Server is one that springs to mind, but there are many others.  Hope this helps.You might also try a common CMS, such as Joomla or Drupal.Thanks, very helpful. Appreciated.



Discussion

No Comment Found