Tryag File Manager
Home
-
Turbo Force
Current Path :
/
home
/
cluster1
/
data
/
bu01
/
1121861
/
html
/
old_jlex_versions
/
php
/
Upload File :
New :
File
Dir
/home/cluster1/data/bu01/1121861/html/old_jlex_versions/php/login.php4
<? session_start(); $username = $_POST["username"]; $password = $_POST["password"]; require("db_connection.php4"); mysql_select_db($DATABASE); $query = "SELECT * FROM user WHERE username_0='$username' AND password_0='$password'"; $query_result = mysql_query($query); $num_rows = mysql_num_rows($query_result); if($num_rows == 0) { echo "Username and/or Password is not valid. Please login again."; } else { $row = mysql_fetch_assoc($query_result); $user_id = $row["user_id"]; $_SESSION["user_id"] = $user_id; $in = fopen("../lex/query.xml","r"); $line = ""; while($line = fgets($in)) { $xml .= $line; } header("Content-Type: application/xml"); echo $xml; } ?>