AleMonteiro 238 Can I pick my title?

Change $_POST['s'] to $_GET['s'] or to $_REQUEST['s']

AleMonteiro 238 Can I pick my title?

Hello Tko,

when you call countdown('08/26/2016 09:07:13 PM', callback);, 'callback' is not defined.

I made an fiddle if an example based on your code, except the css.

I think it's what you want: https://jsfiddle.net/alemonteiro/s0wwkLfp/1/

AleMonteiro 238 Can I pick my title?

My country is the world and my religion is to do good.
- Thomas Plaine

AleMonteiro 238 Can I pick my title?

Checkboxes values are only submited if they're checked, and text values are always submited even if blank.
So if you check only 5 boxes, the length of $_POST['checkbox1'] will be 5 but the length of $_POST['quantity'] will still be 10.

I suggest you to name each input text with the correspoding prodcode used on the checkbox, like name='quantity_".$row['prodcode']."' and then for each checked input you get it's text using $_POST["quantity_".$check[$i]].

AleMonteiro 238 Can I pick my title?

You could just make an replace for any special char into an space and then split it with explode, but if you want something a little more elegant, you probably want regular expressions.

Take a look at this: http://stackoverflow.com/questions/9088391/splitting-large-strings-into-words-in-php

AleMonteiro 238 Can I pick my title?

It's a silly thing... you're reaching for the form with document.getElementById('myForm'), but your form doesn't have id="myForm".

Just add the id to your form or use document.forms['myForm'] to get it by it's name.

Example:

    function onSelectedOption(sel) {
    var frm = document.forms["myForm"];
        if ((sel.selectedIndex) == 3) {
            frm.action = "a.php";
        }
        else
        {
            frm.action = "b.php"; 
        }
        // I don't think you want to submit the form eah time the combobox is changed, or do you?
        // If you do, just remove the comments.
        //frm.submit();
    }
slowlearner2010 commented: thanks for your answer. its solved now.. +2
AleMonteiro 238 Can I pick my title?

Your button is of 'submit' type, so it means that it'll submit the form (an reload).

I didn't check all of your code, but i'd replace your input button for this one:

<button type="button" class="btn-login" onclick="toggle_visibility('foo'); toggle_visibility('sidebar'); toggle_visibility('tiles'); toggle_visibility('wsf');">Login</button>
AleMonteiro 238 Can I pick my title?

How about the facebook developer homepage? It's has the best, and most up to date, documentation you could ever find.

https://developers.facebook.com/docs/facebook-login

AleMonteiro 238 Can I pick my title?

Choose your IDE (Eclipse, Android Studio or even Visual Studio now a days), install the stuff, install the sample apps and start playing!

Almost every release of an API version has an attached API Samples with dozens of apps each one demonstrating one or more features.

If you got and Android device you can just plugin and start debugging, or if you don't, set up and virtual device to do it =)

I think hands on are the best way to go! And the link @stultuske recommend is the best one, android documentaion is neat!

Ps.: I used Eclipse for somewhile but a couple a months ago I migrated to Android Studio, and i'm liking it.

AleMonteiro 238 Can I pick my title?

Yeap, there's something already: https://www.pureftpd.org/project/libpuzzle

One of it's sampled application it's called "finding duplicate images in photo libraries".

ribrahim commented: Many Thanks for the Link. I wil check. +0
AleMonteiro 238 Can I pick my title?

Man, you could get lucky and someone that already used this class could come in an give it all on a platter to you, but's that unlikely.

You should attempt to use it on your own and if you fail, then you come explain what happend and post your code so even people that never used the class can maybe find bugs in your code.

You need to show effort if you want other people to help you.

I mean, look at me, i'm here taking time giving you a lesson on basic learning instead of reading about the class you asked =)

Give it a go!

AleMonteiro 238 Can I pick my title?

Just a remark about your code, it would be much more elegant and performatic like this:

 var $overlay = $('#overlay_image_text'),
    engraving = this.engravingFontCaseSenstiveOptions(cText);

 if( engraving == "Lower")
    {
        $overlay.css({
            'margin-top':'-162px',
            'font-size':60+'px'
        });
    }else if(engraving == "Upper")
    {
        $overlay.css({
            'margin-top':'-154px',
            'font-size':48+'px',
            'margin-left':'0px'
        });
    }
    .
    .
    .

