Results 1 to 12 of 12

Thread: PHP Help

  1. #1
    knaggsy
    Guest
    PHP Help
    Hi everyone I am trying to learn php but I am really stuck at the moment with the basics does anyone know of any really good tutorials for php or any websites that have example scripts for me to use or at least base my php pages on?

    Any help you could give me would be really appreciated.

    Cheers

    Tim

  2. #2
    PHP Help

    Member Since
    Jul 25, 2004
    Location
    Gaithersburg, MD
    Posts
    389
    Specs:
    Mac Pro 2.6ghz Quad Xeon, 23" Cinema
    Best bet is buy a book from amazon.

  3. #3

  4. #4
    iSheep
    Guest
    I recommend:
    PHP for the World Wide Web (Visual QuickStart Guides) ~Larry Ullman (Peachpit Press)

    Wonderful book - tought me a lot! It also has a Visual Pro Guide to follow it, and a MySQL with PHP book if you want that as well. Highly recommended.

  5. #5
    knaggsy
    Guest
    Thanks guys for all of your help I really appreciate it I will be wading my way through those links and hopefully will make sense of it eventually lol Thanks again

    cheers

    Tim

  6. #6
    design2
    Guest
    php help.
    i have setup a weblog page where normal users can only view the logs
    however if you are successfully logged in i want an EDIT link to appear next to each log and when you click that link it uses that ID to go to my weblog edit page. i thought i had it all covered, but i think i've missed something small.

    here's the JUICY code..

    <?php
    if(isset($_SESSION['MM_Username']) && isset($_SESSION['MM_UserAuthorization'])) {
    echo '<a href="weblog_edit.php?id=' . $row_rs_weblog['id'] . '">EDIT</a> ';
    }
    ?>

  7. #7
    PHP Help
    Murlyn's Avatar
    Member Since
    Jun 11, 2003
    Location
    Mount Vernon, WA
    Posts
    4,915
    Specs:
    MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
    What are you missing? that's only a tiny part of the code and that looks fine from what I can see.. it's not going to throw any errors at least..

  8. #8
    design2
    Guest
    this is pretty much the weblog page.
    but the only part of my php that isnt working is the "edit" which is not appearing next to the logs? my navbar includes work, my database logs work, etc


    <?php require_once('Connections/liam_php.php'); ?>
    <?php
    mysql_select_db($database_liam_php, $liam_php);
    $query_rs_weblog = "SELECT * FROM weblog ORDER BY `date` DESC";
    $rs_weblog = mysql_query($query_rs_weblog, $liam_php) or die(mysql_error());
    $row_rs_weblog = mysql_fetch_assoc($rs_weblog);
    $totalRows_rs_weblog = mysql_num_rows($rs_weblog);
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Ambury Park Centre for Riding Therapy &gt; News</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="CSS/ambury.css" rel="stylesheet" type="text/css">
    </head>

    <body>

  9. #9
    design2
    Guest
    <?php do { ?>
    <p><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"> <br>
    <?php echo $row_rs_weblog['date']; ?> - <?php echo $row_rs_weblog['name']; ?><br>
    <?php echo $row_rs_weblog['content']; ?>
    <?php
    if(isset($_SESSION['MM_Username']) && isset($_SESSION['MM_UserAuthorization'])) {
    echo '<a href="weblog_edit.php?id=' . $row_rs_weblog['id'] . '">EDIT</a> ';
    }
    ?>
    </font>
    <?php } while ($row_rs_weblog = mysql_fetch_assoc($rs_weblog)); ?>
    <p></p>
    <p><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><a href="menu.php"><font size="-2">go
    to admin menu</font></a></font></p>
    <p></p>
    </div>
    </td>
    <td width="24%" align="right" valign="top">
    <?php include("inc/navbar.php"); ?></td>
    </tr>

    </table>

    </body>
    </html>
    <?php
    mysql_free_result($rs_weblog);
    ?>

  10. #10
    PHP Help
    Murlyn's Avatar
    Member Since
    Jun 11, 2003
    Location
    Mount Vernon, WA
    Posts
    4,915
    Specs:
    MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
    Try putting this above this line like so:

    print_r($_SESSION); die;
    if(isset($_SESSION['MM_Username']) && isset($_SESSION['MM_UserAuthorization'])) {

    And make sure that those two session variables are even being set.

  11. #11
    design2
    Guest
    actually that didn't work.

    instead everything dissapears..
    how do i make sure that those two session variables are even being set?
    i actually don't know much, i let dreamweaver do it all, and get help
    from a php friend.

    any more suggestions?

  12. #12
    PHP Help
    Murlyn's Avatar
    Member Since
    Jun 11, 2003
    Location
    Mount Vernon, WA
    Posts
    4,915
    Specs:
    MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
    If that didn't work, then that means you do not even have a session going. You'll need to start that session.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PHP with OS X
    By Yodda_Hunter in forum OS X - Apps and Games
    Replies: 4
    Last Post: 12-30-2013, 10:39 AM
  2. PHP 4.3.11 to PHP 5
    By prplxd in forum OS X - Development and Darwin
    Replies: 1
    Last Post: 12-04-2005, 10:57 AM
  3. PHP Help
    By JoeyRamoneLives in forum Web Design and Hosting
    Replies: 2
    Last Post: 04-26-2005, 10:01 PM
  4. Setting up PHP and PHP Nuke
    By EvoMac in forum Web Design and Hosting
    Replies: 2
    Last Post: 02-18-2005, 12:38 PM
  5. Php
    By vtupser in forum Web Design and Hosting
    Replies: 5
    Last Post: 02-16-2005, 03:36 AM

Posting Permissions

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