Mysql / PHP用户可自定义的背景?

时间:2013-11-24 20:47:57

标签: php

我是堆叠溢出的新手,让我这样说:这是我最喜欢的网站。 无论如何,这是我的问题。我知道这将与将图片插入mysql数据库有关,但在任何地方,这都是我的问题。我的网站上有登录/注册系统。我可以让用户为他们的帐户编辑网站的背景图片吗? (比如推特)。

我在header.php中设置的Som变量

    include ( 'mysql_connectinc.php' );
include ( 'functions.php');
function sec_session_start() {
            $session_name = 'username'; // Set a custom session name
            $secure = false; // Set to true if using https.
            $httponly = true; // This stops javascript being able to access the session id. 

            ini_set('session.use_only_cookies', 1); // Forces sessions to only use cookies. 
            $cookieParams = session_get_cookie_params(); // Gets current cookies params.
            session_set_cookie_params($cookieParams["lifetime"], $cookieParams["path"], $cookieParams["domain"], $secure, $httponly); 
            session_name($username); // Sets the session name to the one set above.
            session_start(); // Start the php session
            session_regenerate_id(true); // regenerated the session, delete the old one.     
        }
        $user = $_SESSION['username'];
        $_SESSION['id'] = 'profile'; 

感谢。 (你可以解释一下如何让用户能够附上图片,将其存储到mysql数据库中,从数据库中检索图片,然后将其设置为背景图片吗?谢谢。

0 个答案:

没有答案