Hello again all and thanks for taking the time to read this!
My problem is as follows:
I have a search form which pulls data according to country, state and industry and displays the result with the company name as a link to its profile(member_profile.php). The name of the company shows up and the link works but the member_profile details I cant seem to pull across from the link clicked. (make sense at all?)
The code that shows the list of companies is like this:
Code:
<?php
session_start();
include 'dbc.php';
//select which database you want to edit
mysql_select_db("users");
$search=$_POST["search"];
//get the mysql and store them in $result
//change whatevertable to the mysql table you're using
//change whatevercolumn to the column in the table you want to search
$result = mysql_query("SELECT * FROM users WHERE country LIKE '%$country%' AND state LIKE '%$state%' AND industry LIKE '%$industry%' ORDER BY full_name DESC");
//grab all the content
while($r=mysql_fetch_array($result))
{
//the format is $variable = $r["nameofmysqlcolumn"];
//modify these to match your mysql table columns
$full_name=$r["full_name"];
$id=$r["id"];
echo '<a href="member_profile.php" target="_blank" id=' . $r['id'] . '">'.$r['full_name'].'</a><br />';
}
?>
As you can see it shows retrieves the id and full name and displays the full name as the link to member_profile.php.
The member profile page has the following code:
Code:
<?php
session_start();
require 'dbc.php';
{
$id = $_GET['id'];
$user = mysql_query("SELECT * FROM user WHERE id = '$id'");
$user=mysql_fetch_assoc($user);
}
echo "<h1>User Info</h1>";
echo "<b>Username:".$user['full_name']."<br>";
echo "<br>";
echo '<form name="backlistfrm" method="post" action="members.php">';
echo '<input type="submit" value="Back to The List">';
echo '</form>';
echo "<br>";
?>
the name does not show up based on that code?
Does anybody have ideas where Im messing up
Thanks again,
Clint