4 Replies - 487 Views - Last Post: 02 January 2015 - 03:08 PM Rate Topic: -----

#1 Entire  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 02-January 15

How do I use POST to upload to MySQL

Posted 02 January 2015 - 02:07 PM

So, I have been uploading using the GET function in PHP. But, I am using bigger lists and that function even when multithreading, is too slow. POST is meant to upload them right away, someone told me, so I tried doing research. I can't find it anywere.

Here is my php code

<?php
include 'db.php';

// Check connection

$myValues = $_POST["values"];

if (mysqli_connect_errno()) {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$sql = "INSERT INTO $tableName (userid, username, password) VALUES $myValues";

if (!mysqli_query($con, $sql)) {
    die('Error: ' . mysqli_error($con));
} else {
    echo "added";
}

mysqli_close($con);
?>


How would I use my VB.NET application to upload quickly? If someone could give me a quick heading of were to look or something? Thanks ..

Is This A Good Question/Topic? 0
  • +

Replies To: How do I use POST to upload to MySQL

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13959
  • View blog
  • Posts: 55,712
  • Joined: 12-June 08

Re: How do I use POST to upload to MySQL

Posted 02 January 2015 - 02:14 PM

Is this mysql db on the same machine as this .NET project?

Is this a asp.net, winform, wpf, or what?
Was This Post Helpful? 0
  • +
  • -

#3 Entire  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 02-January 15

Re: How do I use POST to upload to MySQL

Posted 02 January 2015 - 02:41 PM

View Postmodi123_1, on 02 January 2015 - 02:14 PM, said:

Is this mysql db on the same machine as this .NET project?

Is this a asp.net, winform, wpf, or what?


Sorry for not being clear. My database is hosted online, along with the php files. Also using winform.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13959
  • View blog
  • Posts: 55,712
  • Joined: 12-June 08

Re: How do I use POST to upload to MySQL

Posted 02 January 2015 - 02:54 PM

Perhaps go make a webservice in the php, and then the .NET app can push data to it.
Was This Post Helpful? 0
  • +
  • -

#5 Entire  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 02-January 15

Re: How do I use POST to upload to MySQL

Posted 02 January 2015 - 03:08 PM

View Postmodi123_1, on 02 January 2015 - 02:54 PM, said:

Perhaps go make a webservice in the php, and then the .NET app can push data to it.


I do. But I was wondering how I would go about uploading using post, as im currently uploading using get witch is slower.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1