hericles 289 Master Poster Featured Poster

Loop through your array and for each item and call
ListBox.Items.Add()

You can call that in your Load event as you want the list populated when the form appears.

hericles 289 Master Poster Featured Poster

I think you need a better design to do what you want.
For a start referring to the amount's by the ID when the ID is a number is immediately confusing. A + b + C makes far more sense.
But, regardless, stripping the equation apart to insert the values from the other table is always goingt o be tricky.

Can you pull the values and equation from the db and then do your transformation in code instead?

hericles 289 Master Poster Featured Poster

You can just concatenate the current column value with the new input.
UPDATE table_name SET col1 = CONCAT(col1, 'new value') WHERE ID = some_id;

hericles 289 Master Poster Featured Poster

How many settlement records are there for 'Kapoor'?

සශික commented: more than two +1
hericles 289 Master Poster Featured Poster
SELECT blabla
FROM a INNER JOIN b ON a.a = b.b
ORDER BY a.id DESC LIMIT 10;

If you're creating the SQL statement in code just replace the 10 with whatever the result of (variable x 10) is.

hericles 289 Master Poster Featured Poster

This sounds like you've made it overly complicated.
Why are you trying to serve differing PHP pages when, if I'm reading this right, all you really need to do is return content from the server?
You could design your page to have the elements you need for the various screen sizes, if that varies at all, and on a screen resize, detect the size, make an AJAX call to the server, retrieve the necessary content and display in the relevant elements.

You keep referring to includes which are a specific thing in PHP, which makes parts of explanation confusing. By includes you are simply referring to the content to be passed back to the page correct?

You can write a PHP file that includes html elements and javascript. The server passes a PHP page to client as HTML anyway.
For example - save as file.php and run from your server:

<?php 
    echo "Hello from PHP";
?>
<html>
    <head>       
    </head>
    <body>
        <script>
            alert("hello from javascript");
        </script>
        <?php 
            echo "a second hello.";
        ?>
    </body>
</html>

Having said that, if you're going to be updating the content through AJAX the entire page can jsut be HTML as no actual PHP is required except for the end points of the AJAX calls.
The thing is I don't see this as that difficult at all so either I'm missing something or you're making it far harder than it should be.
The only thing that it should do is only …

hericles 289 Master Poster Featured Poster

I would guess it is because you're not actually stopping the button submission by return false; or event.stopPropagation() so your form is still submitting sometimes. All the cancel button does is close the window but you've still clicked the submit button before that.
Why it only happens sometimes, I don't know, probably a matter of timing before the window closes.

hericles 289 Master Poster Featured Poster

One method is to use a LIteral control on the page and build up your html as string in the code behind and then pass it to the literal.
<asp:Literal id="literal1" runat="server" />
In code:
string html = "<div class=''>....";
literal1.text = html;

hericles 289 Master Poster Featured Poster

You have an href set for the <a> tag so after the onclick is processed the anchor does what it is meanrt to do. To prevent it firing change your onclick to:
onClick=\"confirm('Are you sure you want to delete?'); return false;\">

hericles 289 Master Poster Featured Poster

The issue must be in the values string you set up. If you're getting 'invalid' back you can be sure you're hitting the right URL and your cURL is working but you're failing the verification.
So you're need to match your query string against the API docs and any examples to see what you're doing wrong.

As an aside you're opening database connection too early. Don't open it until the curl response comes back to minimise the time you're holding a database connection open. Probably not a big deal but a good habit to get into.

hericles 289 Master Poster Featured Poster

It looks to me like your doing some extra steps when getting the salt and password out of the database.
When creating the password you create a salt, add it to the password and hash the combined string. The salt and hashed password then get saved to the database.

On signing in you retrieve the salt and hashed password but you shouldn't need to do anything to the hashed password. Add the salt to the provided password, hash it and then compare that to the hashed password in the database. If they match you're in.

hericles 289 Master Poster Featured Poster

If you're getting the results back via JSON and then adding each to the page why can't you add a jQuery .click function to each one at the same time?
$('.flex-1').click(function() {});
Then, when a .flex-1 is clicked, the this keyword will target the clicked element only.

hericles 289 Master Poster Featured Poster

If the link is correct in your email then something is probably going wrong on your activation page and it is redirecting to the register page again.
You'd need to debug what happens on the activation page or post it up here.

hericles 289 Master Poster Featured Poster

Firstly, this line only showing one row:
$result = mysqli_fetch_row($result);
var_dump($result);

You've only asked it to fetch one row so the dump only has one row. mysqli_fetch_row does just what it says i.e. it returns ONE row.
For the second problem, the var_dump of your row above shows what's wrong there. 'name' isn't a key in the array, everything is index based.
echo $row[1]; // will outut the name column

hericles 289 Master Poster Featured Poster

