Dear PHPers,
I am relatively new to PHP and MySQL and I need some advise.
I am trying to create a Real Estate system where Real Estate Agents post Rent, and homes for sale listings.
Each listing should have basic info of the listing and a button that allows a user to email the agent to the email address that the agent provide upon posting the listing. This is not a membership system, and I don’t need SESSIONS. But wait maybe I do?
You see the whole point of this is that I allow users to email the agent straight up no registration required click the button that toggles a small textarea where the user types text clicks the button and the button sends the message to the agent email address. And that’s it.
Now:
I have created a Database and populated it with dummy info.
Used the While loop to echo the info into a div box. But when I make the toggle button and click on it the toggle effect opens on all listings / div rather then the one the user is interested in only.
Do you follow.
How to make it that the button will correspond to that one listing ???
[php] <?php
include 'includes/config.php';
$sql = "SELECT * FROM avodaposts";
$myData = mysql_query($sql,$connection);
while($record = mysql_fetch_array($myData)){
echo '<div class="shabist-pin">';
echo '<div class="shabist-pin-header">';
echo $record['avoda_name'];
echo '</div>';
echo '<div class="shabist-title">';
echo $record['avoda_title'];
echo '</div>';
echo '<div class="shabist-tagline">';
echo $record['avoda_tagline'];
echo '</div>';
echo '<div class="shabist-location">';
echo $record['avoda_location'];
echo '</div>';
echo '<div class="shabist-details">';
echo $record['avoda_details'];
echo '</div>';
echo '</div>';
echo '<div class="shabist-details">';
echo '<button>hide</button>';
echo '<p class="gf">ffdgdfgfgdfgdf</p>';
echo '</div>';
}
mysql_close($connection);
?>
[/php]
Thank you