I tried to understand your post but believe i failed.
My understanding is that you have two tables
posts:
ID
users:
user_url
previous_post_id
The way your scripts works is that upon registering a new user from an existing post which is identified by: posts:ID with the value postid_a => new users record with the row:
users: user_url = newUser
users: previous_post_id = postid_a
What you now want is that when the new user identified by newUser makes a post one should see who was it that posted the post identified by postid_a.
For me this looks impossible since the posts table where the postid_a stems from has no knowledge of which user made that post.
Now i may be mistaken (been that quite often :o ) but i think you need to have a column in your posts table where you store which user id was responsible.
My design would have been in the line with
posts:
ID : Primary key auto increment
userId : foreign key, refers to record in users
users:
userId : Primary key auto increment
user_url : Name to display
reg_user : userId from posts:userId of the post from which the registration took place
With this design it should be quite easy to populate a user record during registry by selecting userId from posts where ID=postid_a
Good luck