Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Major_Disaster

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Major_Disaster reacted to Jock in Help with PHP sessions   
    //Start the session $session = session_id(); if($session == "") { session_start(); }
     
    That should just be session_start(); on its own. Make sure its at the top of the file as well so that headers haven't been sent.
     

    //Start the session session_start(); if(isset($_SESSION['lastMailed'])) { if($_SESSION['lastMailed'] + 60 < time()) { $response['error']['time'] = 'Whoah, slow down there! Please wait 60 seconds before sending another enquiry'; } }
  2. Like
    Major_Disaster reacted to mealybar in Help with PHP sessions   
    The second line is:
     
    header("Cache-control: private");
     
    and fixes a bug in IE in certain situations on Windows XP.
  3. Like
    Not 100% convinced this will work but try it anyway...
     

    var messageList = $('<ul />'); $.each(response.error, function(index, value) { $('<li/>').html(value).appendTo(messageList); }); $('#message').append(messageList);
  4. Like
    simple way would to have a file using the define function to define some constants
     
    config.inc.php

    <?php define('DB_HOST', 'localhost'); define('DB_USER', 'username'); define('DB_PASS', 'password'); define('DB_DATABASE', 'database name');
     
    and then to use it just use
     

    <?php require_once 'config.inc.php'; // say the file is in the web root... save the config file to the directory outside // so no one can view it directly and use this line instead // require_once dirname(dirname(__FILE__)).'/config.inc.php'; $connection=mysql_connect (DB_HOST, DB_USER, DB_PASS); mysql_select_db(DB_DATABASE, $connection);
     
     
    i dont use ?> to end php at the end... you dont actually have to if its just php and saves on errors with sending header data due to a random new line character at the end of the file
  5. Like
    I've just had a quick play around with your css try this
     
     

    * { list-style:none outside none; margin:0; padding:0; } body { background:url("images/pattern1.png") repeat-x scroll 0 0 #FFFFFF; border-top:1px solid #FFFFFF; font:14px Tahoma,Arial,Helvetica,sans-serif; padding:50px; } ul.menu { float:right; font:bold 25px Arial,Helvetica,sans-serif; letter-spacing:-2px; opacity:0.9; position:relative; text-transform:uppercase; z-index:597; } ul.menu a:link, ul.menu a:visited { color:#000000; text-decoration:none; } ul.menu a:hover { color:#000000; } ul.menu a:active { color:#FFA500; } ul.menu li { background-color:transparent; color:#000000; float:left; line-height:1.3em; vertical-align:middle; } ul.menu li.dropdown:hover { border-bottom:none; } ul.menu li:hover { background-color:#B0D730; border:1px solid #000000; color:#000000; cursor:default; position:static; z-index:599; } ul.menu li:hover > ul { visibility:visible; } ul.menu li.dropdown { background-image:url("images/nav-arrow-down.png"); background-position:100% 50%; background-repeat:no-repeat; padding:0 30px 0 0; z-index:100000; } ul.menu li.dropdown a { padding-right:0; } li.category { background-image:none; padding:10px 5px; } ul.menu li a { display:block; padding:0 10px; } ul.menu li.hover ul, ul.menu li:hover ul { visibility:visible !important; } ul.menu ul.container { background-color:#B0D730; border:1px solid #000000; font-size:12px; letter-spacing:normal; margin-top:-1px; padding:0 5px; position:absolute; top:100%; visibility:hidden; z-index:-1; } ul.products { left:87px; } ul.industries { left:251px; } ul.menu ul.container a { border-bottom:1px dotted #000000; padding:3px; width:150px; } ul.menu ul.container a:hover { background-color:#FFA500; color:#FFFFFF; } ul.menu ul.container li { border:medium none; float:left; font-weight:bold; position:static; width:160px; } ul.menu ul.container ul { border:medium none; display:block !important; padding:0; position:static; text-transform:none; width:auto !important; } ul.menu ul.container ul li { float:none; font-weight:normal; } ul.menu ul.container ul ul { display:none; }

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.