small script error

Started on the old forum in August 2009 · view the original in the archive · old links redirect here

4 replies · 384 views · started 17 years ago · 1 min read

4 participants
MatrixIS Developer · 53 posts #1

Can someone please tell me whats wrong with this , would really appreciate it;(

///////////////////////////////////Registration Add User $check = mysql_query("SELECT from xtwf_users where uname='".$user."'"); else if($action=="newuser") { if($pass=='') { echo "Error! You have typed no password"; }else if ($user=="$check") { echo "The username is taken"; }else{

mysql_query("INSERT INTO xtwf_users SET id='' , uname='".$user."' , password='".$pass."' , site='".$site."' , email='".$email."' , name='".$name."'"); echo "You have successfully signed up"; }

}else{

MatrixIS Developer · 53 posts #3

thats the last else which leads to the main page , the syntax error says this line

else if($action=="newuser")

but i think its this line$check = mysql_query("SELECT from xtwf_users where uname='".$user."'");

something else Fellow · 2,296 posts #4

what does the error say ? ..... unexpected else ....... or expecting }? if so change it to }else if($action=="newuser")

nclemale36 Lead · 537 posts #5

have a look at the function above that. i usually get same error when adding new stuff and its the stuff i added that is above that is the conflict.

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close