Hi, I am grabbing data from my table and using that data to populate a link inside a string like this:
$sql = "Select * from my_table";
while ($row = mysql_fetch_array($result)){
$Nav = $row['last_name'];
$display_form .= <a href=modify.php?sel=$Nav>$Nav</a>
<form method=post action=add.php?sel=$Nav>
.
.
.
"; }
Now everything works fine if $Nav is only one word, but if $Nav is two words or more (spaces), it does not work. I tried doing this:
<a href=modify.php?sel='$Nav'>
and this:
<a href=modify.php?sel=\"$Nav\">
But it doesn't work. What do I have to do here? By the way, I can not strip the spaces from $Nav because I need to use it as is when the script loads after clicking the link or hitting the form submission button.
Thanks for any help