39 users online (0 members and 39 guests)  


  Results 1 to 3 of 3
  1. #1
    ramki067's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Posts
    22

    Symbol '+' is not getting transfered to another page!

    Hi,

    I'm trying to transfer a name to another webpage using the below code.
    Code:
    echo "<tr bgcolor=$bgc><td>$next</td><td><a href=javascript:void(0); onclick=\"javascript:window.open('$dir')\" target=main title=\"Click to view the File location\">$name</a></td><td><center>$stype</center></td><td><center>$audiotype</center></td><td><center>$videotype</center></td><td><center>$bitrate</center></td><td><a href=\"completedetails.php?						av=$audiovideo&directory=$directory&atype=$audiotype&vtype=$videotype&name=$name&streamid=$id&ao=$aonly&vo=$vonly& \" target=main title=\"Click to view complete details\">Click Here </a></td></tr>";
    And i'm accessing all the details sent in another page called 'completedetails.php'. The value of name which has to be sent has a '+' symbol included in the name. Now, this '+' symbol is MISSING when i try to access using the below code in the next page where i'm accessing this name.This name keeps changing and is not constant as some other name may not be having '+' symbol.

    Code:
    	$name = $_REQUEST[name];

    How can i get this '+' symbol in the name in the next webpage(i.e., completedetails.php page)

    Thanks in advance.

    Regards,
    Ramki

  2. #2
    ALL's Avatar
    Super Dooper Nerd

    Status
    Offline
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    382

    Re: Symbol '+' is not getting transfered to another page!

    That is because + literally " " (space) in uri query strings. use %2B when transferring a + sign though a GET query.

  3. #3
    hairtreatment's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2011
    Posts
    8

    Re: Symbol '+' is not getting transfered to another page!

    echo "<tr bgcolor=$bgc><td>$next</td><td><a href=javascript:void(0); onclick=\"javascript:window.open('$dir')\" rel="nofollow" target=main title=\"Click to view the File location\">$name</a></td><td><center>$stype</center></td><td><center>$audiotype</center></td><td><center>$videotype</center></td><td><center>$bitrate</center></td><td><a href=\"completedetails.php? av=$audiovideo&directory=$directory&atype=$audiotype&vtype=$videotype&name=$name&streamid=$id&ao=$aonly&vo=$vonly& \" rel="nofollow" target=main title=\"Click to view complete details\">Click Here </a></td></tr>";
    Try this
    echo "<tr bgcolor=".$bgc."><td>".$next."</td><td><a href=\"javascript:void(0);\" onclick=\"javascript:window.open('$dir')\" rel='nofollow' target=main title='Click to view the File location'>".$name."</a> </td><td><center>".$stype."</center></td><td><center>".$audiotype."</center></td><td><center>".$videotype."</center></td><td><center>".$bitrate."</center></td><td><a href='completedetails.php? av=".$audiovideo."&directory=".$directory."&atype=".$audiotype."&vtype=".$videotype."&name=".$name."&streamid=".$id."&ao=".$aonly."&vo=".$vonly."' rel='nofollow' target=main title='Click to view complete details'>Click Here </a></td></tr>";
    Last edited by HTML; 04-29-2011 at 06:04 AM.