Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8806705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:11:30+00:00 2026-06-14T02:11:30+00:00

Second question in two days. Same script. In the while loop there is two

  • 0

Second question in two days. Same script. In the while loop there is two rows that build two table cells. The first one that’s not out commented is working and the result ends up where it suppose to be. The out commented one is not working and i can not see why.

I have checked the name of the column in the mysql table and that’s correct. About 10 columns from the table works. But the last 9 don’t. The only thing i can see is that the names of the mysql columns are longer. Can the names be too long?

The ajax call is not making an error. And when I make the Table border =1 i can se that there is a cell but nothing in it. When they are both not out commented the second cancels out the first. But on it’s own the first give a result.

Any Ideas?

Sorry for bad grammar or if the solutions was to easy.

Any suggestions are welcome.

getdata.inc.php:

//Output results
if(!$facebook)
{
    mysql_close();
    echo json_encode('There was an error running the query: ' . mysql_error());
}
elseif(!mysql_num_rows($facebook))
{
    mysql_close();
    echo json_encode('No results returned');
}
else
{
    $output_string = '';
    $output_string .=  '<table border="0">';
    while($row = mysql_fetch_assoc($facebook))
    {

        $output_string .= '<tr>';
        $output_string .= '<td>'.$row['sombem_profiler_customers_first_name'].'</td>';
        //$output_string .= '<td>'.$row['sombem_profiler_customers_adress_sending_street'].'</td>';
        $output_string .= '</tr>';
    }
    $output_string .= '</table>';
}

mysql_close();
// This echo for jquery 
//$output_string = $_POST['personalNumber'];
echo json_encode($output_string);
?>

ajax.js:

function ajaxCall(){

var pnumber = document.getElementById('search-personalNumber').value;

$.ajax({
    url: 'db/getdata.inc.php',
    type:'POST',
    dataType: 'json',
    data: { personalNumber: pnumber },
    success: function(output_string){
        $('#result_table').append(output_string);
    },
    error: function (xhr, ajaxOptions, thrownError) {
    alert(xhr.status);
    alert(thrownError);
  }
});
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:11:31+00:00Added an answer on June 14, 2026 at 2:11 am

    It was the special characters that was the problem. I found this script on the internet.

    function umlaute($text){ 
        $returnvalue=""; 
        for($i=0;$i<strlen($text);$i++){ 
            $teil=hexdec(rawurlencode(substr($text, $i, 1))); 
            if($teil<32||$teil>1114111){ 
                $returnvalue.=substr($text, $i, 1); 
            }else{ 
                $returnvalue.="&#".$teil.";"; 
            } 
        } 
        return $returnvalue; 
    } 
    

    and

    $output_string .= '<td>'.umlaute($row['comhem_profiler_customers_adress_sending_street']).'</td>';
    

    This converted the charcters to html variants. Thanks for sending me on the right path. Cheers!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Second question in two days on this same sort of topic. I currently am
Ok, second question in two days... i am probably making a newb mistake here
Two questions here, second is a little more complicated than first. 1 - I
This is my second question on Bamboo ( My First One ). My understanding
It's my second question, one after another. That's the problem with assembly (x86 -
This is my second question, and I’m hoping to resolve an issue that I
I faced a question in an interview two days back regarding optimally finding the
I have two sets of text files. First set is in AA folder. Second
First of all apologise for creating my third Javascript question in as many days
Two days ago I wrote this question: How can I retrieve an object on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.