SitePoint Sponsor

User Tag List

Page 3 of 3 FirstFirst 123
Results 51 to 60 of 60
  1. #51
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    4,813
    Mentioned
    141 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jay93 View Post
    you mean without the var_dump and die statements??
    I'd keep those in if you can, if you can't... then yes, go ahead and remove them.
    Be sure to congratulate xMog on earning April's Member of the Month
    Go ahead and blame me, I still won't lose any sleep over it
    My Blog | My Technical Notes

  2. #52
    SitePoint Zealot
    Join Date
    Feb 2013
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, i get this for localhost/index.php
    array (size=0)
    empty
    SESSION ID IS EMPTY

    and the normal displays for login.php, pass.ph, and reset.php, and finally when i entered passwords on reset.php (with the var-dumps) i got this

    array (size=1)
    'id' => null
    SESSION ID IS EMPTY

  3. #53
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    4,813
    Mentioned
    141 Post(s)
    Tagged
    0 Thread(s)
    can you show me your current reset.php file? I'm assuming it has a require("../includes/config.php"); in it and that is above the session usage.
    Be sure to congratulate xMog on earning April's Member of the Month
    Go ahead and blame me, I still won't lose any sleep over it
    My Blog | My Technical Notes

  4. #54
    SitePoint Zealot
    Join Date
    Feb 2013
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, i copied some of the contents of config.php as follows on top....

    Code:
     <?php
      
            // display errors, warnings, and notices
        ini_set("display_errors", true);
        error_reporting(E_ALL);
      // configuration
        require("../includes/constants.php"); 
        require("../includes/functions.php");
     
    session_start(); 
        // if form was submitted
       if ($_SERVER["REQUEST_METHOD"] == "POST")
        {
        
             if (empty($_POST["password"]))
            apologize("Please enter password.");
            
            
            if ($_POST["password"] != $_POST["confirmation"])
            apologize("Passwords do not match!");
            
            
           $result = query("UPDATE users SET hash = ? WHERE id = ?", crypt($_POST["password"]), $_SESSION["resetmemberid"]);
             unset($_SESSION["resetmemberid"]); 
    
            if($result===false)
            {
            apologize("Could not register. Please retry.");
            }
            else
              {
              
              $rows = query("SELECT id FROM users WHERE hash = ?", crypt($_POST["password"]));
              $id = $rows[0]["id"];
              
              // remember that user's now logged in by storing user's ID in session
              $_SESSION["id"]= $rows[0]["id"];
              // redirect to portfolio
              redirect("index.php");
              
                // require authentication for most pages
        if (!preg_match("{(?:login|logout|register)\.php$}", $_SERVER["PHP_SELF"]))
        {
            if (empty($_SESSION["id"]))
            {
                die("SESSION ID IS EMPTY");
                redirect("login.php");
            }
        }  
            }
            
           }
               
        
        else
        {
            // else render form
            render("reset_form.php", ["title" => "Register"]);
        }
        
    ?>

  5. #55
    SitePoint Zealot
    Join Date
    Feb 2013
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello! you there?? i screwed up in my html validation from http://validator.w3.org/, it says
    Line 46, Column 6: Stray end tag div.
    </div>
    Line 46, Column 6: Stray end tag div.
    </div>
    Line 47, Column 5: Start tag div seen in table.
    <div>
    Line 47, Column 5: Cannot recover after last error. Any further errors will be ignored.
    <div>
    can you please take a look??


    Code:
    <!DOCTYPE html>
    
    <html>
    
        <head>
    
            <link href="css/bootstrap.css" rel="stylesheet"/>
            <link href="css/bootstrap-responsive.css" rel="stylesheet"/>
            <link href="css/styles.css" rel="stylesheet"/>
    
                        <title>C$50 Finance: Portfolio</title>
            
            <script src="js/jquery-1.8.2.js"></script>
            <script src="js/bootstrap.js"></script>
            <script src="js/scripts.js"></script>
    
        </head>
    
        <body>
    
            <div class="container-fluid">
    
                <div id="top">
                    <a href="/"><img alt="C$50 Finance" src="img/logo.gif"/></a>
                </div>
    
                <div id="middle">
    
    <div>
    
    <table class="table table-striped">
    
        <thead>
        <tr>
                <th>Symbol</th>
                <th>Name</th>
                <th>Shares</th>
                <th>Price</th>
                <th>TOTAL</th>
            </tr>    </thead>
    
        <tbody>
    </tbody>
    
    </div>
    <div>                                                ////////////////////////////////////////////////////////////////////lLINE 46
        <a href="quote.php">Quote</a>        //////////////////////////////////////////LINE 47
        
        <a href="buy.php">Buy</a>
        
        <a href="sell.php">Sell</a>
        
        <a href="history.php">History</a>
        
        <a href="logout.php">Log Out</a>  
    </div>
    
                </div>
    
                <div id="bottom">
                    Copyright &#169; John Harvard
                </div>
    
            </div>
    
        </body>
    
    </html>

  6. #56
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    4,813
    Mentioned
    141 Post(s)
    Tagged
    0 Thread(s)
    You are missing your closing table tag (right after the closing </tbody> tag.
    Be sure to congratulate xMog on earning April's Member of the Month
    Go ahead and blame me, I still won't lose any sleep over it
    My Blog | My Technical Notes

  7. #57
    SitePoint Zealot
    Join Date
    Feb 2013
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks budd, all green... i was wondering if there are any websites out there, that display their php codes, or even java or html so that people can like learn from them, and build something similar??

  8. #58
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    4,813
    Mentioned
    141 Post(s)
    Tagged
    0 Thread(s)
    You can always host it on SourceForge, GIT, CodePlex, and other repo related sites.
    Be sure to congratulate xMog on earning April's Member of the Month
    Go ahead and blame me, I still won't lose any sleep over it
    My Blog | My Technical Notes

  9. #59
    SitePoint Zealot
    Join Date
    Feb 2013
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks, i knew of source forge, and i visited it once, but it looked more like a software website where people shared their softwares, but couldnt find any websites...

  10. #60
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    4,813
    Mentioned
    141 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jay93 View Post
    thanks, i knew of source forge, and i visited it once, but it looked more like a software website where people shared their softwares, but couldnt find any websites...
    Yes, it is primarily used for sharing your code.
    Be sure to congratulate xMog on earning April's Member of the Month
    Go ahead and blame me, I still won't lose any sleep over it
    My Blog | My Technical Notes


Tags for this Thread

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
  •