Jump to content

blira

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Posts posted by blira

  1. Hi all.

     

    Here is my problem:

     

    Page: login.php

    $cookie_data=$user."-".$pass."-".$role;

    if(setcookie ("FLEISCHMANN_ADMIN",$cookie_data, $time+3600)==TRUE)

    ...

    //Note $user, $pass, $role DO have data

     

    Page: logged.php (once the login succeeds)

    $cook = explode("-", $_COOKIE['FLEISCHMANN_ADMIN']);   

    $namecookie = $cook[0];

    $passcookie = $cook[1];

    $rolecookie = $cook[2];

     

    Notes:

    1. All this code is written before HTML (in both pages).

    2. When I open the cookie file, it DOES contain the data I'm trying to explode.

    3. $cook is empty and no cookie data is read.

     

    Thanks for any help

    Bernardo

  2. Hi all. I have a site (PHP/MySQL naturally) and got -recently- this error message:

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'artium_admin'@'localhost' (using password: NO) in /home/artium/public_html/Connections/artium.php on line 6

    Weird thing is yesterday it was ok, but now the Connections/artium.php file throws this error. Permissions and privileges are ok...

    Any ideas? I need to make this site go back online ASAP... any comment will be deeply appreciated!

    TIA
    Bernardo
  3. Here is a file that requires the connection file described above.

    <?php require_once('Connections/connect.php'); ?>

    <?php
    $currentPage = $_SERVER["PHP_SELF"];

    $maxRows_noticias = 10;
    $pageNum_noticias = 0;
    if (isset($_GET['pageNum_noticias'])) {
    $pageNum_noticias = $_GET['pageNum_noticias'];
    }
    $startRow_noticias = $pageNum_noticias * $maxRows_noticias;

    mysql_select_db($database_cirpeduc, $cirpeduc);
    $query_noticias = "SELECT * FROM noticia ORDER BY fecha DESC";
    $query_limit_noticias = sprintf("%s LIMIT %d, %d", $query_noticias, $startRow_noticias, $maxRows_noticias);
    $noticias = mysql_query($query_limit_noticias, $cirpeduc) or die(mysql_error());
    $row_noticias = mysql_fetch_assoc($noticias);

    {etc}

    This is the php file that shows the "No Database Selected" message.
  4. Hi all... first post.

    I have a site (PHP/MySQL) and receive the "No Database Selected". The /Connections/connect.php file includes the following code:

    <?php
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_cirpeduc = "localhost"; $database_cirpeduc = "ciruja_cirpeduc"; $username_cirpeduc = "ciruja_root"; $password_cirpeduc = "root"; $cirpeduc = mysql_pconnect($hostname_cirpeduc, $username_cirpeduc, $password_cirpeduc) or trigger_error(mysql_error(),E_USER_ERROR); ?>

    As far as I understand there must be no blank lines after the "?>" (this file has no such blank lines). Every value is correct (such as localhost, curuja_cirpeduc, and so forth).

    Any ideas?

    TIA
    Bernardo, from Chile.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.