What if you register the #Resolved click inside the success return of your AJAX call?

$(document).on('click', '.viewTD', function(){
       window.tid = $(this).closest('tr').find('.tidTD input').val();
       $.ajax({
           type: 'post',
            url: 'modalInfo.php',
           data: 'tid=' +tid,
           success: function(d){
               $('.modal-body').html(d);
               $('.modal-title').html("Ticket ID: " + tid);
               $('#myModal').modal('show');
               var time = $('#time').val();
               var desc = $('#description').val();

               $('#Resolved').click(resolvedAjax(window.tid));
           }
       });
    });
    $( document ).on( "click", "#addComment", function() {
        $.ajax({type: 'post', data: { myData: $('#commentAdd').serialize() }, url: "addComment.php", success: function(info){
        }});
    });
hericles 289 Master Poster Featured Poster

Something like this?

<div id="generalbox">
  <div id="box3">
    <div id="item1" class="item" >This is example forum</div>
    <div id="item2" class="item" >This is example forum's description</div>
  </div>
  <div id="righthand">
    <div class="rightHandBlock"></div>
    <div class="rightHandBlock"></div>
   <div class="rightHandBlock"></div>
  </div>
</div>

CSS:

#generalbox {
    display: block;
    padding: 1.5%;
    margin-bottom: .15%;
    background-color: #222;
}

#box3 {
    display: inline-block;
    width: 54%;
    background-color: #a1a1a1;
}
.item {
  text-align: center;
  border: 3px solid #000;
}
#item1 {
    font-size: 1.8em;
    color: #000;
    text-decoration: none;
}

#item2 {
    font-size: 1.8em;
    color: #555;
}    
#righthand {
    display: inline-block;
    background-color: red;
    float: right;
    width: 90px;
}
.rightHandBlock {
  display: inline-block;
  border: 1px solid #fff;
  height: 40px;
  width: 40px;
}
hericles 289 Master Poster Featured Poster

Adding moment.js isn't really a 'massive fix'.
Neither is running jQuery UI. You can choose to download just what you need so you can have a jQuery UI file that is just the core and the datepicker.

hericles 289 Master Poster Featured Poster

hericles , there still a problem

I'm going to need more information than that. If you run the code what error do you get?

hericles 289 Master Poster Featured Poster

Is you table name actually customer product - 2 words?
If yes, then you'll need to quote it
arr = "INSERT INTO 'customer product'(user) VALUES('" & user.Text & "')"

The INSERT command expects the first name after INSERT INTO to be the table so it doesn't know what to do with the word 'product'

hericles 289 Master Poster Featured Poster

You can try SyncFusion's tools, most are free, as far as I know, for individual devs and small teams.
Or use Google Charts and code it yourself - more work involved of course.

hericles 289 Master Poster Featured Poster

Try ti without the VALUES keyword, just the select statement.

hericles 289 Master Poster Featured Poster

You need to put quotes around the value for the Location column.

SELECT * FROM kladilnica WHERE Location = 'Macedonia' AND Uplata = 50 AND Liked = 50

So you need this:
if($selectCountryBox != "") $searchArr[] = "Location = '{$selectCountryBox}'";

hericles 289 Master Poster Featured Poster