In general notes, evit calling the same function over and over again. And every time you all $("#") or .css({}) you're executing a function. This take serious effect if inside a large loop. Obs.: you should cache the var outside the loop but not in the global namespace, store somewhere it will not have attachaments as soon as possible.

AleMonteiro 238 Can I pick my title?

If the column it's an image you can't add text to it, you need to parse to a byte array.

If you have an base64 image string for example, you can call byte[] toDecodeByte = Convert.FromBase64String(data);

Anyway, you shouldn't be using Image column, use varbinary(MAX) instead.
From Microsoft:

ntext , text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead.

And besides that, you shouln't be storing images on the database anyway.
The best approch is to store the image on the hard disk and only store it's path on the database.

AleMonteiro 238 Can I pick my title?

I'm confused... you developing in Windows Forms with C#? Is that it?
If it is, then there's no cookies or sessions. You can just hold the login date on the main form of you app.

Why is this tagged with c,c++, java, pascal, python and vb.net? Please give correct information so people can help better.

Nutster commented: Good note about the tags. +6
AleMonteiro 238 Can I pick my title?

Thanks Bob!
But since it's an open source, it's not advertising, it's sharing. And it's not a product, it's a project =)
This is how I see at least ^^

AleMonteiro 238 Can I pick my title?

Since you are using bootstrap you could use BootstrapDialog, quite easy...

Just call BootstrapDialog.show({
    title: 'You title here',
    message: $(images)
});

And to upload it you could use xhr itself

var xhr = new XMLHttpRequest(),
    url = 'upload_page.php';
if (xhr.upload) {

    // file received/failed
    xhr.onreadystatechange = function (e) {
        if (xhr.readyState == 4) {
            if ( xhr.status == 200 ) {
                // File uploadded
                var response = xhr.responseText;
            }
            else {
                // Upload error
            }
        }
    };

    xhr.open("POST", url, true);
    xhr.setRequestHeader("X-File-Name", file.name);
    xhr.setRequestHeader("X-File-Size", file.size);
    xhr.setRequestHeader("X-File-Type", file.type);

    xhr.setRequestHeader("Content-Type", "multipart/form-data");
    xhr.send(file);
}
AleMonteiro 238 Can I pick my title?

Hey fellas,

some time ago I started trying out Brackets, and guess what? Loved it!

If you don't know, it's an open soude editor made out of html, css and javascript, powered by node JS and chromium and sponsored by Adobe.
A lot of open sources projects coming together to make a beautiful IDE.

And it's made of sutuff we know about, so it's possible to tweak and improve and mess things out.

Anyway, the play was so fun that it turn out to be an SQL Browser Extension.

If you use brackets you should check it out: https://github.com/alemonteiro/brackets-sql-connector

It's only on the beggining, but the possibilities are inumerous =)

And I tell you, it's a beautifull mess coding the extension on the extension IDE and debugging it like it was an browser, I get confused some times yet =x.

Have a good week!

almostbob commented: your project works excellently +0
AleMonteiro 238 Can I pick my title?

Oh boy! I wish I could!
But you know, I still need to maintain an VB.NET using Visual Studio 2008. Can't even update it to newer IDE's because of client restrictions =/
TI on enterprise networks hurts my soul.

But I just got an new HDD, so this weekend I begin building my Linx Dev Env =) Wish me luuuuuck ^^

I'm gonna start with Debian for now, i'm concered with Arch stability.
Thanks all for the inputs.
I'm just gonna leave this open for a while, so I can post the results back to you.

Wish a happy holliday to you all!

AleMonteiro 238 Can I pick my title?

You can just take apart the URL page and the params, like this:

function LoadYearMakeModelUsingAutoVin(controlItem, dataSourceUrl, postParams) {
    ...

    var xmlHttp2 = new XMLHttpRequest();
    xmlHttp2.open("POST", dataSourceUrl, false);

    //Set proper header data
    http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    http.setRequestHeader("Content-length", postParams.length);
    http.setRequestHeader("Connection", "close");

    xmlHttp2.send(postParams);

    ...

}

//And use it like
LoadYearMakeModelUsingAutoVin(controlId, 'RequestXml.aspx', 'name=GetVehicleInfoUsingVinCanada&VinOrSerialNumber=' + vinOrserialnumber);

