![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
There is an error on this line what is it? if($row['password'] !=$userpass $rows == 0on this line there is an error what is it?
PHP Code:
|
|||
|
#2
|
|||
|
|||
Re: There is an error on this line what is it? if($row['password'] !=$userpass $rows == 0PHP Code:
I hope my answer with help you with this, because I'm going to assume what you are trying to do. If what I say doesn't help you, be sure to reply and I'll see what I can do more specifically. With an if statement there are two things you can do, depending on whether or not you wish to execute multiple commands in PHP. In your statement there you set $rows = 0 inside of the if statement, and also leave the if statement open (causing the error in the line because no code is actually being executed and the script faults). Here is one thing you can do to fix this (assuming this is what you want to do). PHP Code:
The {} brackets contain what code will be executed upon the if statement returning 'true'. You could also do this: PHP Code:
It depends on how you like to format your script, personally I like to get in the habit of using {} because when you do multiple functions under one if statement you can run into numerous problems you will have to debug (a waste of your time). I hope this helps! |
|
#3
|
|||
|
|||
Re: There is an error on this line what is it? if($row['password'] !=$userpass $rows == 0ok and there is another error here on this line
PHP Code:
|
|
#4
|
|||
|
|||
Re: There is an error on this line what is it? if($row['password'] !=$userpass $rows == 0PHP Code:
Ok, with this just remove those quotations, that would be the only problem I see. It should be: PHP Code:
Just a quick pointer: When you are dealing with inserting values into a MySQL database, the first section (aka 'user') should be raw and undefined. This means that all you list is the raw table structure that you wish to supply values for in a new row of the SQL table. When making the first section you just need to say the row name, no quotes, no brackets, nothing. Just as shown above PHP Code:
Your final (hopefully working) code should look like (assuming that all variables are correctly set, in which case SQL would return another error): PHP Code:
For future references, and so GIDForums can help you better, it is good practice to post the error you are getting from the code (including personal debugging errors), and the line of code in which the error took place. That helps us so we can help you better |
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CD Burner Help - Power Calibration Error.... | JonBoy420 | Computer Hardware Forum | 111 | 19-Feb-2009 04:54 |
| burning problems PLEASE PLEASE HELP | kelticeire | Computer Hardware Forum | 4 | 01-Dec-2006 16:39 |
| CD burner wont burn!! | robertli55 | Computer Hardware Forum | 1 | 18-Jun-2004 11:53 |
| Yet another CD burner problem: Lite-On LSC-24082K | Erwin | Computer Hardware Forum | 1 | 22-May-2004 12:28 |
| CD Buring Failed | skanth2000 | Computer Hardware Forum | 1 | 15-Nov-2003 04:52 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The