Welcome Guest, Not a member yet? Register   Sign In
URL's - Need solution
#1

[eluser]CappY[/eluser]
I'm developing my project with winamp plugin and CI for website. I have someclass and somemethod and somemethod accept arguments $user, $key, $artist, $title, $album, $year, $genre.

Soo the problem is that $album, $year and $genre sometimes will be empty. But if $year is empty $genre goes as $year argument. Any way to fix this without needing to hack plugin to send something like n/a and in CI if ($year = 'n/a') die(); ?

Thanks. Smile

Edit: so far before I started rewriting on CI it was with $_GET['album'] and etc. script.php?album=something&year=something and so on.

it look like that:

Karas/Fenomeno///genre/
#2

[eluser]Basketcasesoftware[/eluser]
I'm guessing you are using a form and you are trying to get at the information passed by it? And how are you trying to store this information? Database? Directory structure? What is it you want to do, what do expect to see, and what are you actually seeing (paraphrasing InsiteFX some there)?
#3

[eluser]CappY[/eluser]
[quote author="Basketcasesoftware" date="1298255244"]I'm guessing you are using a form and you are trying to get at the information passed by it? And how are you trying to store this information? Database? Directory structure? What is it you want to do, what do expect to see, and what are you actually seeing (paraphrasing InsiteFX some there)?[/quote]
Actually I'm getting info from segments. But sometimes 6segment will be empty and segment 7 became segment 6 and my script mess up.
#4

[eluser]Basketcasesoftware[/eluser]
How are you setting up the segments. Where are they coming from? Are you entering them by hand in your address bar?
#5

[eluser]InsiteFX[/eluser]
If you want help you need to explain how you are doing things!

What version of CI
How you are using segments to get the information etc.

Show your code so that we may be able to help you.

Please use code tags for code.

InsiteFX
#6

[eluser]CappY[/eluser]
The segments are entered by winamp plugin.
Code:
function generate($user = FALSE, $key = FALSE , $artist = FALSE, $title = FALSE, $album = FALSE, $year = FALSE, $genre = FALSE)

The goal is that sometimes year maybe empty so $genre is used as $year when actual $year is empty.
#7

[eluser]Basketcasesoftware[/eluser]
Does it call the browser or something? The segments are part of an URL which is being used to call your server. You should have your plugin condition the URL better if that's the case.
#8

[eluser]CappY[/eluser]
I done it by adding _ symbol if string isEmpty in winamp plugin and added
Code:
if ($segment == '_') $segment = NULL;

But I saw another problem... If the segment contains ( or ) after proccessing image with imageMagick in PHP they are replaced with
Code:
& # 4 0 ;
Im getting data like this:
Code:
$this->data    = addslashes(urldecode($data));




Theme © iAndrew 2016 - Forum software by © MyBB