Hyperlink is adding an extra gap to variable


Posted on 16th Feb 2014 07:03 pm by admin

Hi, here's my problem..

I have a php generated page with a hyperlink which opens in a new window

Did you know?Explore Trending and Topic pages for more stories like this.
echo "<tr><td><a onclick="window.open('http://www.***.com/page/options.php?user_id=$user_id&session_id=$session_id','options','width=590,height=200,toolbar=no,scrollbars=yes,resizable=yes,statusbar=no,directories=no,menubar=no,location=no');return false;" href="">$user_id</a></td></tr>";

The problem occurrs at options.php?user_id=$user_id

The resulting hyperlink on the generated page adds a space to the user id after the "="

So when options.php loads.. it results in the user's id having an extra %20 at the beginning of their name

Example..

The first page links to this.. http://www.***.com/page/options.php?user_id= Eejut&session_id=12345

When options.php loads it prints..

"This is %20Eejut's Options Page"

I've tried using trim($user_id) before printing the hyperlink to the main page (that calls options.php) and the space still occurrs in the hyperlink

Anyone know what's going wrong?? thanks in advance
No comments posted yet

Your Answer:

Login to answer
149 Like 31 Dislike
Previous forums Next forums
Other forums

how to get different value in second view of webdynpro?
hello guys,

In ABAP webdynpro I am trying to create one application having two views.

Embedding flash object in Else statement
This is my first major project in PHP and I'm having some trouble embedding a flash object in an Els

php require help needed
Ok i tried to use the search funtion but the word require is everywhere.

i'm really new to cr

database design
Hi,

I got a page which allow candidate to type in their previous working experience,
I let

Upload file and add HTML
Hey everyone,

I have a client has meeting agendas and minutes that should be posted online. I

Multiple if statements
Ok so seems basic but for some reason I'm not doing it right. What I want is to be able to have 2 se

How to read posted binary data from a mobile device and post it to a web server?
Here is the senario...

I have a mobile device (MD) that posts binary data to a Web Server (WS

How to replace search button with link?
hi to everbody.
i have a search submit form and button like this :

<form id="f

error reporting
hey everyone

I have a production server in which I want error reporting but only on some page

Help with setcookie()
Merry Xmas to those on this foruum
Older guy here with some experience but not allot so please be

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash