Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8223443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:41:59+00:00 2026-06-07T14:41:59+00:00

im getting blank spaces before my id? when it comes back i get this?

  • 0

im getting blank spaces before my id?

when it comes back i get this?

&id=%20%20%20%20%20%20%20%20%20%20%20%201005

its supposed to just do this

&id=1005

Could it be my jquery data code?

    success: function(data) { 
    $('.success').slideDown('slow');  
    setTimeout(function(){window.location="user.php?v=single&id="+data;}, 3000);            
    }   

or could it be the php code?

<?php
include 'includes/db.php';
protect();
if(isset(clean($_POST['uid']))) { 
$usrid=$_SESSION['uid'];
$insertNewUser=mysql_query("INSERT INTO users (uid,status,datetime) VALUES  ('$usrid','0',NOW())") or die(mysql_error());
$id=mysql_insert_id();
echo $id;
$insertUserOptions=mysql_query("INSERT INTO users_options (uid,lid) VALUES  ('$usrid','$id')") or die(mysql_error());
mkdir('media/listings/'.$id,0755);
mkdir('media/listings/'.$id.'/photos',0755);
mkdir('media/listings/'.$id.'/documents',0755);
mkdir('media/listings/'.$id.'/video',0755);
mkdir('media/listings/'.$id.'/audio',0755);
chmod('media/listings/'.$id,0775);
chmod('media/listings/'.$id.'/photos',0775);
chmod('media/listings/'.$id.'/documents',0775);
chmod('media/listings/'.$id.'/video',0775);
chmod('media/listings/'.$id.'/audio',0775);
} 
?> 

UPDATE:

all the characters infront of the id were because i ad several lines of file includes in the protect() function. Once i moved those includes into a new function and called that accordingly it fixed the issue. Thanks martin for your clear solution as well :).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T14:42:03+00:00Added an answer on June 7, 2026 at 2:42 pm

    Try this, its not a solution but a workaround!

    $('.success').slideDown('slow');  
        setTimeout(function(){window.location="user.php?v=single&id="+$.trim(data);}, 3000);            
    }   
    

    It’s uses the jQuery trim function to remove the spaces before and after. It should do the trick.

    To actually fix it you can do a few other things:

    Option 1

    Return the ID as an json string, so the spaces are not visible.

    Option 2

    Check your files for echo spaces or maybe sometimes closing the php tag where it’s not necessary and echo’ing spaces to your result.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting confused by bank switching in PIC assembler... This works for putting a
Getting 401 errors when trying to use ASP.NET back end in load balanced environment
Getting red warning message that expected identifier for this statement CALayer = ImageView.layer; Using
Getting this out of the way; I don't frequently do much in php or
I'm getting blank page when I open the Report Manager: I've got a header
This should be a simple problem, but I am have a tough time getting
I have a menu that contains submenus. Its HTML source looks like this: <ul
I've been trying to figure out where I am getting this extra space between
Following on from this question , I'm totally stumped on getting LaTeX to give
I want to do something like this but always getting error so code is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.