Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7618795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:29:50+00:00 2026-05-31T03:29:50+00:00

i am creating a website with a database attached using netbeans, and MySQL. I

  • 0

i am creating a website with a database attached using netbeans, and MySQL.
I have written a piece of code for information submitted in a form on the website to be entered into the database, however the actual input is not inserted into the database, only ‘$_POST[username]’,’$_POST[date]’,’$_POST[message1]’,’$_POST[acknowledgment]’… i want these values to be the values the user inputs.

can anyone help me to fix this or suggest anything please

<%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<%-- 
    Document   : teacher1
    Created on : 07-Mar-2012, 02:36:31
    Author     : 
--%><sql:update var="messages" dataSource="jdbc/noticeboard">
    INSERT INTO messages (username, postedon, message, acknowledgment)
VALUES ('$_POST[username]','$_POST[date]','$_POST[message1]','$_POST[acknowledgment]')
</sql:update>



<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>    <body>
        <h1>Hello World!</h1>

        <h1>Submit your notices below:</h1>

        <form name="messages" action="teacher1messages.jsp" method="POST"     enctype="multipart/form-data">
        <h1>Username:</h1>
        <input type="text" name="username" value="eg.cs09kkk1" />
            <h1>Date of notice:</h1>
            <input type="text" name="date" value="dd/mm/yy" />
            <h1>Notice:</h1>
            <textarea name="message1" rows="4" cols="20">
[Type your notices here]
            </textarea>
            <input type="submit" value="submit" name="submit" />
            <h1>Acknowledgment:</h1>
            <input type="text" name="acknowledgment" value="" />
        </form>


    </body>
</html>

thank you!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:29:51+00:00Added an answer on May 31, 2026 at 3:29 am

    $_POST[username] notation is for PHP I guess. Use something like this :

    <sql:update var="messages" dataSource="jdbc/noticeboard">
        INSERT INTO messages (username, postedon, message, acknowledgment)
        VALUES ('<%=request.getParameter("username")%>',
            '<%=request.getParameter("date")%>',
            '<%=request.getParameter("message1")%>',
            '<%=request.getParameter("acknowledgment")%>')
    </sql:update>
    

    Update :

    Try some this also, i’m not sure whether could parse the parameters.

    <sql:update var="messages" dataSource="jdbc/noticeboard">
    INSERT INTO messages (username, postedon, message, acknowledgment)
    VALUES (?,?,?,?)
        <sql:param value='<%=request.getParameter("username")%>'/>
        <sql:param value='<%=request.getParameter("date")%>'/>
        <sql:param value='<%=request.getParameter("message1")%>'/>
        <sql:param value='<%=request.getParameter("acknowledgment")%>'/>
    </sql:update>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an events website using PHP. I have a database with an events
I'm creating a website in ASP.net and using a MySQL database. What would you
If created a website using MVC3 and have a database attached to it. They
I'm creating a website that interfaces with a .mdb database. I have a field
I am creating a website using JavaScript/ASP.NET/C#/CSS/HTML/Compact SQL server. I have the majority of
I am creating a data driven website with mvc3 using EF and code first.
I am creating a PHP website connected to a MySQL database. Next I will
I am creating a website using LINQ database on Visual studio 2010 i am
I am creating a website using Java EE. I have created a table in
I'm creating a website(PHP + MySQL based) with a list events. I currently have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.