Jump to content

X5HOST

New Members
  • Posts

    7
  • Joined

  • Last visited

X5HOST's Achievements

Newbie

Newbie (1/5)

1

Reputation

  1. Why don't you add the Article ID and the User ID into a specific table within the database; this method would be efficient, and would never expire unless the user could remove recently viewed articles. Seems much more efficient and will probably be more secure... Kind regards, Jason Moore X5HOST.co.uk
  2. Hi Sheraz4Pro, I would seriously consider timezones before you start using them, have a check of the PHP manual and try to understand the difference between timezones, but they can seriously be a very complicated thing to work with, especialy when it comes to what you're trying to do, on the other hand, there might be a simple way of constructing what you're trying to do, it's not impossible, but it's complicated. There might be an open-source PHP timezone kit out there which may come in useful. Kind Regards, Jason Moore
  3. Hi Glenskie, It looks like you're trying to add an 'if' statement whilst declaring a variable, this will return an error (or blank page with errors in the log). I would recommend the following: if ($account == 'c') { $variable = ' <li> <a href="/stats.php">Dashboard</a> </li>'; } else { $variable = ''; } $user = '<script type="text/javascript" src="'.$actual_link.'/js/submenu.js"></script><div class="dropdown"> <a class="account" > <span>'.$username.'</span> </a> <div class="submenu" style="display: none; "> <ul class="root"> '.$variable ; Kind Regards, Jason Moore
  4. Dear users, I'm offering my services to all of whom view this post, I'm a website developer from the United Kingdom, and I've been specialising with website development for 4 years now. Initially, I would be happy to setup client's websites from $80 which would be a custom made theme which would either integrate within my own CMS, or other systems such as WordPress. Alongside that, I'm also happy to code custom websites for anyone wishing to have custom scripts developed for certain purposes, for example, a 'booking system' for a 'taxi service'. You can view my businesses website, to view my price range, services, and portfolio at: http://www.x5host.co.uk If you have any questions, please contact me at info@x5host.co.uk. I'd be more than happy to answer any questions / queries that you may have about websites / the process of development, or just to enquire about possible low prices for your new website. Feel free to also take a look at my newly setup blog to get a greater idea of who I am personally, and how I work with clients. http://www.jason-moore.co.uk. Kind Regards, Jason Moore.
  5. Hi Arunpatal, If you're looking to do something like that then I would highly recommend that you take a read of the PHP manual concerning the 'strtotime' function. This function will allow you to convert the time into a TIMESTAMP, to which you can then convert the TIMESTAMP to an extra 30 minutes by simply typing '+ 30 mins'. Below is an example, along with a link to the PHP manual concerning 'strtotime'. $last_visited_time = strtotime('10:00'); $result = date("H:i", strtotime('+30 minutes', $last_visited_time)); You can read the PHP manual relating to this HERE. Good luck, let us know the outcome. Regards, Jason Moore
  6. Hi mrfdes, I would seriously consider using some kind of 2NF or possibly 3NF within your database, having all of the details within one row is a little in-efficient.
  7. Hi Jane H, It looks like you need a while loop within your code, otherwise it will just be adding 1 point to the defined variable(s). Check the snippet that I have included below for you. if (isset($_POST['submit'])) { $CorrectAns = 0; $WrongAns = 0; $count = 0; while ($count <= 5) { if ($_POST['ans'.$myrow["Q_ID"]] == $myrow["Correct"]) { $CorrectAns ++; } else { $WrongAns ++; } } } $count++; } $NumofQs = $CorrectAns + $WrongAns; $Total = ($CorrectAns / $NumofQs) * 100; echo $Total; }
×
×
  • 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.