Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Auto insert data from another table

Quote Reply
Auto insert data from another table
How does links auto insert the contact name and email address from the glinks_Users table when "Add a Link" is selected?
I added "City" "State" "zip" and "Phone" fields to the glinks_Users table. I want these values to auto fill when users adds another link.
Quote Reply
Re: [Sies] Auto insert data from another table In reply to
You would need a little plugin, that would hook in on add_link (POST), and then update their profile, based on the values they passed in from the add.cgi form. Afraid I don't really have time to do this for you at the moment though, as I'm a bit overworked ATM.

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Auto insert data from another table In reply to
 
I didn't want a user to have to re-type their address everytime they added a listing. Since the address fields are already in the users table, I just the values in the user table to auto fill into add form. Just like the email does.
Quote Reply
Re: [Sies] Auto insert data from another table In reply to
Ah, I mis-understood you.

Just use:

<%if FieldName%>value="<%FieldName%>"<%elsif user.FieldName%>value="<%user.FieldName%>"<%endif%>

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates