I'm putting together a PHP/MySQL search and have run into a minor 
problem.  I have a text field to fill in a keyword on one page and that 
brings up another PHP page 
"xxxx.com/showkey.php?id=division&search=Bob%20Cobb".  Within that new 
page, you can sort the results by ID, and to do this I made the 
hyperlink go to, for example, "showkey.php3?id=project&search=$search". 
  When I do this, however, it shortens the $search variable from "Bob 
Cobb" or "Bob%20Cobb" to just "Bob".  Can anyone help?  Thanks.... Dave

$db = mysql_connect("localhost", "webmstr");
$result = mysql_query("SELECT * FROM contracts WHERE project = '$search' 
OR agency = '$search' OR location = '$search' OR description = '$search' 
OR account = '$search' OR contact = '$search' OR division = '$search' 
ORDER BY $id",$db);
echo "<table width=750 border=1 cellspacing=0 cellpadding=1>\n";
echo "<tr><td width=255><b><font face=arial size=2>
<a href=showkey.php3?id=project&search=$search>Project Title</a></td>
<td width=50><b><font face=arial size=2><a 

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to