Jump to content

T Horton

Members
  • Posts

    52
  • Joined

  • Last visited

    Never

Posts posted by T Horton

  1. Hi

     

    Not sure why you are putting the "SELECT" statement at the beginning, but in order to update any records where the product ID is between 100 and 120, you would need to use the following SQL:

     

    <?php
        $sql = mysql_query("UPDATE contact_form_BACKUP SET Lang='1' WHERE ProductID BETWEEN '100' AND '120'");
    ?>
    

     

    Hope this helps.

     

     

     

     

    Tom

  2. Hi

     

    I think something like this would do it:

     

    <select name="ID">
                <?php
                     $query = "QUERY HERE";
                     $rs = mysql_query($query);
                     while ($row = mysql_fetch_array($rs))
                     {
                         echo "<option value='$row[0]'>$row[1]</option>";
                     }
                ?>
    </select>
    

     

    Hope this helps

     

     

     

     

    Tom

  3. Hi

     

    Just worked on your XHTML Strict suggestion and all is up and running now! :)

     

    Got it done quicker than I expected to be honest!

     

    I will work on that Greek word idea too. Good idea! :)

     

    Thanks again for all your help on this. Really appreciated.

  4. It is basically because you have probably refreshed the submitted page so many times it is storing the information from before.

     

    Normally I find that when I get that message, going back to the first page, or closing the browser and starting on the homepage or first page again, that will disappear, as any sessions used previously will be lost.

     

    Hope this helps.

  5. Hi there

     

    The problem is on this line:

     

    WHERE username =$_SESSION['username']");
    

     

    What you will need to do is to declare the username string as a variable elsewhere, so your code would look something like this:

     

    <?php
    if(isset($_POST['name'])&&isset($_SESSION[username]))
    {
    $con = mysql_connect("localhost","root","");
    if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }
    
    mysql_select_db("myst", $con);
    
    $result = mysql_query("SELECT * FROM answers
    WHERE level='1'");
    while($row = mysql_fetch_array($result))
      {
      $a=$row['answer'];
      $b=$_POST['name'];
      if($a==$b)
    {
    $username = $_SESSION['username'];
    mysql_query("UPDATE users SET level = '2'
    WHERE username ='$username'");
    header("Location:http://localhost/myst/welcome1.php");
    exit;
    }
    
    else
    {
    header("Location:http://localhost/myst/welcome.php");
    exit;
    }
    }
    }
    ?>
    <html>
    <body>
    <form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
    Name: <input type="text" name="name" />
    <input type="submit" value="Submit" />
    </form>
    </body>
    </html>
    

     

    Hopefully this should work for you.

     

     

     

    Tom

  6. Right, I have changed it all again. Just basic now. lol

     

    My original thoughts were that if I used the colours from the Greek flag (the white and the blue) I thought that would be OK, but obviously it hasn't worked this time.

     

    If it still doesn't look right after these changes, what would you recommend I do?

     

    Thanks for your help so far!

  7. Cheers for your comments.

     

    Capitalizing HTML tags is a bad habit of mine. lol. I do it all the time, but I will get this updated on the website.

     

    I will have a think about the Greek text on the right. I thought that having something like that on there would make it a bit more authentic really.  :)

     

    Thanks for your comments on the land too. Lesvos is in the north Aegean sea and is very close to Turkey. It is a lovely place. Have been going there for ages! A fair old distance from Athens! :)

     

    Thanks again for your comments.

     

     

     

    Tom

  8. Hi

     

    Thanks for your comments.

     

    Been having a long hard think about what I can do to improve the ease of use on the site and have come up with something. If you visit the site again, you should see what I have done. I have just basically tried to make it a bit easier for people.

     

    Would really appreciate your thoughts on this.

     

    Cheers

     

     

     

     

    Tom

  9. Hello All

     

    Thanks for all your comments so far. I have taken them all on board and am obviously doing what I can to improve the beta site.

     

    TheFilmGod: I would really appreciate it if you could test out the new version of the system on there. I have completely started from scratch on this, and would obviously appreciate your comments to see if what I have done has fixed your problems you were having.

     

    If anyone else has any ideas, suggestions etc. that I could include on the beta version then please do let me know.

     

    All ideas are welcome.

     

    Thanks again for all your comments.

     

    Best Regards

     

     

     

     

    Tom

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