Jump to content

newguy2010

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Posts posted by newguy2010

  1. i would like it to pull the mp3 tag if possible. and i dont have any code for the database part yet because i was trying to get the upload part set up first, but if i could just get php to pull the mp3's tag while it is in the folder then i wouldnt need php to upload the files i could just use a ftp connection with my site and upload the music and tell it to compile a database and to show the data.

    thank you

    Adam

  2. i am trying to make a page to upload music to my website and add the information of the songs into a database, but i cannot get php to let me upload a file bigger than 2mb even after i went into the php.ini and changed the max_upload_size and a few others to 99mb.

    So i was wondering if i could put my music in a folder on my website and pull the data from the items in the folder and make database entries(probably doubtful) or if i could get some help with getting php to upload bigger files?

     

    thanks,

    Adam

  3. i have got this code and i can get everything to work on this except the part to get the drop down menu for the sections, i can get the 4 sections to show but every time i try to add something to any section it is added to the last section no matter what plz help

     

    <?php
    require("connection/connection.php");
    include("connection/functions.php");
    ?>
    <HTML>
        <head>
            <link href="css/style.css" rel="stylesheet" media="screen" type="text/css" />
            <script src="javascript/functions.js" type="text/javascript"></script>
            <title>.: Bookmarks :.</title>
        </head>
        <body class="musiclist">
            <div id="content" style="top: 36px">
            	<form method="post" action="AddBookmark.php">
                    <span class="graytitle">Add Bookmark</span>
                    <ul class="pageitem">
                        <li class="bigfield"><input type="text" name="BookmarkName" placeholder="Bookmark Name" /></li>
                        <li class="bigfield"><input type="text" name="KindofBookmark" placeholder="Kind of Bookmark" /></li>
                        <li class="bigfield"><input type="text" name="BookmarkLink" placeholder="Bookmark Link" /></li>
                        <li class="select"><select name="d">
                            <?php 
                                $getbookmarksections = mysql_query("SELECT * FROM bookmarksections");
                                confirm_query($getbookmarksections);
                                
                                while($getbm = mysql_fetch_array($getbookmarksections)){
    							$bmid = $getbm["ID"];
    							$sn = $getbm["SectionName"];
    							echo "<option value=\"$bmid\">$sn</option>";
    						}
                            ?>
                        </select><span class="arrow"></span></li>
                        <li class="button">
                        <input name="AddBookmark" type="submit" value="Add Bookmark" />
                        </li>
                    </ul>
               	</form>
                <?php
    			if(isset($_POST["AddBookmark"])){
    				$Bookmark = $_POST["BookmarkName"];
    				$KindofBookmark = $_POST["KindofBookmark"];
    				$BookmarkLink = $_POST["BookmarkLink"];
    
    				$add = mysql_query("INSERT INTO `bookmarks` (`ID`,`SectionID`,`KindofBookmark`,`Bookmark`,`BookmarkLink`)
    								VALUES ('NULL','$bmid','$KindofBookmark','$Bookmark','$BookmarkLink')");
    				confirm_query($add);
    				  if($add == TRUE){
    				  echo "<span class=\"graytitle\">Bookmark '$Bookmark' in '$sn' Added.</span>";
    				  }
    			}
                    ?>
            </div>
            <div id="footer">
            </div>
        </body>
    </HTML>
    <?php 
    //Close Connection
    if(isset($connection)){
    	mysql_close($connection);
    }
    ?>

  4. ok i have tried and i cannot get it to work this is what i got.

    im sure its something simple plz help.

    <?php
    $bookmarksections = mysql_query("SELECT * FROM bookmarksections");
    confirm_query($bookmarksections);
    
    while ($bookmarksection = mysql_fetch_array($bookmarksections)){
    	$bookmarks = mysql_query("SELECT * 
    						  FROM bookmarks
    						  WHERE SectionID = {$bookmarksection["ID"]}");
    	confirm_query($bookmarks);
    	$count = mysql_num_rows($bookmarks);
    	echo "<li>";
    
    
    	if ($count > 0){
    		$url = urlencode($bookmarksection["SectionName"]); 
    		echo "<a href=\"Bookmarks.php?section=".$url."\">";
    	}
    
    	echo "<span class=\"name\">{$bookmarksection["SectionName"]}</span>";
    	echo "<span class=\"arrow\"></span>";
    	echo "<span class=\"graytitle\">$count</span>";						
    	echo "</a>";
    	echo "</li>";
    
    
    	if(isset($_GET['SectionName'])){
    		while($bookmarklist = mysql_fetch_array($bookmarks)){
    			$title = $bookmarklist["KindofBookmark"];
    			if ($title != NULL){
    					echo "<li class=\"title\">". $title ."</li>";
    
    					echo "<li><a href=\"{$bookmarklist["BookmarkLink"]}\">";
    					echo "<span class=\"name\">{$bookmarklist["Bookmark"]}</span>";
    					echo "<span class=\"arrow\"></span></a></li>";
    			}
    		}
    	} 	
    }						
    ?>
    

     

    thank you

    -Adam

  5. ok :) ill give it a try. how would i go about making this dynamic?

    <a href="sections.php?id=1">Section 1</a>

    <a href="sections.php?id=2">Section 2</a>

    <a href="sections.php?id=3">Section 3</a>

     

    would i do it like this, calling the database and use '$sectionid = id' and '$sectionname = Section'?

    echo "<a href=\sections.php?id=" . $sectionid . ">$sectionname</a>"; 
    

     

    thank you

    -Adam

  6. i have a database set up and i am trying to make it where i dont have to make abunch of pages, but is there a way to make it where i have a page for the sections and a page for the information? or would i have to make a page for the information within each section?

    thank you

    -Adam

  7. i was wondering how i would go about making a single page that would have sections on it and if you click a section the page reloads and shows the information that is within that section?

    i got my code to show both the section and its information at the same time but cannot figure out how to do the above.

    please help.

    thank you

    -Adam

  8. Everything on this page works the form loads and i can insert info into the form but when i click submit it just reloads the page(action="this page") and nothing happens.

      thanks in advance

      -Adam

    <?php
    require("connection/connection.php");
    include("connection/functions.php");
    ?>
    <HTML>
        <head>
            <meta content="yes" name="apple-mobile-web-app-capable" />
            <meta content="index,follow" name="robots" />
            <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
            <link href="" rel="apple-touch-icon" />
            <meta content="minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no" name="viewport" />
            <meta name="format-detection" content="telephone=no"/>
            <link href="css/style.css" rel="stylesheet" media="screen" type="text/css" />
            <script src="javascript/functions.js" type="text/javascript"></script>
            <title>.: Bookmarks :.</title>
            <link href="" rel="apple-touch-startup-image" />
            
            
            <meta content="apple-mobile-web-app-status-bar-style" content="default" />
        </head>
        <body class="musiclist">
            <div id="topbar">
               <div id="title">.: Bookmarks :.</div>
                <div id="leftbutton">
                    <a href="default.html"><img src="images/home.png"></a>
                </div>
                <div id="rightbutton">
                    <a href="">Programs</a>
                </div>
            </div>
            <div id="tributton">
            	<div class="links">
            		<a id="pressed" href="Bookmarks/Bookmarks.php">Bookmarks</a><a  href="Music/Music.html">Music</a><a  href="">Movies</a>
                </div>
            </div>
            <div id="content" style="top: 36px">
            	<form method="post" action="AddBookmark.php">
                    <span class="graytitle">Add Bookmark</span>
                    <ul class="pageitem">
                        <li class="bigfield"><input type="text" name="BookmarkName" placeholder="Bookmark Name" /></li>
                        <li class="bigfield"><input type="text" name="BookmarkLink" placeholder="Bookmark Link" /></li>
                        <li class="select"><select name="d">
                            <?php 
                                $getbookmarksections = mysql_query("SELECT * FROM bookmarksections");
                                confirm_query($getbookmarksections);
                                
                                while($getbm = mysql_fetch_array($getbookmarksections)){
    							$id = $getbm["ID"];
    							$sn = $getbm["SectionName"];
                                	echo "<option value=\"$id\">$sn</option>";
                                }
                            ?>
                        </select><span class="arrow"></span></li>
                        <li class="button">
                        <input name="AddBookmark" type="submit" value="Add Bookmark" />
                        </li>
                    </ul>
               	</form>
                <?php
    			if(isset($_POST["AddBookmark"])){
    				$SectionID = $id;
    				$Bookmark = $_POST["BookmarkName"];
    				$BookmarkLink = $_POST["BookmarkLink"];
    
    				$add = "INSERT INTO `bookmarks` (`ID` ,`SectionID` ,`Bookmark` ,`BookmarkLink`)
    								VALUES ('NULL', '$SectionID', '$Bookmark', '$BookmarkLink')"; 
    				  if(confirm_query($add)){
    				  echo "<span class=\"graytitle\">Bookmark '$BookmarkName' in '$sn' Added.</span>";
    				  }
    			}
                    ?>
            </div>
            <div id="footer">
            </div>
        </body>
    </HTML>
    <?php 
    //Close Connection
    if(isset($connection)){
    	mysql_close($connection);
    }
    ?>

     

    this is the code i suspect is not working

    <?php
    	if(isset($_POST["AddBookmark"])){
    	        $SectionID = $id;
    	        $Bookmark = $_POST["BookmarkName"];
    		$BookmarkLink = $_POST["BookmarkLink"];
    
    		$add = "INSERT INTO `bookmarks` (`ID` ,`SectionID` ,`Bookmark` ,`BookmarkLink`)
    						VALUES ('NULL', '$SectionID', '$Bookmark', '$BookmarkLink')"; 
    		if(confirm_query($add)){
    		      echo "<span class=\"graytitle\">Bookmark '$BookmarkName' in '$sn' Added.</span>";
    	        }
    	}
    ?>

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.