web - Creating Folder using php and user id through php session -


so want make little web app me , family , thing not work session set in verify.php:

$sql_select = 'select id email="'.$_session['name'].'" ';  $result = mysql_query($sql_select); $row = mysql_fetch_array($result);  $id = $row['id']; $_session['id']= $id; header('location: home.php'); exit; 

and make folder , insert , image in upload.php

<?php session_start();  $id = $_session['id'];  var_dump($_session); $gallery = 'gallery'; $dir = $_server['document_root'].'/files/'.$id.'/'.$gallery.'/'; @mkdir($dir, 0777, true); move_uploaded_file(     $_files['file']['tmp_name'],     $dir.$_files['file']['name'] ); 

the image uploading gallery folder not actual users folder , comes out when var_dump $_session

array(3) { ["logged_in"]=> int(1) ["name"]=> null ["id"]=> null } 

but sure session alive.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -