Re: Making an href from data pulled from db
| From: | Bogdan Stancescu | Date: | Wed, 08 May 2002 15:05:16 +0000 |
| Subject: | Re: Making an href from data pulled from db | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-19043@lists.php.net to get a copy of this message | ||
If your problem is the print statement (you don't say what the problem is), then you should go with
print ("<a href=get.php?ticket_id=".$ticket_id["ticket_id"]."\n</a>");
Bogdan
Chris Grigor wrote:
Howdi All More than likely this is an easy thing, but yet I admit that the brain is a little slow so Im asking for some help here I run a script which pulls data from a database and then prints the result (see below) <?phpmysql_connect("localhost", "username", "password") or die("couldnt connect"); mysql_select_db("call_manage");$query = "SELECT company_name, ticket_id, date, from log_request where company_name like '%$search%'"; $result = mysql_query($query);while (($row = mysql_fetch_array($result, MYSQL_ASSOC)))# print ("<a href=get.php?ticket_id=$ticket_id->ticket_id\n</a>");printf ("<center>Company: %s\n Ticket id: %s\n Date: %s\n", $row["company_name"], $row["ticket_id"], $row["date"]);mysql_free_result($result);?> I would like to get each one that it prints to have an href that submits its ticket_id as the value to another script..... eg <a href="http://webserver/get_info_on_that_ticket_from_database?search=$ticket_id> thankyou in advance Chris