Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Linux, Apache, MySQL, PHP
  4. I have a trouble about query_insert().

I have a trouble about query_insert().

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
phphtmldatabasehelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 陳 Offline
    陳 Offline
    陳建勳
    wrote on last edited by
    #1

    I want to make a messageboard with php. but I cant't insert data to database. I dont know what's wrong in my code??? Can someone help me please?

    <html>
    <head>
    <title> 留言板 </title>
    </head>

    <body>

    請輸入名稱: <input type="text" name="name" />
    請輸入標題: <input type="text" name="title" />
    請輸入留言: <input type="text" name="message" />
    請輸入電子郵件: <input type="text" name="email" />
    <input type="submit" value="送出留言" name="post" />
    </form>

    </body>
    </html>

    Z 1 Reply Last reply
    0
    • 陳 陳建勳

      I want to make a messageboard with php. but I cant't insert data to database. I dont know what's wrong in my code??? Can someone help me please?

      <html>
      <head>
      <title> 留言板 </title>
      </head>

      <body>

      請輸入名稱: <input type="text" name="name" />
      請輸入標題: <input type="text" name="title" />
      請輸入留言: <input type="text" name="message" />
      請輸入電子郵件: <input type="text" name="email" />
      <input type="submit" value="送出留言" name="post" />
      </form>

      </body>
      </html>

      Z Offline
      Z Offline
      ziggyfish
      wrote on last edited by
      #2

      replace

      mysql_query($query_insert);

      with

      mysql_query($query_insert) or die('Error occured: ' . mysql_error());

      Than reply with the output.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups