close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

session value space added

Thread began 10/17/2016 10:28 am by Jamie | Last modified 10/17/2016 3:38 pm by Ray Borduin | 58 views | 4 replies |

Jamie

session value space added

Hi Ray

I am creating a session

<?php echo($_GET['UserID']); ?>



based on the url such as this:

/admin_cms/customer_update.php?UserID=15



When I then use the session on another page to go back to the page its set on using something like

customer_update.php?UserID=<?php echo $_SESSION['UserID']; ?>

, for some reason its adding a space in front of the value so it then becomes

/admin_cms/customer_update.php?UserID= 15



what am I doing wrong for that to be happening?

Cheers

J

Sign in to reply to this post

Ray BorduinWebAssist

What is the code that sets the session? Maybe the problem is there? Maybe there is a space in front of it.

Sign in to reply to this post

Jamie

It's

<?php
@session_start();
if ("" == "") {
$_SESSION["UserID"] = "".($_GET['UserID']) ."";
}
?>
Sign in to reply to this post

Ray BorduinWebAssist

The space has to be added somewhere. Are you sure it isn't in the original url? If I could see the actual code on the pages I could probably find it.

There is a space somewhere... either in the url, where the session is set, or where it is written.

Sign in to reply to this post

Jamie

thanks Ray. Had a hunt around and found a couple of instances (I had tried a few times to add a session) of th session one of which had the space in it. So have deleted all but the one on the main page.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...