IC SunsetThe developerWorks Connections platform will be sunset on December 31, 2019. On January 1, 2020, this community and its apps will no longer be available. More details available on our FAQ.
Topic
  • 3 replies
  • Latest Post - ‏2014-09-20T11:44:05Z by jitupkp
Pasterstroodle
Pasterstroodle
1 Post

Pinned topic Ajax Loading Problem

‏2012-03-21T22:41:29Z |
The following code succesfully refreshes the #content div, but in doing so it clear the $name variable which is passed from a previous page. How can I reload the div without losing my variable? The following is the code in "thispage.php". Any help would be appreciated!

<html>
<head>

<script>
setInterval(function() {
$('#content').load('thispage.php #content');
}, 3000);
</script>

</head>
<body>

<?php

include 'php/db.php';

$name = $_POST;
echo '<div id="content">';

$ad= mysql_one_data("SELECT ad FROM tab1 WHERE name = '$name'");

echo 'Address ' .$ad. ' <br>';

echo '</div>';

?>

</body>
</html>
Updated on 2012-03-22T08:09:35Z at 2012-03-22T08:09:35Z by zeronc
  • zeronc
    zeronc
    1 Post

    Re: Ajax Loading Problem

    ‏2012-03-22T08:09:35Z  
    I am very curious about this question?

    maç özetleri
  • jitupkp
    jitupkp
    104 Posts

    Re: Ajax Loading Problem

    ‏2014-09-20T11:43:45Z  

    get more help

    http://techgurulab.com/course/ajax-quiz-online/

  • jitupkp
    jitupkp
    104 Posts

    Re: Ajax Loading Problem

    ‏2014-09-20T11:44:05Z  
    • zeronc
    • ‏2012-03-22T08:09:35Z
    I am very curious about this question?

    maç özetleri

    get more help

    http://techgurulab.com/course/ajax-quiz-online/