[PHP] What is wrong with these Codes!!!!???

2004-01-20 Thread Radwan Aladdin



Hello..

I made these three PHP files.. but I don't know 
where is the problem

Login.php - This will grab the 
UserName, Password and Serial fields by GET then compare them with the one in 
the database (After MD5 them)

Activate.php -- For the admin.. he can 
activate users account by entering the UserName in a filed inside "Activate.htm" 
and then UPDATE a value in the database to ACTIVATED

Deactivate -- This will deactivate the 
account.. the same as the upper one..

Now.. The Login.php page is saying : 
Parse error: parse error in 
c:\apache\htdocs\user\login.php on line 
20
The Activate.php page is saying :

Warning: Supplied argument is not a valid MySQL-Link resource in 
c:\apache\htdocs\admin\activate.php on line 31

The Deactivate.php is saying the same as the 
Activate.php error.

So I don't know where is the problem!!! everything 
is okay.. And there is no errors in the scripts.. so can you please take a look 
at them..maybe there is some falts..

I attached theTHREE PHP files with the TWO 
HTM files for the activation (POST the UserName for the Activation and 
Deactivation)

Also with the .sql file of the 
database


Waiting your help please..
Regards..

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What is wrong with these Codes!!!!???

2004-01-20 Thread Stuart
Radwan Aladdin wrote:
I made these three PHP files.. but I don't know where is the problem
Now that's a lie isn't it. Nearly all PHP errors/warnings/notices 
display the script filename and line number where the problem was 
encountered. If you can't figure out where the problem is from that you 
might as well pack up and go home now.

Now.. The Login.php page is saying :

*Parse error*: parse error in *c:\apache\htdocs\user\login.php* on line *20*
**
This could mean one of many things. Check that line for any typos. If 
you don't find any check the line(s) that precede it.

The Activate.php page is saying :

*Warning*: Supplied argument is not a valid MySQL-Link resource in 
*c:\apache\htdocs\admin\activate.php* on line *31*
 
The Deactivate.php is saying the same as the Activate.php error.
This error means your SQL query failed. You should be checking the that 
the result from mysql_query !== false (note the 2 = signs). Check your 
SQL and fix it. If you can't see a problem try running the query from 
the mysql command line.

So I don't know where is the problem!!! everything is okay.. And there 
is no errors in the scripts.. so can you please take a look at 
them..maybe there is some falts..
Hmm. There clearly are errors in the scripts or PHP would not be 
complaining about them.

I attached the THREE PHP files with the TWO HTM files for the activation 
(POST the UserName for the Activation and Deactivation)
 
Also with the .sql file of the database
No you didn't... which is actually a good thing. Feel free to include 
snippets of code, ideally 3-4 lines before and after the line specified 
in the error message, but I (and I'm sure many others) on this list 
would prefer it if you didn't send attachments - I get enough crap in my 
mailbox as it is.

--
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php