Or you could use FormData also:
https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects

AleMonteiro 238 Can I pick my title?

I'm a little bit confused by what you're saying, but let me try to explain to you how it works:

When the browser request newspaper.com/sports, the WebServer (IIS or Apache or etc) will first see if there's any Rewrite Rules that match /sports.

If there's no rule that match /sports, then the WebServer will think that /sports is an directory (because there's no extension and the WebServer handle each requested file by it's extension, so it knows what and how to treat the file - extensions are related to MIME Type configs and Module Handlers).

If the directory /sports exists, then the WebServer will try to find the default document for that directory (index.html, default.aspx, index.php and etc). If the default document exists (default document configuration and also the physical default doc), then the WebServer will parse this file and return it's content.

If the directory /sports exists but there's no default document, then WebServer will either list the directory contents (if the WebServer is configured to do so) or it'll return the error 403 - 'Directory Listing not Permitted'

Last but not least, if the directory doesn't exists at all the WebServer will return 404 - 'Not Found'.

If you don't know them, rewrite rules make possible /sports to be redirect to /sports.html or even /sports/volley to /sports?id=volley.
Rewrite rules are very usefull. Most sites that have friendly urls use rewrite rules.

Anyway, to help you out you need to show us what 'code' are you seeing instead …

AleMonteiro 238 Can I pick my title?

It's been a while, but just to register the solution:

Visual Studio 2008 didn't show, but there was two references on the .csproj file and that's what caused the problem, editing the file and removing the second reference was the only solution.

Thanks for all that helped.

AleMonteiro 238 Can I pick my title?
google.maps.event.addListener(autocomplete, 'place_changed', function() {
    var place = autocomplete.getPlace();
    if(place.address_components !== undefined && place.address_components.length > 0 ) {
        // selected option
    }
    else {
        // just typed and hit enter (no option selected)
    }
});
AleMonteiro 238 Can I pick my title?

