SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Fluffy Kitten Programmer~ Elledan's Avatar
    Join Date
    Jun 2000
    Location
    Netherlands
    Posts
    1,356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I followed the tutorial at DevShed.com ("Building an E-Commerce site") and downloaded the scripts, but now I discovered that those scripts are one huge mess. For example this part, in the /templates/header.php file:

    <tr>
    <td class=h1><? pv($DOC_TITLE) ?></td>
    <td align=right class=normal>
    <? if (is_logged_in()) { ?>
    <? p($SESSION["user"]["firstname"] . " " . $SESSION["user"]["lastname"]) ?>
    | <a class=normal href="<?=$CFG->wwwroot?>/logout.php">Logout</a>
    <? } else { ?>
    <a class=normal href="<?=$CFG->wwwroot?>/login.php">Login</a>
    | <a class=normal href="<?=$CFG->wwwroot?>/users/signup.php">Signup</a>
    <? } ?>
    </td>
    </tr>

    ----

    The functions pv() and is_logged_in() are both no standard PHP functions and therefore undefined.

    I replaced the 'pv($DOC_TITLE)' with 'echo($DOC_TITLE);' and it works fine now, but what can I use instead of 'is_logged_in()' ?
    www.nyanko.ws - My web-, software- and game development company.
    www.mayaposch.com - My personal site and blog.

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Myabe just a wild shot in the dark

    if ($SESSION["user"]["firstname"] != "")


    One NOTe most of these scripts you wind in tutorials aren't meant to be used exactly as seen in the tutorial but are supposed to teach you fundamentals which will allow you to create your own scripts.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    Fluffy Kitten Programmer~ Elledan's Avatar
    Join Date
    Jun 2000
    Location
    Netherlands
    Posts
    1,356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Those scripts were actually meant to work right out of the zip-file (after setting the right database name, username and password), but clearly that wasn't possible...

    Thanks for your help, Freddy
    www.nyanko.ws - My web-, software- and game development company.
    www.mayaposch.com - My personal site and blog.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •