Advertisement

01.07.2008 at 01:18PM PST, ID: 23064839
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.0

Error sending POST data to remote PHP file, could be the way in which MySQL result strings are referenced?

Asked by uk52rob in PHP and Databases, PHP Scripting Language, MySQL Server

Tags:

Experts,

To cut a long story short... The code below is meant to POST the $num2 and $message variables to a PHP file on a remote server. These variables derive from a result array on a MySQL query.

The MySQL query works fine, and so does the POST content when used seperately. However, the code below (yes, most of the references are ficticious) does not produce a 'success' message with a subsequent POST result, nor does it throw up any error message. The script simply runs without displaying anything.

To recap - The main objective here is to ensure the MySQL arrays / strings are being referenced correctly, and to be sure that this is being passed to the POST string (or $posturl) correctly.

Thank you in advance for your help!Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
<?php
 
include 'opendb.php';
 
$query = "SELECT distinct
 SubscriptionID, s.CustomerID, EndDate, Price, u.ContactName,  u.Number
 FROM
 subscriptions AS s JOIN customers AS u ON s.CustomerID=u.CustomerID
 WHERE
 EndDate='" . date("Y-m-d", strtotime("+1 day")) . "'
 ORDER BY
 EndDate;";
$result = mysql_query($query);
echo mysql_error();
//echo $result;
 
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
 
  $num = $row['Number'];
  $name = $row['ContactName'];
  $end = $row['EndDate'];
 
  $name2 = str_replace (" ", "+", $name); // This should remove any spaces in the name, and put a '+' symbol in place (required for HTTP post)
  $num2 = str_replace (" ", "", $num); // As above, but removes any spaces from the number
 
  function dotestpost($num2,$message)
  {
 
    $weburl = "http://test.domain.com/post/testpost.php";
 
 
  // encodes the message for sending on the web
  $message = urlencode($mess2);
 
 
  // the request string
  $posturl = "$post?tel_num=$num2&name=$message";
 
  // connects to server to post output
  if ($content_array = file($posturl))
  {
    $content = implode("", $content_array);
 
    // check for response
    if (eregi("A-SUCCESS",$content))
      echo "This was a success";
  }
  else
    echo "There was an error connecting to the server";
}
 
dotestpost($num2="",$message="");
 
 ?>
[+][-]01.07.2008 at 01:36PM PST, ID: 20603474

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.07.2008 at 02:27PM PST, ID: 20603878

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.07.2008 at 02:48PM PST, ID: 20604037

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.07.2008 at 02:50PM PST, ID: 20604062

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.07.2008 at 03:08PM PST, ID: 20604210

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.07.2008 at 03:09PM PST, ID: 20604214

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.07.2008 at 03:11PM PST, ID: 20604226

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.07.2008 at 05:51PM PST, ID: 20605280

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.07.2008 at 05:51PM PST, ID: 20605286

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.07.2008 at 06:01PM PST, ID: 20605363

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.07.2008 at 06:53PM PST, ID: 20605597

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.08.2008 at 01:14AM PST, ID: 20606962

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.08.2008 at 01:21AM PST, ID: 20606990

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.08.2008 at 01:28AM PST, ID: 20607014

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.08.2008 at 01:29AM PST, ID: 20607019

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.08.2008 at 01:32AM PST, ID: 20607030

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.08.2008 at 01:39AM PST, ID: 20607061

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.08.2008 at 02:34AM PST, ID: 20607291

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.08.2008 at 02:44AM PST, ID: 20607331

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.08.2008 at 03:43AM PST, ID: 20607621

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.08.2008 at 04:06AM PST, ID: 20607767

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.08.2008 at 04:12AM PST, ID: 20607796

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.08.2008 at 04:29AM PST, ID: 20607902

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.08.2008 at 04:55AM PST, ID: 20608046

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: PHP and Databases, PHP Scripting Language, MySQL Server
Tags: PHP / MySQL
Sign Up Now!
Solution Provided By: uk52rob
Participating Experts: 2
Solution Grade: A
 
 
[+][-]01.08.2008 at 06:00AM PST, ID: 20608512

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628