Thanks guys. I think it's possible to make the move using an Win VM for what anything that isn't going well on linux.
I will even keep my current HD and if needed, could even be run as an VM box also (Really usefull this by the way: http://www.serverwatch.com/server-tutorials/using-a-physical-hard-drive-with-a-virtualbox-vm.html)

@Freshly, I took a look at Arch, but i'm concerned about stability using a rolling distro for a development environment. Don't you get stuck sometimes?

For now i'm thinking going

Gribouillis commented: Interesting link +14
AleMonteiro 238 Can I pick my title?

Hey fellas.

I've been using Windows as my main OS since I sat on an PC with win 95. Now I think is time to finally change to Linux!

The main reason I didn't change sooner was because the .NET dev env, but now there's Mono.

So, I really would like some suggestion about what distro and desktop interface to use.

What do I use PCs for:

  • Web Dev (.NET, PHP)
  • Android Dev
  • DataBase Managing (MySQL & SQL Server)
  • Little Bit of Design(Photo edit, vectors and very little movie editing)
  • CS GO (Steam Game)
  • Security Tests (With Kali)
  • Basic Stuff (Web,Docs,Music,Movie,Pics...)

I've been playing with distros on virtual boxes and pen drivers for a while, including Ubuntu, Debian, BackTrack, Kali, SlackWare and Mint.

I don't like dual boot too much, so the most important question, do you guys think I would be OK with Linux as my main OS using virtual box or wine for a few things(like SQL Server Management Studio) ?

If yes, what distro and desktop do you recommend?

Any other tips, remarks or suggestions are welcome.

Oh, also would like to confirm somehting... If I choose Debian, can I get any functionallity on Kali just by installing the packages needed, right?

Thanks!

AleMonteiro 238 Can I pick my title?

I can't say much because I've never actually used one, I've ended up creating my own solutions for each need, but I was helping my brother start with web dev to make a site for our father knife business and he decided to use the Slick Plugin: http://kenwheeler.github.io/slick/

Was one of the easist to implement by a non developer and had great reviews on fuctionality and performance.

Take a look at the result: http://nonomonteiro.com.br/available/fc_gyutsend/

The top carrosell and the knife photos are two different instances of the slick plugin.

Hope it fits for you.
Cheers.

AleMonteiro 238 Can I pick my title?

If you bind 'contextmenu' event that only capture right clicks, like:

// FROM https://api.jquery.com/contextmenu/
$( "#target" ).contextmenu(function() {
  alert( "Handler for .contextmenu() called." );
});

Or you can listen to mouse down, like this:

$('#element').mousedown(function(event) {
    var button = event.which || event.button;
    switch (button) {
        case 1:
            alert('Left Mouse button pressed.');
            break;
        case 2:
            alert('Middle Mouse button pressed.');
            break;
        case 3:
            alert('Right Mouse button pressed.');
            break;
        default:
            alert('You have a strange Mouse!');
    }
});

Or you can use some plugins for context menus if that what you want:
https://plugins.jquery.com/tag/right-click-menu/

AleMonteiro 238 Can I pick my title?

If you doubt is who to know when to send an email, i see two options for you:

  1. Use cron jobs that will run at specific intervals, identify the new records and send the e-mail. This way you can do it easily with PHP but you'll need to have some flag to know if that record was already mailed or not.

  2. Use a trigger on your SQL Server that will run and external command (probably call your PHP mailing page) each time a record is created.

AleMonteiro 238 Can I pick my title?

Hello timtim, welcome to the web dev world.

My default web apps now a days use at least the following libs:

  • jQuery
  • jQuery UI
  • Bootstrap

For charts: HighCharts
For Icons(just css): Font Awesome

But there's lots of good and rich libs and frameworks out there. Each one has its pros and cons and depending on what you want to do one can be better than another.

I suggest reading some reviews to see what fits best for you.

http://noeticforce.com/best-Javascript-frameworks-for-single-page-modern-web-applications

http://www.sitepoint.com/top-javascript-frameworks-libraries-tools-use/

Good luck
and welcome once more.

timtim1 commented: Thanks a lot AleMonteiro.Looking foward to learn more on this exciting area. +0
AleMonteiro 238 Can I pick my title?

Just so you know:

$('#value') // jquery object
//set value as
$('#value').val(1);

$('#value')[0] // DOM object
// so you can also set the value as
$('#value')[0].value = "1"; // This is not recommended, it's just to show that jQuery objects relay on the DOM object itself
AleMonteiro 238 Can I pick my title?

I agree that hiding the destination link it's not a good ideia, but anyway, here's a way you can count the clicks:

https://jsfiddle.net/alemonteiro/5pqb8dz3/1/

AleMonteiro 238 Can I pick my title?

About jQuery... if you don't, you should have a good base of knowlodge about JavaScript. If you undertand JS well, you'll take much more advantages of jQuery.
After that, one of the best ways to extend your knowlodge of it, it's to extend jQuery itself! Creating a well organized and reusable plugin is a good chalange that will give you lot's to research about.

AleMonteiro 238 Can I pick my title?

Whats the action on your <form> element?

AleMonteiro 238 Can I pick my title?

You can do it by seaching rules inside the css sheets.
I took some time to play with this:

<html>
    <style type="text/css">
        body {
            background: "#F00";
            background-image: url(http:\\teste.png);
            color: #FFF;
            font-weight: bold;
        }
    </style>
    <body>
        <script type="text/javascript">
        var seachHttp = function () {
            var cssSheets = document.styleSheets, // Loaded CSS Sheets
                i =0, il = cssSheets.length, // Counter and limit for sheets
                j, jl, rules, rule, // Counter and vars for Rules inside a Sheet
                stylesToSearch = [ // Properties to Seach HTTP ON
                    'background',
                    'background-image',
                ],
                k, kl=stylesToSearch.length, // Counter for properties
                s, // Current Property
                v // Current Value;


            for(;i<il;i++) { // Loop Sheets
                rules = cssSheets[i].rules || cssSheets[i].cssRules;
                for(j=0,jl=rules.length;j<jl;j++) { // Loop Rules
                    rule = rules[j];
                    for(k=0;k<kl;k++){ // Loop Styles
                        s = stylesToSearch[k]; 
                        v = rule.style[s]; // Get Value from Current Style
                        if (  v !== undefined && v.toString().toLowerCase().indexOf("http") > -1 ) { // Seach for HTTP Content
                            alert("Found HTTP at " + rule.selectorText + " " + s + " = " + rule.style[s]);
                        }   
                    }
                }
            }
        }

        seachHttp();
        </script>
    </body>
</html>

Notes: IE alerts two times(one for background and another for background-image); FF and GC alert only for background-image;

AleMonteiro 238 Can I pick my title?

What happens when you change the selected value on izvestajSelect? Does it call the ajaxIzvestaj function?

AleMonteiro 238 Can I pick my title?

If you want to pass the result of the first ajax to the second, you should do something like:

xmlhttp.onreadystatechange = function () {
    if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
        var firstResult = xmlhttp.responseText;
        document.getElementById("opcije").innerHTML = firstResult;
        //call the function that will make the next request
        ajaxIvestaj(firstResult);
    }
}

