troubleshooting Question

How to create a Hyperlink using MYSQL data to be passed into a url

Avatar of NeoAshura
NeoAshuraFlag for United Kingdom of Great Britain and Northern Ireland asked on
4 Comments1 Solution469 ViewsLast Modified:
Hi Experts,

What im trying to do is

Make some data from mysql into a hyperlink so when the hyperlink is pressed sends the hyperlink for example "0777777777" into the array and would then direct onto the next page.

so the url once the link is clicked would be something like

how would i make the 077777777 retrieved from the database into a link which sets as a variable?
this is what ive got so far. see attached

Many thanks for your help

include 'myphp.php';
$val = $_GET['val'];
$sql = "SELECT * FROM customer_details WHERE customer_name = '" . $val . "'";
$result = mysql_query($sql) or die(mysql_error() . " IN $sql"); 
$rs = mysql_query($sql);

while($row = mysql_fetch_array($rs))
   echo "<tr><td>Customer:</td><td>".$row['customer_name']."</td></tr>";
   echo "<tr><td>Mobile Number:</td><td>".$row['mobile_number']."</td></tr>";
Lukasz Chmielewski

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros