0

hi there i am developing a website, where users can register to become members however, i have to write operations how the system will add a user, I have been told to do it in psuedo code, but i dnt know psuedo code. is there any other way this can be done,

the ad user fields are Forname, Surname, Email, Password

I would appreciate if someone could show me how to do this so i can do the rest

3
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by VanPetrol
0

Pseudo code (as far I know) is basically like this:

If the user did not enter his name
  Warn user by message box
  Focus on name textbox
  exit the method
If the user did not enter a password
  Warn user by message box
  Focus on password textbox
  exit the method
 
Try to connect to database
If connection to database fails
  Show error in messabox
  exit the method

I used to write things like this...paste it into my code editor, once I'm happy, and then use it at comments with the actuall valid code following each line.

0

Pseudo code (as far I know) is basically like this:

If the user did not enter his name
  Warn user by message box
  Focus on name textbox
  exit the method
If the user did not enter a password
  Warn user by message box
  Focus on password textbox
  exit the method
 
Try to connect to database
If connection to database fails
  Show error in messabox
  exit the method

I used to write things like this...paste it into my code editor, once I'm happy, and then use it at comments with the actuall valid code following each line.

in code...

if(empty($_POST['username'])){
[INDENT]echo "Sorry, you need to enter a username.";
//do focus here
exit();
[/INDENT]if(empty($_POST['password'])){
[INDENT]echo "You need to enter a password.";
// do focus here
exit();
[/INDENT]if(mysql_connect('shizz','nizz','wizz')){
[INDENT]"Success!";
[/INDENT]}else{
[INDENT]die("sorry, no connection!");
[/INDENT]}

something like that really...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.