Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


PaulRyan last won the day on September 5 2013

PaulRyan had the most liked content!

Profile Information

  • Gender
    Not Telling
  • Location
  • Age

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

PaulRyan's Achievements


Member (2/5)



  1. Error reporting should be on by default...

  2. This something I have been thinking of for a few weeks now just never got round to creating it until now. How it works You add songs to the MySQL database and select which playlist any new song goes into. When you have added the song it will automatically be added to its respective playlist and have a number allocated for the play in order. The clever bit is that it plays on a continuous loop as the script finds out how long the song is and updates a field, so when the song has played through it will loop to the next one and when it reaches the end it will loop back to the start. You can skip forward and backwards, stop the song, pause the song and play the song. All of this with just PHP, MySQL, Javascript, HTML and CSS. Pretty proud of it if I may say so myself. Link Check it out here: http://www.pulse-box.com/youtube/index.php I haven't allowed people to create playlists or add songs currently, thinking of creating login system so members can have their own playlists or something like that. Also members will be allowed to change the order of songs in their playlists ECT. Just have a look and mess around Regards, Paul.
  3. Hey LookinfreshUK, try the following in place of your current code. <?PHP $usernames = array('admin','admin2'); $passwords = array('admin','admin2'); $page = array('index.php','Harts.php'); // Count the amount of users in array. $count_users = count($usernames); // Set users found to "0". $user_found = '0'; // Set username and password variables from $_POST data. $username = $_POST['username']; $password = $_POST['password']; // Check to see if we have a match in usernames // If we have a match set a variable with the record number // Update "$user_found" if we find a match for($u=0; $u<$count_users; $u++) { if($username == $usernames[$u]) { $userRecord = $u; $user_found = '1'; } } // If no user is found, login has failed. Re-direct back to login. if(!$user_found) { header('Location: login.php?value=fail'); exit; } // If usernames don't match, login has failed. Re-direct back to login. if($usernames[$userRecord] != $username) { header('Location: login.php?value=fail'); exit; // If passwords don't match, login has failed. Re-direct back to login. } else if($passwords[$userRecord] != $password) { header('Location: login.php?value=fail'); exit; // If usernames and passwords match, login succeeded. Re-directed to player specific page. } else { $_SESSION['username'] = $username; header("Location: $page[$userRecord]"); exit; } ?> Tell me if it works or not bud Regards, Paul.
  4. Ohh right I understand, try the following... <?php function splitTitle($title) { // Split title $splitTitle = explode(" ",$title); // Count words in title $countWords = count($splitTitle); // Add each word EXCEPT first to $otherWords variable for($i=1; $i<$countWords; $i++) { $otherWords .= ' '.$splitTitle[$i]; } return array($splitTitle[0], $otherWords); // Return the array of words } $title = splitTitle('Who Am I People Lover'); // Set title as function echo '<span style="color:red;">',$title[0],'</span>'; // Returns first word from title echo '<span style="color:green;">',$title[1],'</span>'; // Returns other words from title ?> Tell me how it goes bud. Regards, Paul.
  5. You are half way there with your idea, as it will work. What do you want to do if the header is more than 3 words long? Do you want a different color text for the words? Do you want to carry on using the color being used for "Am I" or use the color used for "Who"? If we know what you'd like to do, it would make it a little simpler for us Regards, Paul.
  • 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.