Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 28th, 2009, 12:02 PM
Authorized User
Join Date: Aug 2009
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default Member profile advice.....?

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:

include 'dbc.php';

//select which database you want to edit

//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

   //the format is $variable = $r["nameofmysqlcolumn"];
   //modify these to match your mysql table columns
   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:

require 'dbc.php';

$id = $_GET['id'];
$user = mysql_query("SELECT * FROM user WHERE id = '$id'");


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,
Reply With Quote
  #2 (permalink)  
Old September 29th, 2009, 04:54 AM
Authorized User
Join Date: Aug 2009
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts

Never mind....thats what I get for working late at night :D
Its working now. Thanks for taking thetime to read it either way
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Profile in BLL Faith ASP.NET 2.0 Professional 3 August 18th, 2008 10:57 AM
Profile properties depending on the member type mecca BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 September 24th, 2007 04:43 PM
'Address' is not a member of 'Profile' FredPi BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 6 January 30th, 2007 12:48 PM
how to use shoppingcart without profile? hertendreef ASP.NET 2.0 Basics 6 January 11th, 2007 05:16 AM
delete profile ?? n/a Forum and Wrox.com Feedback 6 August 8th, 2003 03:24 PM

All times are GMT -4. The time now is 03:25 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.