我一直试图在正在为我的最后一年项目创建的网站上构建活动页面。我希望主页事件页面显示不太详细的标题事件列表。 事件标题应该作为链接打开一个页面,显示用户决定点击或选择的事件的更详细描述。 我设法创建每个事件标题的链接,但似乎无法将其正确链接到显示所选事件的详细说明的页面。显示更多详细信息的链接
我event.php页面有代码:
<?php
include'session.php';
include"database.php";
//Retrieves data from MySQL
$data = mysql_query("SELECT * FROM employees") or die(mysql_error());
//Puts it into an array
while($info = mysql_fetch_array($data))
{
//Outputs the image and other data
//Echo "<img src=http://localhost/trial_Admin/events/" .$info['photo'] ."> <br>";
Echo "<b>Name:</b> <a href='more_details.php/?name='$name''/ >".$info['name']. "</a><br>";
Echo "<b>Email:</b> ".$info['email'] . " <br>";
Echo "<b>Phone:</b> ".$info['phone'] . " <hr>";
}
?>
而more_details.php
<?php
include'session.php';
include"database.php";
$name=$_GET['name'];
//Retrieves data from MySQL
$data = mysql_query("SELECT * FROM employees WHERE name='$name'") or die(mysql_error());
//Puts it into an array
while($info = mysql_fetch_array($data))
{
//Outputs the image and other data
Echo "<img src=http://localhost/trial_Admin/events/" .$info['photo'] ."> <br>";
Echo "<b>Name:</b> <a href=''/ >".$info['name']. "</a><br>";
Echo "<b>Email:</b> ".$info['email'] . " <br>";
Echo "<b>Phone:</b> ".$info['phone'] . " <hr>";
}
?>
我真的需要你的帮助来解决这个问题。我的想法是创建一个类似于Eventbrite网站的活动页面。 – 2012-08-07 09:45:43