haresh.chugani 0 Newbie Poster
<?
//Database Connection
$dbcnx = @mysql_connect('localhost', 'Haresh', 'iwdpwd');
mysql_select_db('iwddb',$dbcnx);
$memberidresult = @mysql_query('SELECT * FROM members');
//db hase only 2 fields, memberid & name

while ($memberarray = mysql_fetch_array($memberidresult)) 
{
	$memberid = $memberarray['memberid'];
	echo '<p>The member id is ' . $memberid . '</p>';

	$namelink = $memberarray['name'];
	echo '<p>
	<a href="http://www.xyz.com/x/?x=c&amp;z=s&amp;v=1801659&amp;k=' . $memberid . '" target="_blank">Name Link</a>
	</p>';
}

//Till here it is fine, we are able to pass $memberid's actual VALUE in the url


// ERROR STARTS HERE when we insert the above actual link in the database as above & call it from there.
echo '<p>The name link via DB ' . $namelink . '</p>';
// ERROR: When $namelink is called via DB, $memberid is not getting passed and is called as (' . $memberid . ') instead of its value
// pls help. Thanks.

?>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.