My site is programmed with php and javascript. I have a search button which it searches records from my database. I have two different programming codes into the same file which retrieve data, the first one retrieves emails in the text area and the other retrieves names and other details. The one which retrieves emails work fine but the other doesn’t retrieve data until I click search button twice when the file first loads. After clicking the search button twice at the first time, the problem disappears and it works fine for the rest of the searches. The one which retrieves email is programmed with pure php but the other actually uses javascript (updateDIV()) and pull other php file. It gets the userid first and then uses that userid to fetch other records. Below is the sample code
Code:
<?php
onclick="updateDIV('viewcontact.php?UID=<?php echo $user['contactID'];?>&format=detail~user<?php echo $user['contactID'];?>content');">
?>
Comment