Making an href from data pulled from db
| From: | Chris Grigor | Date: | Wed, 08 May 2002 12:21:20 +0000 |
| Subject: | Making an href from data pulled from db | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-19040@lists.php.net to get a copy of this message | ||
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)
<?php
mysql_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