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

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:

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

  • Thomas Plaine

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]].

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:

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.


    function onSelectedOption(sel) {
    var frm = document.forms["myForm"];
        if ((sel.selectedIndex) == 3) {
            frm.action = "a.php";
            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.
slowlearner2010 commented: thanks for your answer. its solved now.. +2

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>

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

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.

Yeap, there's something already:

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

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!

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")
    }else if(engraving == "Upper")

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.

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.

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 Please give correct information so people can help better.

Nutster commented: Good note about the tags. +6

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 ^^

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

Just call{
    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
    };"POST", url, true);
    xhr.setRequestHeader("X-File-Size", file.size);
    xhr.setRequestHeader("X-File-Type", file.type);

    xhr.setRequestHeader("Content-Type", "multipart/form-data");
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:

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

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!

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

function LoadYearMakeModelUsingAutoVin(controlItem, dataSourceUrl, postParams) {

    var xmlHttp2 = new XMLHttpRequest();"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");




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

Or you could use FormData also:

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, 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 of ...

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.

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)

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:

@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?


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:

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:

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

Hope it fits for you.

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

$( "#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.');
        case 2:
            alert('Middle Mouse button pressed.');
        case 3:
            alert('Right Mouse button pressed.');
            alert('You have a strange Mouse!');

Or you can use some plugins for context menus if that what you want:

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.

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.

Good luck
and welcome once more.

timtim1 commented: Thanks a lot AleMonteiro.Looking foward to learn more on this exciting area. +0

Just so you know:

$('#value') // jquery object
//set value as

$('#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

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