vjwilson 21 Newbie Poster

I think that if you are using a WHERE clause to find an existing row in a table to change a value, you should be using UPDATE instead of INSERT INTO. (You also have to use the syntax "SET column=value"

Something like:

$loginid = mysql_query("UPDATE userinformation SET login_id='".$randomkey."' WHERE `username` = '".$username."'") or die(mysql_error());

Double-check this in the MySQL manual for your version of MySQL, since I am hardly an expert.

vjwilson 21 Newbie Poster

ShawnCPlus is right about the missing elements in the snippet.

You will need to include the jQuery library in your page. See this article for different ways to do that:

http://www.ajaxprojects.com/ajax/tutorialdetails.php?itemid=609

To learn more about jQuery itself, the best place to start is the project site:

jquery.com

vjwilson 21 Newbie Poster

I think PHP is a good intro to server-side programming. (Javascript is useful, but since it's client-side only, it can't handle things like form submission or interacting with a database.)

I started learning PHP on my own about the same time I had to learn some ASP/ASP.NET for my job, and PHP is definitely easier to learn on your own.

I started with a book, "Build Your Own Database Driven Website Using PHP and MySQL" by Kevin Yank. It was very good for a beginning, although the cheesy humor may not be for everyone's taste. I've been working with PHP for over a year now and am currently reading "PHP and MySQL Web Development" by Luke Welling and Laura Thompson (Addison-Wesley). It's well-written, but more dense. Have a look at both books to see if either of their styles suit the way you learn.

w3schools.com has some good online tutorials and a reference guide to PHP (among other languages) that's more streamlined than the official docs at php.net

Good luck.