OH I understand what you're asking.
coding this for a profile page of sorts. So after registering, and
user_id. From that page they can enter different information that would be
saved in this separate database (for each user).
basic information I do need the information passed. Now that you bring it
just their display_name etc. But either way, once they enter information
into the on page form and submit it, the user-ID needs to be passed.
already be logged in and registered. Really most of the questions I asked
page for viewing.
format it with google charts or some type of visual display for them.
I am driving anyone insane here. Any advice welcome :)
Post by J.D. GrimesPost by Gregory LancasterWhen you say on the fly, you mean (for example) when a user registers,
have
Post by Gregory Lancasterthe user ID copied over into a sep database? That is actually what I am
trying to figure out haha. Id like to have the user->ID copied into a
separate database row *(or create a new table with the user-ID as the
table
Post by Gregory Lancastername)* after registration. If I could figure that out then I imagine the
rest would fall into place for me. The WP loop is something I am still
learning, so I really appreciate the reference information *Nicholas. *
*J.D* - Is that what you meant? Did I understand your question correctly?
if current_user->ID if exists fetch array($result) echo $row[1] etc...
Not exactly what I mean. My question was why are you copying the user_ID
over at that time - but that may not really be important.
If you need to add some information do the database when a user registers,
then you wan to use the user_register action hook as Nicholas said.
http://codex.wordpress.org/Plugin_API/Action_Reference/user_register
But in your function hooked to that hook, you do *not* want to use the ID
of the current user. You need to use the ID of the user that has just
registered, which will be passed as the first parameter to your hooked
function, as shown in the examples there.
Back to my question, though, I'm not sure why you feel you need to do this
at the time the user registers. I assume that it has something to do with
the date/time oriented aspect of the data that you want to store? I.e., I
guess you have some entries that need to go in at that time so they will be
dated properly? But you are going to have to do this differently for
registered users...
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Post by Gregory LancasterWhen you say on the fly, you mean (for example) when a user registers,
have
Post by Gregory Lancasterthe user ID copied over into a sep database? That is actually what I am
trying to figure out haha. Id like to have the user->ID copied into a
separate database row *(or create a new table with the user-ID as the
table
Post by Gregory Lancastername)* after registration. If I could figure that out then I imagine the
rest would fall into place for me. The WP loop is something I am still
learning, so I really appreciate the reference information *Nicholas. *
*J.D* - Is that what you meant? Did I understand your question correctly?
if current_user->ID if exists fetch array($result) echo $row[1] etc...
Not exactly what I mean. My question was why are you copying the user_ID
over at that time - but that may not really be important.
If you need to add some information do the database when a user registers,
then you wan to use the user_register action hook as Nicholas said.
http://codex.wordpress.org/Plugin_API/Action_Reference/user_register
But in your function hooked to that hook, you do *not* want to use the ID
of the current user. You need to use the ID of the user that has just
registered, which will be passed as the first parameter to your hooked
function, as shown in the examples there.
Back to my question, though, I'm not sure why you feel you need to do this
at the time the user registers. I assume that it has something to do with
the date/time oriented aspect of the data that you want to store? I.e., I
guess you have some entries that need to go in at that time so they will be
dated properly? But you are going to have to do this differently for
registered users...
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers