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.

mealybar

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    mealybar got a reaction from Major_Disaster 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.
  2. Like
    mealybar got a reaction from Georgew in MySQL last_insert_id   
    I'm guessing you're running this through mysql_query()?
     
    If I remember rightly it will only execute one query per call, i.e. to your first ';'.
     
    I'd split them out, and use mysql_insert_id().
     
    And better still if you're using innodb additionally wrap all the queries in a transaction to ensure either they all work successfully or none of them do.
  3. Like
    mealybar got a reaction from dany123 in Memorizing codes   
    I wouldn't worry about memorising every tag, that's what the docs are for - and it's changing all the time anyway!
     
    The main thing is to know when and where to use a tag, attribute, method or function.
     
    Build your vocabulary, use a dictionary for the spelling
  4. Like
    mealybar got a reaction from Synjyn in Jquery customise multi-step form   
    Synjyn is on the money with the <a href='#' causing the scroll to top.
     
    Try inserting a
    e.preventDefault(); at the end of the click event function.
     
    If that doesnt work try
    return false; in the same place (sometimes the prevent default doesnt work for me).
     
    Basically both those snippets stop the click event in it's tracks, which should stop it scrolling to the top.
     
    Check out http://api.jquery.com/event.preventDefault/ in the jQuery docs.
  5. Like
    mealybar got a reaction from lozenges in Jquery customise multi-step form   
    Synjyn is on the money with the <a href='#' causing the scroll to top.
     
    Try inserting a
    e.preventDefault(); at the end of the click event function.
     
    If that doesnt work try
    return false; in the same place (sometimes the prevent default doesnt work for me).
     
    Basically both those snippets stop the click event in it's tracks, which should stop it scrolling to the top.
     
    Check out http://api.jquery.com/event.preventDefault/ in the jQuery docs.
  6. Like
    mealybar reacted to Jock in Putting basic weather info on a commercial website   
    There are free API's available from weatherbug and wunderground. Also the iGoogle weather gadget uses XML which you can query, here is an example...
     

    <?php $ch = curl_init("www.google.com/ig/api?weather=Linlithgow,Scotland"); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2. Gecko/20100723 Linux Mint/8 (Helena) Firefox/3.6.8"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); $xml = simplexml_load_string($output); echo '<img src="http://img0.gmodules.com/'.$xml->weather->current_conditions->icon['data'].'" /><br/>'; echo $xml->weather->current_conditions->condition['data'] . ' '; echo $xml->weather->current_conditions->temp_c['data'].'°C<br/>'; ?>
     
    Assuming you have PHP5 + CURL.

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.