Search found 9 matches

by jcafaro10
Wed Jan 06, 2010 11:58 am
Forum: PHP - Code
Topic: ltrim() ?
Replies: 5
Views: 167

Re: ltrim() ?

I'll look into basename(). How can I actually remove ".." then?
by jcafaro10
Wed Jan 06, 2010 11:18 am
Forum: PHP - Code
Topic: ltrim() ?
Replies: 5
Views: 167

Re: ltrim() ?

actually thats not true, the link you sent specifies that it will remove characters as well. The ltrim function does remove what I need it to but it throws that warning, I'm not sure what it means or why its being thrown.
by jcafaro10
Wed Jan 06, 2010 10:59 am
Forum: PHP - Code
Topic: ltrim() ?
Replies: 5
Views: 167

ltrim() ?

I'm trying to use the ltrim function but getting an error. Here's my code: $line = ltrim($line,"../music/"); I just want to remove "../music/" from some text. Getting this warning: Warning: ltrim() [function.ltrim]: Invalid '..'-range, no character to the left of '..' in C:\xampp...
by jcafaro10
Tue Jan 05, 2010 5:57 pm
Forum: PHP - Code
Topic: Trying to make a playlist in php
Replies: 10
Views: 2822

Re: Trying to make a playlist in php

I changed it from songs to song so that the names didn't conflict and that fixed the problem although I'm still not completely sure why. I also got my playlist feature to work (sort of). It works the first time. Here's the code to make the playlist   if (isset($_POST['playlist'])) {     $myPlayList ...
by jcafaro10
Tue Jan 05, 2010 4:52 pm
Forum: PHP - Code
Topic: Trying to make a playlist in php
Replies: 10
Views: 2822

Re: Trying to make a playlist in php

Wow I didn't even know you can do that! To be honest, I'm not quite sure if I understand how it works, case in point I've run into a bug that I've found while using it but can't really figure out why it occurs:   <html> <p align=center> <?php if (isset($_POST['playlist'])) {     echo "Selected ...
by jcafaro10
Tue Jan 05, 2010 1:33 pm
Forum: PHP - Code
Topic: Trying to make a playlist in php
Replies: 10
Views: 2822

Re: Trying to make a playlist in php

Oh...ok, then how is it possible to do what I'm trying to do. I want the ability to add songs to a playlist (use checkboxes) but also play individual songs. I don't think I can tie anything to a button can I? Example, this part:   <input type=\"submit\" name=\"submit\" value=\&qu...
by jcafaro10
Tue Jan 05, 2010 1:11 pm
Forum: PHP - Code
Topic: Trying to make a playlist in php
Replies: 10
Views: 2822

Re: Trying to make a playlist in php

Quotes doesn't help, no matter which one I select it always shows the first one when I do your thing. I also changed the loop to:       foreach ($songs as $key => $value)     {                 echo "$value<br/>";         }   and it still only works if I select the first one otherwise it gi...
by jcafaro10
Tue Jan 05, 2010 12:49 pm
Forum: PHP - Code
Topic: Trying to make a playlist in php
Replies: 10
Views: 2822

Re: Trying to make a playlist in php

Thanks, right now I'm trying to just get checkboxes to work. Here's what it looks like now:   <html>   <h1>My Music</h1>   <p align=center> <?php if (isset($_POST['submit'])) {     $selected_song = $_POST['song'];     print "Now playing $selected_song <br>"; } if (isset($_POST['playlist'])...
by jcafaro10
Tue Jan 05, 2010 11:53 am
Forum: PHP - Code
Topic: Trying to make a playlist in php
Replies: 10
Views: 2822

Trying to make a playlist in php

I'm trying to make something resembling a playlist in php. I'm really new to php but not programming so I have some ideas I'm just wondering what the best thing to do would be. Here's what I have so far:   <html>   <h1>My Music</h1>   <p align=center> <?php if (isset($_POST['submit'])) {     $select...