Jump to content

MDCode

Members
  • Posts

    640
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by MDCode

  1. Are you saying that guests can confirm purchase information? If so I would change that immediately.

     

    However, I assume you have a way to add the information into mysql already. If so, you have easy choices:

     

    1. Delete the information when they confirm a purchase

     

    or

     

    2. Use cron jobs

  2. Consider the following URL:

    http://domain.com/file.php?var=firstvar&secondvar=2

     

    Now say that the following is in file.php

    <?php
    
    // Not the most secure by the way.  But will echo "firstvar"
    echo $_GET['var'];
    
    // Still not secure by the way.  But will echo 2
    echo $_GET['secondvar'];
    ?>

     

    By using $_GET you can access anything in the URL. Just make sure you secure it before using in any queries or outputting on any page

  3. I don't see anywhere that you are setting the session differently. It will always be what you set it to be, no matter what. And you are echoing your session outside of your if(isset()) { ($_POST['submit'] does nothing btw). So on every page load of course it's going to display before you click submit

  4. There are only a few things I can think of to even get the URL in JQuery, let alone get data from it. Perhaps you can somehow modify this:

    <!-- Full URL http://domain.com/file.whatever?anyvar=something -->
    
    <script type="text/javascript">
    alert($(location).attr('href'));
    </script>
    

     

    Your second question however makes no sense. I assume you want to access php sessions in your JQuery? In which case it should work just putting in the source code.

     

    <?php
    session_start();
    $_SESSION['uid'] = "23123";
    ?>
    
    <!-- other stuff -->
    
    <script type="text/javascript">
    <?php
    echo "var stuff= '".$_SESSION['uid']. "';";
    ?>
    alert('Err...hi? '+stuff+' ');
    </script>

  5. if($totalsecondsnow > $totalsecondsthen) {
    

     

    Shouldn't that be...

    if($totalsecondsnow > $totalsecondsallowed) {
    

     

    The way you have it now is like saying, if the current time is greater than their last activity, log them off. Although I'm not even sure the way above will still work

  6. You aren't checking if the form is submitted, which is why you are getting undefined variables for username and pwd. You need to first submit the form, then (check if it was submitted) it will work.

×
×
  • 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.