Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Links from MySQL entries
Old 05-24-2005, 07:49 AM Links from MySQL entries
Average Talker

Posts: 15
Location: New Jersey
Trades: 0
Hi everyone,
I created a registration form that people fill out and the information is stored in a MySQL Database. along with there registereed info a random number is stored int he database as a 'randnum'. A Confirmation email is then sent to them displaying there information and providing an UPDATE INFO link.
My question is whats the best way to make this link?
What I did so far was create a query to find the last entry id and then +1 to that number and then make a link such as http://www.site.com/updatepage.php?i...andnum=5324653
where randum is the random number entered with there data. The update form page needs both of these variables to return an entry for updating. This method seems very complicated and I am afraid that if 2 people register at the same time they could get the wrong id number. is there a better way? Any help is appreciated.

Thanks
Billy
wbarrett26 is offline
Reply With Quote
View Public Profile Visit wbarrett26's homepage!
 
 
Register now for full access!
Old 05-24-2005, 08:04 AM
celticbrue's Avatar
Extreme Talker

Posts: 175
Location: Wiltshire, England
Trades: 0
Hi,

I am not aware of a less complicated way to do this (but there are people here who are more proficient than I, so some-one might).

In order to get around the potential problem of people getting the wrong id number, I would structure things in this order: -

New user fills out form and submits info, including e-mail address

INSERT info to database

then

SELECT this data from the database using a WHERE email='$email' in the query string to make sure you get the correct entry

then

MAIL it to the new user with whatever parameters are required in the link

This might be even more long winded than what you are already doing, but should overcome any potential for the wrong id to be delivered.

Regards
Ian
__________________
Found this useful? - HIT MY TALKUPATION!


Please login or register to view this content. Registration is FREE
celticbrue is offline
Reply With Quote
View Public Profile
 
Old 05-25-2005, 10:24 AM
Uche's Avatar
Extreme Talker

Posts: 174
Location: Nigeria/Lagos
Trades: 0
Thats a good idea there
__________________
Life is just lyke a school where everybody goes to learn one or two thing. the more u school, the more u learn more about school..The more we live our lifes.. the more we learn more about life.

Please login or register to view this content. Registration is FREE
Uche is offline
Reply With Quote
View Public Profile Visit Uche's homepage!
 
Reply     « Reply to Links from MySQL entries
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.32264 seconds with 12 queries