didn't work

i even had the page echo the query....
I got error when trying what you said:
"
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Documents and Settings\Noamkrief\Desktop\logbookphp\mainquery.ph p on line 20
Warning: extract(): First argument should be an array in C:\Documents and Settings\Noamkrief\Desktop\logbookphp\mainquery.ph p on line 21
Notice: Undefined variable: TOTALTIME in C:\Documents and Settings\Noamkrief\Desktop\logbookphp\mainquery.ph p on line 22
Your total night time is: hours.
SELECT Sum(DAY+NIGHT) AS TOTALTIME FROM MODEL LEFT JOIN MAIN ON MODEL.MODEL_ID = MAIN.MODEL_ID WHERE MAIN.TYPE='CFI' ;DROP TABLE MAIN;# MAIN.PER_ID='542458257'
"
My MAIN table is still there... na di didn't even set priviliges yet! Username is root and password is empty.
But i see what you are saying.
The user would copy the form code locally, change the connection from localhost to the domain in which the SQL server is at correct?
Then the hacker would change the values.
But how would the hacker retreive the mysql username and password to connect? The username and password are stored as variables and are retreived from a page that's not in the wwwroot folder.
Also, this wouldn't work if the user tries to connect to the MYSQL server via the doamin name since th port to connect to mysql is closed. Only thing that is open is port 80...
Am i making sense?
Check the syntax, i want this to work:
SELECT Sum(DAY+NIGHT) AS TOTALTIME FROM MODEL LEFT JOIN MAIN ON MODEL.MODEL_ID = MAIN.MODEL_ID WHERE MAIN.TYPE='CFI' ;DROP TABLE MAIN;# MAIN.PER_ID='542458257'
thanks again
Noam