Skip to content
Permalink
aba75c4a62
Switch branches/tags

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?
Go to file
 
 
Cannot retrieve contributors at this time
32 lines (24 sloc) 1004 Bytes
<!-- 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;
?>