Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
UConnJobSearch/getProfileData.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
32 lines (24 sloc)
1004 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Authored by Iu-Wei Sze --> | |
<?php | |
if(session_status() == PHP_SESSION_NONE) | |
session_start(); | |
$conn = mysqli_connect("localhost", "root", "", "databasesproject") or die(mysql_error()); //-- This might be an easier way to | |
//-- connect to the database if you want to use it; it's also not deprecated, so it shouldn't give the same warnings | |
//$conn = mysql_connect("localhost","root",""); | |
//$tbl_name="user"; | |
//mysql_select_db("databasesproject",$conn)or die("cannot select DB"); | |
$UName = $_SESSION['myusername']; | |
$sql= "SELECT * FROM resume WHERE UName= '" . $UName . "'"; | |
$result = mysqli_query($conn, $sql); | |
echo $UName . "<br>"; | |
$row = mysqli_fetch_array($result); | |
unset($row['RFile']); | |
for($x = 0; $x < 5; $x++){ | |
unset($row[$x]); | |
} | |
//echo "Something"; | |
echo "<pre>"; //-- Now, an array from print_r will be in human readable format | |
print_r($row); //-- Check to make sure our query is right, as this'll go into $_SESSION['fu'] | |
echo "</pre>"; | |
$_SESSION['fu'] = $row; | |
?> |