|
-
Jun 10th, 2007, 11:23 AM
#1
Thread Starter
Addicted Member
PHP index help
Hello,
I really need help with the index page. The following instructions that I want to give PHP will explain what I want it to do:
1. Start a Session.
2. Write HTML code to display the contents of this page. (don't use the echo("") command)
3. Login to the MySQL server.
4. Select the database database1
5. Check the table usernames for the username registered/entered.
6. If (s)he wants to register it, and the username doesn't exist, insert it into the table along with his/her name and write, "You are now registered." If it does, write, "That username has already been registered."
7. But, if (s)he is trying to log in, and the username exists, write a link to page2.html with the title "Continue" and set the value of the session variable, "username." If it doesn't, write "Username doesn't exist."
I tried telling PHP to create the "username" session variable in the HEAD of the document and make it a blank variable, but I got the following error message:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_VARIABLE or '$' in /home/content/r/a/n/ranazburr/html/index.php on line 26
Should I write the code in the HEAD and redirect the browser to certain pages?
Help would be appreciated
moonman239
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|