Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: MYSQL and Form Help.  (Read 3022 times)

0 Members and 1 Guest are viewing this topic.

Jacob

    Topic Starter


    Hopeful

    Thanked: 1
    • Experience: Expert
    • OS: Windows XP
    MYSQL and Form Help.
    « on: June 13, 2009, 05:02:41 AM »
    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>

    Rob Pomeroy



      Prodigy

    • Systems Architect
    • Thanked: 124
      • Me
    • Experience: Expert
    • OS: Other
    Re: MYSQL and Form Help.
    « Reply #1 on: June 14, 2009, 02:24:31 PM »
    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.
    Only able to visit the forums sporadically, sorry.

    Geek & Dummy - honest news, reviews and howtos

    kpac

    • Web moderator
    • Moderator


    • Hacker

    • kpac®
    • Thanked: 184
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 7
    Re: MYSQL and Form Help.
    « Reply #2 on: June 15, 2009, 10:04:20 AM »
    You might also try a common CMS, such as Joomla or Drupal.

    Jacob

      Topic Starter


      Hopeful

      Thanked: 1
      • Experience: Expert
      • OS: Windows XP
      Re: MYSQL and Form Help.
      « Reply #3 on: June 15, 2009, 10:17:29 AM »
      Thanks, very helpful. Appreciated.