I have a query that is returning customer data. I want to pass the $row Value on using the _GET _POST superglobal in two different links one that goes to a page to edit users profile and one that edits the users order preferences. I can get one or the other to work but when I include them both the results get weird ... I get the text for the second link linked to the first links url. Any Ideas why ...
Thanks,

Eric

while ($row = mysqli_fetch_array($result)) { 
  
      $FirstName=$row["FirstName"];
	  $LastName=$row["LastName"];
	  $BillName=$row["BillName"];
	  $JoinDate=$row["JoinDate"];
	  $VisitorID=$row["VisitorID"];
          $UserName=$row["UserName"];
	 
	  
    // Display the Users data
	echo '<fieldset><legend>Account details for username: <strong>' . $row['UserName'] . '</legend>';
	echo '<p>Join Date: <strong>' . date("m-d-Y", strtotime($row['JoinDate'])) . '</strong></p>';
	echo '<p>Contact Name: <strong>' . $row['LastName'] . ' , ' .$row['FirstName'] . '</strong></p>';
	echo '<p>Business Name: <strong>' . $row['BillName'] . '</strong></p>';
// Create Edit Order Form Link
	echo '<p><a href="create_order_profile_admin.php?VisitorID=' . $row['VisitorID'] . '>Customize This Clients Order Form</a></p>';
// Create Edit User Profile Link	
echo '<p><a href="edit_profile_admin.php?VisitorID=' . $row['VisitorID'] . '>Edit This Clients Billing Details</a></p>';

	echo '</fieldset><br />';

Recommended Answers

All 2 Replies

Your <a href=""> double quotes weren't closed:

<?php
while ($row = mysqli_fetch_array($result)) { 
	$FirstName = $row["FirstName"];
	$LastName = $row["LastName"];
	$BillName = $row["BillName"];
	$JoinDate = $row["JoinDate"];
	$VisitorID = $row["VisitorID"];
    $UserName = $row["UserName"];
	 
    // Display the Users data
	echo '<fieldset><legend>Account details for username: <strong>' . $UserName . '</strong></legend>';
	echo '<p>Join Date: <strong>' . date("m-d-Y", strtotime($JoinDate)) . '</strong></p>';
	echo '<p>Contact Name: <strong>' . $LastName . ' , ' . $FirstName . '</strong></p>';
	echo '<p>Business Name: <strong>' . $BillName . '</strong></p>';
	
	// Create Edit Order Form Link
	echo '<p><a href="create_order_profile_admin.php?VisitorID=' . $VisitorID . '">Customize This Clients Order Form</a></p>';
	
	// Create Edit User Profile Link	
	echo '<p><a href="edit_profile_admin.php?VisitorID=' . $VisitorID . '">Edit This Clients Billing Details</a></p>';

	echo '</fieldset><br />';
}
?>

Thanks for pointing that out ... :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.