mysql - Blank spaces in mysql_insert_id(); return -
Empty space before my ID is empty?
When it comes back, I get it?
and ID =% 20% 20% 20% 20% 20% 20% 20% 20% 20% 20% 20% 201005
Expect it Only this
and id = 1005
Is this my jquery data code?
Success: Work (data) {$ ('success'). Slide Down ('Slow'); SetTimeout (function () {window.location = "user.php? V = single & amp; id =" + data;}, 3000); }
Or can this be php code?
& lt ;? Php included 'include / db.php'; To protect(); If (issued (clean ($ _ POST ['UID'])) {$ USD = $ _ session ['UID']; $ InsertNewUser = mysql_query ("Add user (UID, status, date time) value ('$ usrid', '0', now ())" or die (mysql_error ()); $ Id = mysql_insert_id (); echo Include $ id; $ InsertUserOptions = mysql_query ("users_options" (UID, lid) values ('$ usrid', '$ id') ") or die (mysql_error ()); mkdir ('media / listing /'. Id, 0755); mkdir ('media / listing /'. Id id. '/ Photos', 0755); mkdir (' media / listing / '. Id id.' / Document ', 0755); mkdir (' media / Listing /'.$ id. '/ Video', 0755); mkdir ('Media / Listing /'. ID id. '/ Aud Yo ', 0755); chmod (' media / listing / '. Id, 0775); chmod (' media / listing / '.$ id.' / Photos', 0775); chmod ('media / listing /' $ Id. '/ Document', 0775); chmod ('media / listing /' .$ id. '/ Video', 0775); chmod ('media / listing /'.$ id.' / Audio ', 0775) ;}? & Gt;
Update:
All of the id's letters were unfinished because I included several lines of file in the security () function. Once I transferred them, a new function was added to them and said that the problem was fixed accordingly. Thanks for your obvious solution Martin :).
Try it, not a solution, but a solution!
$ ('success'). Slide Down ('Slow'); SetTimeout (function () {window.location = "user.php? V = single & amp; id =" + $ trim (data);}, 3000); }
Before using this jQuery trim
function to remove the space before and after this should do the trick.
In fact to do OK you can do some other things:
Option 1
return the id as a JSON string, so the open spaces are not visible
option 2
empty To resize the space, check your files or sometimes close the php tag where it is not necessary and the blank space resonates for your result. / P>
Comments
Post a Comment