Chrome won't work bcause you're using an ActiveXObject, that only works in IE (unless you've added a plug in).
Windows is failing because your syntax is incorrect. Your window.onload should look like this:

window.onload = function() {
        loadfile(filename);
}

In your loadfile function you ned to check for the end of the file while reading and define the r object:

function loadfile() {
   if (!fso.FileExists(filename)) {
      fso.CreateTextFile(filename,true);
   }
        var f=fso.OpenTextFile(filename,1);
        var r = null;
        while(!f.AtEndOfStream) {
            r=f.ReadAll();
        }
        f.Close();
        myarea.innerHTML=r;
    }

That still outputs 'null' onto the screen but that's all I have time for right now.

hericles 289 Master Poster Featured Poster

Add jQuery to your site if you haven't already and call fadeOut() on the div to make it slowly disappear.

$('.overlay').fadeOut(500);

hericles 289 Master Poster Featured Poster

You may be onto something.
I read these polls that say he rates low with women in the Republican Party and a majority of men don't like him either yet he still wins state after state for the nomination.
I don't profess to understand American politics at all, this drawn out horse race just to decide who gets to run for each party is nuts, but from what I've read only about 20% of the Repubican Party get to vote for the nominee so maybe it's has been skewed in some way?

I refuse to belief that the majority of Americans want this idiot in charge. He shows the most despicable traits: narcissism, arrogance, bullying, xenophobia, racism, sexism, constantly lying (badly) - who can take him seriously?

face1m commented: Those despicable traits are what the people "LOVE" about him. However, don't forget about the evangelicals who worship him has their savior. +0
hericles 289 Master Poster Featured Poster

From their documentation page:

The default math delimiters are $$...$$ and [...] for displayed mathematics, and (...) for in-line mathematics.

FYI: The text editor here stripped out the \'s from the quote.
The displayed mathematics, your syntax 2, are designed to break the equation out of the page and display it bigger, brighter, better.
The in-line is designed to include the equation in the current line of text, hence using the default text size for a line of text on the page.

If you wanted to use syntax 1 you would need to include some CSS:
And the equation for that is: <span style="font-size: 32px;">\(x={72^2-{\sqrt{53^2}}\over 25}\)</span>

hericles 289 Master Poster Featured Poster

You have this line:
<script src="$aa.$bb/maps/api/js?v=3&sensor=false"

Can I assume the $aa and $bb is coming from PHP? Because it isn't getting rendered correctly if it is.
If you are creating those variables in a PHP template I think you aren't using the <?php tags correctly.

hericles 289 Master Poster Featured Poster

The SQL statement looks fine to me. Maybe the issue is with the byte variable. What is the column type of PIC in the database?

hericles 289 Master Poster Featured Poster

I assume the last part of the URL, the file name, is just the date with 'EQ' in front?
If not, especially if there is no logic to file name, you'll have trouble.

Otherwise you can get the file now with:
$file = "EQ" . Date('dmy') . "_CSV.zip";
$url = "http://www.bseindia.com/download/BhavCopy/Equity/$file";

To save the file:
file_put_contents($file, fopen($url, 'r'));

Or you can use fopen to open the file and write it to folder using fwrite.

The file on the server has to exist of course and, depending on the size, you have memory issues and need to look at

hericles 289 Master Poster Featured Poster

If I understand you correctly, are you saying that:
$ulr = "http://someurl.com";
is getting presented as a comment?

You must have something wrong in your code. You should be able to do things like
echo "http://someurl.com";
and see it correctly on your page.
Can you post up the code segment in question?

hericles 289 Master Poster Featured Poster

In that case I would say is almost certainly because waypoint scans the DOM at page load only. Items added after that don't get found. Finding out how you can force waypoint to go over the DOM again after those new items are added would solve your problem.

hericles 289 Master Poster Featured Poster

It sounds like you would want to install some existing open source software to manage user login, profile pages, forums, etc. You really don't need to be doing this yourself from scratch.
Just hit up google for free forum software and start browsing.

hericles 289 Master Poster Featured Poster

Generally you get into that error if you've closed the db connection before you've finished using the reader but you're not doing that here.
Try including the CommandBehavior.CloseConnection to the ExecuteReader as you have it in the second code section.

hericles 289 Master Poster Featured Poster

Firstly, if you didn't go there already, connectionstrings.com has all the info you will need on connections strings to the various databases.
Thats the connection string for omitting tnsnames, is that want you need?
Generally, the simpler version will work:
Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;Integrated Security=no;

Regardless, if you looked at the tnsnames format you'll see you only need to specify the data for MyHost and MyPort for the connection string to be valid. Change the protocol if required.
So the host name is the name of the server or it's IP address and the port is, well, the port its runnung on.

hericles 289 Master Poster Featured Poster

var_dump out the contents of $results and see what it contains. It is clear from the error that $results['user'] isn't an existing item. It maybe as simple as the 'user' item being wrapped in an outer element you're not referring to.

hericles 289 Master Poster Featured Poster

lbltotalAssetsinDatabase.Text = ds.Tables(0).Rows.Count
That is giving you the number of rows in the dataTable. There is only one row but it holds the value 47.
You want:
lbltotalAssetsinDatabase.Text = ds.Tables(0).Rows[0][0].ToString()
The [0][0] accesses the first cell of the first row of the dataTable. Alternatively you could name the column in your SQL query and refer to it more specifically:
sql = ("SELECT COUNT(*) AS count FROM ASSETINFO;")
lbltotalAssetsinDatabase.Text = ds.Tables(0).Rows[0]['count'].ToString()

hericles 289 Master Poster Featured Poster

I haven't heard of waypoint til now but my first thought would be that elements added after waypoint is initialised don't get included because they weren't part of the DOM at that time.
Is the new content getting added after the page has finished loaded i.e. by user action, or is everthing loaded by the time the document is ready?
It could just be that your waypoint initialisation needs to be the very last thing to occur.

hericles 289 Master Poster Featured Poster

Simply dispose of the connection when you're done with it.

conn.Close()
conn.Dispose()

That's just good practise anyway for db connections.

hericles 289 Master Poster Featured Poster

Firstly, this completely depends on what you are trying to do. It maybe that an off-the-shelf solution won't match what you need to do.
But for the vast majority of cases some thing does exist that will match what you need in which case going to the trouble and cost of bespoke is simply silly. Starting out businesses have little money and a lot of costs, bespoke software shouldn't be one of them unless it can't be avoided.

hericles 289 Master Poster Featured Poster

Your SQL looks right so there must be so external factor happening, some form of permissions being the ikely problem (yes, I now you said the directory was 777). Are you checking the MySql error after you've ran the query?

hericles 289 Master Poster Featured Poster

Unfortunately, I think the answer is no. Humans are incapable of functioning in sufficiently large groups with leadership/authority in place.
You state the government is the worst organised crime but it isn't that simple. It takes organised effort to a variety of good things like food distribution, infratructure, health care, etc. Sure, governments can be (and are) corrupt, or more exactly, are full of corrupt people.
As Plato said, power should be given to those that least want it. A government staffed by truely alturistic, intelligent people wouldn't be a bad thing.

You gave an example:
"Another example: You mom calls you sick and sounding really in trouble, you get your car and go the fastest you can to her... but the fastest you can is not always allowed by the government. So you could actually be stopped by the police and even go to jail because you're trying to reach your mother."
It's not the best example because if your mum really is in trouble you aren't the best person to help her. Either she needs the police and/or and ambulance (if only because they can get there faster/safer) or her problem isn't so severe that you need to drive at dangerous speeds, endangering innocent people around you.

Your rights stop when they could, even just potentially, harm others.

"Anarchism is free people contributing with free people to do what they judge best for them selves, their family and their friends."
And that, also …

hericles 289 Master Poster Featured Poster

It is possible. What you will want to do is use jQuery and monitor the onchange event of the drop down so your code knows when an option has been selected.
Then you do an http.post to the server with the selected option as the data. Your PHP endpoint will read the data (the user ID) and select the relevant data from the database and return it to the jQuery post which will then display the results on screen.

You can do the same thing purely in PHP but you would need to have a page postback (form submit) for server to know which option was selected.

hericles 289 Master Poster Featured Poster

Are you trying to send an email that has all of the items in it?
If yes, alter your query to return all rows (i.e. all relevant items) and run through each row, parsing the data, and adding it onto the body string.
I'd switch to using a DataAdaptor and a DataTable for that (my personal preference) and process over them all.
You'll want to alter your HTML generated string to style the results better of course.

hericles 289 Master Poster Featured Poster

The file check.php selects the xml data from the database, but the display does not show any xml tags.

I'm not sure why you expect to see XML tags on the page. You don't see <h1> or <div> in an HTML either. They're meant to be hidden as they indicate page structure and aren't considered page content.
Do you need to see the XML tags?

Maybe could you be more exact about what you expect to see and what actually happens.

hericles 289 Master Poster Featured Poster

A web service is a piece of software, running on the server (computer B) and listening on a particular port (optional).
Computer A would post data to the URL and port the web service is listening on and it will be processed on computer B.

You can post information to a URL with particularly ever programming language (.Net, cURL, PHP, javascript, the list goes on) and all server side languages should be able to create a web service to listen on a port. So you can definitely do what you want with WCF or a variety of RESTful architectures.

The error you are getting is almost certainly because you haven't set up an endpoint or the endpoint is wrong and isn't aimed at the connector's location.

hericles 289 Master Poster Featured Poster

I'm assuming that the entered trans_code is to be either 'a' or 'b'. The problem is that you are then comparing transcode (which is either the character 'a' or 'b') against variables a and b, which equal 0.06 and 0.08 respectively. The comparison fails and you don't get the result you expect.
You want:
If (trans_code == 'a')

hericles 289 Master Poster Featured Poster

Yes, Android 6 is now out and I'd say (without looking) that most devices are Android 4.2 and up.
For better reasons try out Packt Publishing (if you want to buy online) or free-it-ebooks for some free PDFs.

hericles 289 Master Poster Featured Poster

This example is from the PHP docs page for msqli_select: Click Here

<?php
$link = mysqli_connect("localhost", "my_user", "my_password", "test");

/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}

/* return name of current default database */
if ($result = mysqli_query($link, "SELECT DATABASE()")) {
    $row = mysqli_fetch_row($result);
    printf("Default database is %s.\n", $row[0]);
    mysqli_free_result($result);
}

Compare that to yours and you'll see some differences which explain what you've done wrong.

hericles 289 Master Poster Featured Poster

There must be some reference to slicknav in your code somewhere, you need to fnd and remove it, but in the meantime you can always hide it by editing your custom style sheet.
.slicknav_menu {display: none!important;}
That will hide the entire dark grey strip the menu button is in

hericles 289 Master Poster Featured Poster

If you want to build a brand around your blog, and be seen as more professional, then I would say your own domain is a must.
If you have a website already, incorporating the two is probably the better idea. You want people to go from your blog to your website and vice versa. If the two are seperate sites that becomes less likely.