About the $table var, I couldn't fint it anywhere in your code.

AleMonteiro 238 Can I pick my title?

Hi filipgothic, when you get the result from the first request, just call the second one, simple as this:

xmlhttp.onreadystatechange = function () {
    if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
        document.getElementById("opcije").innerHTML = xmlhttp.responseText;

        //call the function that will make the next request
        ajaxIvestaj();

    }
}
AleMonteiro 238 Can I pick my title?

I really didn't understand how you got it to work, but I'm glad you did =)

berserk commented: thank you for the support :) +2
AleMonteiro 238 Can I pick my title?

The correct MIME type is

application/x-bittorrent

http://x-bittorrent.mime-application.com/

AleMonteiro 238 Can I pick my title?

None! I use Windows as my main SO and I gave up AV more than 5 years, ago and I only had one problem with malware because I plugged in a infected USB. After that I started using AutoRun Exterminator and had no more problems!

Why don't I use AV? I helped lots of family and friends to clean their PC from malware and viruses, and guess what? They'll all had some kind of AV, including Norton, Macfe, AVG and Avast.

So, what do I do to keep my pc working:
- Check Startup Programs and Services at least 2 times a week(and certainly after installing some new software)
- Check what is really running at least once a week(I use Process Explorer);
- Check for unwanted open ports with netstat
- Run CCleaner and Spybot once a week (there lots of similar)
- Download softwares from the original publisher or trusted sources.
- Read the instructions of any installer and only install what you really want (this seems so basic but I know lots of people that go 'next' without reading anything, then they don't know why Baidu is installed or why they have 20 tool bars on the browser)
- Use high secure browser settings to surf on unknown websites
- Down't download any exes that you don't know that it's safe!
- Use virtual machines to install uknown softwares before installing them in your real SO.
- …

RikTelner commented: I see what you got there :P +2
AleMonteiro 238 Can I pick my title?

berserk, take a deep breathe and debug the code!
You need to understand where it fails so you can figure out how to fix it.
First of all, when you check a checkbox, does it trigger the change listener? Does it save in the cookies? Does it save correctly?

diafol commented: For the deep breath quote. Ha ha ha +15
AleMonteiro 238 Can I pick my title?

innerHTML will give you the HTML inside the node, if you want plain text use .innerText;

AleMonteiro 238 Can I pick my title?

To check if a var is a number you should use

if ( Number(a) === a ) {
    // It's a number!
}
else {
    // It's not a number
}

Another detail, in you validateNumber function you may throw an error, but you are not handling that error when you call the validateNumber function.
You should put in a try{} catch{} and set the number 0 if there's an error.

AleMonteiro 238 Can I pick my title?

The confirmation box is quite simple:

$(".btn_dlt").click(function(){

        if ( ! confirm('Are you sure you want to delete this?') ) {
            return;
        }

        var btn_dlt = $(this); 
        $.ajax({
            type: "POST",
            url: "./delete-action.php", 
            data: { id: btn_dlt.attr("id") } 
        }).done(function( msg ) { 
            alert(msg);
            if(msg == "Success"){  
                btn_dlt.closest('.tr').remove();
            }else{
                $('#err_msg').html(msg);  err_msg field
            }
        });
    });
AleMonteiro 238 Can I pick my title?

Ivan, you won't be able to create it in only one input.
You need a select for the country DDI a input:text for the number itself.

Take a look at this on how to use icons with select: http://designwithpc.com/plugins/ddslick

The best you can do later is try to make the select and input "look and feel" like just one input, but they'll be actually two.

AleMonteiro 238 Can I pick my title?

Troy, I may be wrong, but I think Dave was only trying to wrap all of Cat's code inside the Cat function.

And there's a way of doing something similar to it:

var Animal = (function() {
    var _somePrivateFunction = function() {
        alert("Animal: I'm Private!");
    };
    var animal = function() {
    };
    animal.prototype.breathe = function() {
        alert('Animal: Breathing');  
    };
    animal.prototype.callPrivateFunction = function() {
        _somePrivateFunction();
    };
    return animal;
}());

var Cat = (function() {
    var cat = function(name) {
        this.name = name;
    };
    cat.prototype = Object.create(Animal.prototype);
    cat.prototype.purr = function() { 
        alert('Cat ' + this.name + ' : puurr'); 
    }
    return cat;
}());

var myAnimal = new Animal();
var myCat = new Cat("Olinda");
myCat.purr();
myCat.breathe();
myCat.callPrivateFunction();

var tests = [
    ("Is myCat.breathe === myAnimal.breathe ? " + (myCat.breathe === myAnimal.breathe)),    
("Is myCat an instanceof Cat? " + (myCat instanceof Cat)),
("Is myCat an instanceof Animal? " + (myCat instanceof Animal)),
("Does _somePrivateFunction exists? " + (typeof _somePrivateFunction === 'function'))
    ];

alert(tests.join("\r\n"));
diafol commented: despite some gnarly comments later on in the thread, I like this! +15
AleMonteiro 238 Can I pick my title?

dbissu, if I undertand correcly, you want to use the returned value of 'getTextValue()' and use it to set one label on the codebehind? If that's it, you can't do it, or at least, you shouldn't.

Instead, why don't you set the label value from JavaScript?

$(function() {
    $("#yourLabelId").text(getTextValue());
});

You don't need to use ScriptManager at all.

vbissu20 commented: hi this is my id vbiss20 +0
AleMonteiro 238 Can I pick my title?

Hi Yuki.

DataGridView.Columns is a collection that you can manipulate as you wish.

There's a couple ways of doing it, one way to just add one more columns is:

this.myDataGrid.Columns.Add(new DataGridTextColumn() {
    HeaderText = "My Column",
    Name = "My Column",
    DataPropertyName = "MyDataName"
});

Be aware that exists more than one type of DataGridViewColumn, see more here.

And are you developing Windows Forms on Visual Studio?

If you are, when you create something on with the VS UI, like adding columns to your grid, or a button, VS actually generates a file named 'YourFormName.Designer.cs'. In that file you can learn how VS creates all what you can see the on UI come true as code. It's a nice way to learn how to create programatically what VS gives you on the UI.

ddanbe commented: Good advice. +15
AleMonteiro 238 Can I pick my title?

Hey, I think this should work for you:

// Store the Ids order
var current_order = {
    'set_1' : 0,
    'set_2' : 1
};
// If there's no previous order, create it with default values
if (JSON.parse(localStorage.getItem("sorted"))== " ")
{
    localStorage.setItem("sorted", JSON.stringify(current_order));
}

$(function(){
    // Get last saved order
    current_order = JSON.parse(localStorage.getItem("sorted"));
    console.log("returning"+current_order);

    // Sort container
    $( "#container" ).sortable({ cursor: "pointer", 
        placeholder: "highlight",

        update: function(event, ui){
            // When an element is sorted, update all the Indexes at current_order
            $(this).children('div.innercontainer').each(function() {
                current_order[$(this).attr("id")] = $(this).index();
            }).get();   
        }   
    });
    //Disable text selecion
    $( "#container" ).disableSelection()

    //Sort the divs based on the current_order
    $("div#container").append(
        $("div.innercontainer").sort(function(a, b) {
            var sorted = current_order[$(a).attr('id')] - current_order[$(b).attr('id')];
            //console.log(sorted);
            return sorted;
        })
    );
}); 

Obs.: Not tested ^^

piers commented: You have helped me on different things and provided the understanding that I needed in regards to the indexes and therefore helped me solve this. +3
AleMonteiro 238 Can I pick my title?

If you know exactly what you want to remove, just use replace:

$list = str_replace("5:1", "", $list);

Some helpful links:
http://php.net/manual/en/function.str-replace.php
http://php.net/manual/en/function.substr-replace.php

AleMonteiro 238 Can I pick my title?

Use sessions to stored the logged in user.
When the users logs in you need to save that info(UserId for example) on the Session.
And in every page load you must check if the session is valid.
If there's no session it means that the user did not logged in, so you can redirect him to the login page.
Simple logic.