ok i am trying to make a CMS/Forum setup, but i have a few questions.
1) How do i setup the form, so that if they mess up, and get redirected back to it because, say they typed in an inuse username, how do i keep all the info they already posted in the other field so they dont have to retype anything except the username.
2) how do i handle the mysql query of a form that has optional feilds, because if i make a query like this
mysql_query("insert into users (username, email_address, password,
first_name, last_name, info, signup_date) values ('$username','$email_address',
'$password','$first_name','$last_name','$info', now())");
and the first_name, last_name, and info are all optional, the query would mess up since they would not be defined. so what kind of code would i need to make it handle them maybe being blank?
i know ill think of more questions lol, ill just keep adding them here.
thx in advance