dpsfay2510 2018-03-31 16:14
浏览 69

图像没有加载在PHP中

[enter link description here][1] i have table events in my database with information of all different events

 CREATE TABLE IF NOT EXISTS `event` (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `descrption` varchar(255) NOT NULL,
  `location` varchar(255) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `organizer` varchar(255) NOT NULL,
  `website` varchar(100) NOT NULL,
  `logo` varchar(255) NOT NULL,
  `price_of_tickets` int(255) NOT NULL,
  `no_of_tickets` int(255) NOT NULL,
  `name` varchar(20) NOT NULL,
  `category` varchar(255) NOT NULL,
  `mail` varchar(25) NOT NULL,
  `mobile` int(20) NOT NULL,
  `services` varchar(50) NOT NULL,
  `status` int(20) NOT NULL,
  PRIMARY KEY (`id`)
)

now i want a single row to be fetched from database when user clicks a event page and same way if user clicks some other event a different row must be fetched i tried doing it by taking the id of table but couldn't succeed

<div class="blog-page">
      <div class="container">
        <div class="row"> 

          <!--Blog Block Start-->
          <div class="col-md-9 col-sm-8">
            <div class="blog-details blog-post">
              <div class="featured-img">
                <div class="event-counter"></div>
                <img src="images/ef-1.jpg" alt=""> </div>
              <div class="blog-details-text">

              <div class="post-title"> <span class="post-date"> <?php echo $row['2'] ?></strong> </span>
                  <h5><a href="#"><?php echo $row['title'];?></a></h5>
                </div>

              <ul class="post-meta">
                  <li><a href="#"><i class="fa fa-user" aria-hidden="true"><?php echo $row['organizer'] ?></a></li>
                  <li><i class="fa fa-folder-open" aria-hidden="true"></i><a href="#"><?php echo $row['category'] ?></a></li>
                  <li><a href="#"><i class="fa fa-comments" aria-hidden="true"></i> 206 Comments</a></li>
                  <li><a href="#"><i class="fa fa-heart" aria-hidden="true"></i> 240 Likes</a></li>
                </ul>


              <?php echo $row['descrption'] ?>

                <blockquote>
                  <p>The gloves were commonly used by health care workers in the United States but can harm both patients and doctors. The use of powdered latex gloves is already falling. According to the FDA, right now only six registered manufacturers of powdered latex gloves are left in the U.S.</p>
                  <a class="authorOrTitle" href="#"><span>―</span> Peter Hakim, president emeritus at the Inter-American Dialogue</a> </blockquote>
                <p>More this in this sensational after by woolly jeez while globefish incessantly vulture overpaid hare tidy fumbling after far dramatic that surely aside one much ferret wolf at sheep one as some yikes onto one while yikes spoiled one unskillfully magically wow frugal as handsomely contrite popularly laboriously possessively querulously misheard activated goodness honey wow less due and distant that expedient therefore and raffish devotedly.</p>
                <p>Yikes decided grizzly where slept jeez spread this after that chameleon unreceptive one ferociously in dear hooted more cheerfully yikes ocelot behind a alas slung bid jeepers cracked grumbled goodness cardinally far whispered this that wombat leopard soothing one much one the in salamander versus cowered some far rebuilt banefully on.</p>
                <h6>More this in this sensational after.</h6>
                <figure class="alignleft"> <img src="images/bd2.jpg" alt="The Pulpit Rock">
                  <figcaption>The gloves were commonly used by health. <a href="#">― Photo By Eric Knowles</a> </figcaption>
                </figure>
                <p>More this in this sensational after by woolly jeez while globefish incessantly vulture overpaid hare tidy fumbling after far dramatic that surely aside one much ferret wolf at sheep one as some yikes onto one while yikes spoiled one unskillfully magically wow frugal as handsomely contrite popularly laboriously possessively querulously misheard activated goodness honey wow less due and distant that expedient therefore and raffish devotedly.</p>
              </div>
  • 写回答

3条回答 默认 最新

  • dongwei4096 2018-03-31 16:30
    关注

    Add the ID to your query condition:

    $query= "select * from event where id = {$r}; ";
    
    评论

报告相同问题?

悬赏问题

  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值