just me and php Posted October 19, 2006 Share Posted October 19, 2006 Basically This Is What Im Doing To Generate The Address From The Database track.-----------------------------------------------------------------------Page1-----------------------------------------------------------------------$page_name="bla/bla/bla.php";$f2 = $noticia[track]; // DataBase Columprint "<center><td><a href='$page_name?track=$f2'>$f2</td>";So Then It Generates A List Of Tracks Like ThisAdios AmigosFirst TimeSlo Ride-----------------------------------------------------------------------Then You Click On One Of The Track Names To Go To The Track Page. Heres The Link It Generates From Above Code.http://bla/bla/bla/bla.php?track=Slo%20Ride <-----In Address BarAnd This Send You To The Genearated Track Page From Database. And If It Work Right You Would See This.-----------------------------------------------------------------------Page2-----------------------------------------------------------------------2:00.55 500 bla Slo Ride2:01.33 500 bla Slo Ride2:00.55 250 bla Slo Ride2:01.33 400 bla Slo RideBut Im Getting All Tracks1:02.46 600 bla Adios Amigos1:02.46 400 bla Adios Amigos2:00.55 250 bla Slo Ride2:00.55 500 bla Slo Ride2:01.33 500 bla Slo Ride2:01.33 400 bla Slo Ride2:30.12 250 bla First TimeSo Heres My Problem I Need To Get The Very End Of URL ADDRESS Slo%20Ride WithOut The %20 And Post It In Code Below On The Track Page./Page2$srch = 'track'; //<----This Is Good$track = $_GET["track"]; //<---- This Is The Code That I Need Fixed So I Can Get The End URL To Post In Next Code Slo Ride as $track$sqlSelect=("SELECT * FROM NatHotLap where ".$srch." LIKE '%".$track."%'"); I Need To Figure Out How Remove The %20 On Track Name Slo%20Ride So I Wont Get T String ErrorAnd I Need To Figure Out How To Put ASC At The End Of Last Code Without Getting T String ErrorHope This Make Sence , Im Not That Good At PHP Quote Link to comment Share on other sites More sharing options...
Orio Posted October 19, 2006 Share Posted October 19, 2006 Use [url=http://www.php.net/manual/en/function.urldecode.php]urldecode()[/url] :)Orio. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted October 19, 2006 Share Posted October 19, 2006 The "%20" is the space character converted with urlencode, just use the [url=http://www.php.net/urldecode]urldecode()[/url] function to convert it back to a space character.Ken Quote Link to comment Share on other sites More sharing options...
just me and php Posted October 19, 2006 Author Share Posted October 19, 2006 Thank For The Quick Replys I Look At urldecode() And The Diff Ways Of Using It But Cant Figutr It Out.Can You Give Me A Few Sample Codes To Mess With.What I Need Ishttp://bla/bla/bla/bla.php?track=[color=red]Slo%20Ride[/color] <-----In Address Bar[color=red]Slo%20Ride[/color] As [color=red]Slo Ride[/color] and then put it in $sqlSelect=("SELECT * FROM NatHotLap where ".$srch." LIKE '%".[color=red]Slo Ride[/color]."%'");By Using Something Like$track = $_GET["track"];Thanks In Advance :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.