Hi Guys

I've got a slight problem and was wondering if anyone could help. I've been asked to create an online sign up sheet system. So far I have a from which enters the stuff i need to a table in a SQL database and creates a new html page with the "Event Name" as the "Page Name". I'm now trying to create a link from an Html table to this new page, but whenever I add the link the table fails to load.

<?php
$con=mysqli_connect("localhost","emuas","******","EMUAS_signUp");
// Check connection
if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }

$result = mysqli_query($con,"SELECT * FROM TEST ORDER BY ExpiryDate");

echo "<table>
<tr >
<th>Event</th>
<th>Date</th>
<th>Expires</th>
</tr>";

while($row = mysqli_fetch_array($result))
  {
  echo "<tr>";
  echo "<td> <a href='http://www.emuas.co.uk/members/sign_up_sheets/'.$row['PageName']..'html'>". $row["EventName"]. "</a> </td>";
  echo "<td>" . $row['StartDate'] . "</td>";
  echo "<td>" . $row['ExpiryDate'] . "</td>";
  echo "</tr>";
  }
echo "</table>";

mysqli_close($con);
?>

I do not know php very well so a lot of what I've done is found from google . However I can't seem to find a solution anywhere. Any help would be much appreciated

Regards
Fitzgerald

Recommended Answers

Try replacing your line 21 with;

 echo "<td> <a href='http://www.emuas.co.uk/members/sign_up_sheets/'".$row['PageName'].".'html'>".$row["EventName"]."</a> </td>";
Jump to Post
echo "<td> <a href='http://www.emuas.co.uk/members/sign_up_sheets/" . $row['PageName'] . ".html'>" . $row["EventName"] . "</a> </td>";

Too many quotes.

Jump to Post

All 6 Replies

Hmm, lemme take another closer look ...

Thanks guys works perfect now

Glad to help ...

Be a part of the DaniWeb community

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