InMotion Hosting Support Center

In this tutorial series, we're showing you how to interact with a MySQL Database using php. We're creating a simple 2 page website that allows users to post comments on either page, and then shows all comments that have been posted. In our previous article we created a database and setup a table to hold those comments, and now in this article we'll setup a HTML form that allows a user to enter comments.

A quick introduction to HTML Forms

Gathering the Form Data

An HTML form allows a user to type data into a website, and then it submits the data to another page for processing. For example, if you fill out a comment on a website and hit submit, everything that you typed in is submitted to a script on the server that writes your comment to a database.

HTML forms can handle quite a few different forms of input. For example, they can handle:

  • Text Boxes:
  • Radio Buttons
    Option 1
    Option 2
  • Checkboxes
    Selection 1
    Selection 2
  • ... and more!

Submitting the Form Data

After the user has filled in the above data and clicks a submit button, it will send all of their data to another script for processing. It can either send the data back to the same page for processing, or it can send it to a completely different script to handle the processing.

When the data is passed to a script for processing, it can be passed using either GET or POST. When using GET, all the data is passed in the url, such as:
GET
domain.com/page.php?name=brad&email=brad@domain.com
As you can see, my name and email address is passed in the URL. If you use POST (instead of get), the URL will simple read:
POST
domain.com/page.php
... and my name and email address will be passed behind the scenes.

Our Example Contact Form

Because our comments form is going to be relatively simple, we will be using text boxes for most of the input. Below is our contact form and what the contact form will look like:

<form method='post'>
  NAME: <input type='text' name='name' id='name' /><br />

  Email: <input type='text' name='email' id='email' /><br />

  Website: <input type='text' name='website' id='website' /><br />

  Comment:<br />
  <textarea name='comment' id='comment'></textarea><br />

  <input type='hidden' name='articleid' id='articleid' value='<? echo $_GET["id"]; ?>' />

  <input type='submit' value='Submit' />  
</form>

NAME:
Email:
Website:
Comment:

To keep our example straight forward, the form above does not include much formatting. In a real life scenario, you could use css and other html to elements to make the comment form a bit more user friendly.

When looking at the above form, pay attention to the following:

  1. In the form tag, we set the method to post (vs get).
  2. We have a hidden value that will hold the article's id. We need to know whether the comment is for page 1 or page 2. The value of that articleid will be grabbed using PHP and $_GET.
    For example, we'll have two pages:
    PHPandMySQL.inmotiontesting.com/page1.php?id=1
    PHPandMySQL.inmotiontesting.com/page2.php?id=2
    Notice in the URLs that one has id=1 and one has id=2. We will use PHP to grab this data so that we know which page the comment should belong to.

When the user fills out the information and hits submit, it will POST the data back to the same page. In our next article, we'll show you how to process that data and put it into the database.

Continued Education in Course 205: Using PHP to create dynamic pages
You are viewing Section 3: Creating a simple HTML Form to get user comments
Section 2: Setting up a database to handle form data from a website
Section 4: Using the php include function to reuse code

Support Center Login

Social Media Login

   
Social Login Joomla

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2014-03-06 7:37 am

hallo, please help me, i get invalid article id, i already follow all the instruction and no such php?id=1 at my page, im using phpadmin v 5.1,

without article id, nothing i can progress. tq

n/a Points
2015-01-13 10:11 pm

Hey Guys,

Great article, do you have a simple code for setting up something like this question and comment section?

 

Staff
28,219 Points
2015-01-15 11:39 am
Hello Melissa,

We currently do not have an article for that format, but it does follow the same principles. We are happy to assist with individual questions as you work towards that. This may be a project we take on in the future, however.

Kindest Regards,
Scott M
n/a Points
2015-07-10 9:25 am

Nice

n/a Points
2014-03-06 8:38 am

Very nicely covered and it works too.  Many thanks.  Let me if you any such more tutorials.

n/a Points
2014-03-09 1:39 am

super tips

n/a Points
2014-03-09 3:07 am

Hello Sir/mam,

Can you pls provide me with the code for creating discussion forum.

Thank you

Staff
11,186 Points
2014-03-10 10:51 am
Hello Abhishek,

Creating a discussion forum is much more complex. My recommendation would be to use something like PHPBB to do so.

Hello Sam A,

To use a custom alignment, you would need to use some custom CSS to show them appropriately.
n/a Points
2014-09-19 4:13 am

i want to learn javascript easily can you teach me the basic functions??

Staff
17,061 Points
2014-09-30 10:39 am
Hello Reojass,

Thank you for your question. We are happy to help, but there are many resources online for learning Javascript.

Here are some of the most popular resources for learning Javascript:

If you have any further questions, feel free to post them below.

Thank you,
John-Paul
n/a Points
2015-07-13 7:55 am

nice

n/a Points
2014-03-10 9:16 am

Hi ,

I am trying put the comment box is right of the form. after the name and email feilds..

Please help me..

Thanks.

 

n/a Points
2014-04-07 5:05 am

hello sir/mam

can you pls provide me with the code for posting comment which are add below.

Thank you

Staff
28,219 Points
2014-04-07 10:38 am
Hello bhaskar,

We currently do not have general code samples for creating a comment section. This type of feature is usually included as part of the Content Management System such as WordPress, Joomla, Drupal, etc. Creating a comment feature would take much more coding and database interaction. You may want to check and see if there is such a feature for your program. Also, if it uses modules and plugins, there may be one for comments.

Kindest Regards,
Scott M
n/a Points
2014-04-09 10:22 am

Thanks for the Help !!!!!!!!!!!!!!!!!! :)

n/a Points
2014-04-16 7:20 am

hello sir/mam

 how can sent a comment/text one page to another page without using sesssion is any diffrent way to sent some text one page to another page.

 

Staff
25,386 Points
2014-04-16 12:24 pm
Hello Suman,

Thanks for the question. This kind of thing can be done many different ways depending on the code that you're using. We can't always provide you the specific code, but hopefully, this link provides a PHP solution that meets your needs. You can find a tutorial on passing post data here.

Regards,
Arnel C.
n/a Points
2014-05-13 8:16 am

I have followed your tutorials deligently and implemented all the steps, but got stock when comments from my example pages where not recorded at the database. every other thing works well. How do i get comment register at the database?

Staff
17,061 Points
2014-05-13 11:16 am
Hello charlo,

Thank you for your question. Did you complete Sections 2-6 in our series on Using PHP to create dynamic pages?

If you have any further questions, feel free to post them below.
Thank you,

-John-Paul
n/a Points
2014-07-25 5:42 am

Below is the php code that give the error message: Notice: Undefined index: comment in C:\xampp\htdocs\testnew\manage_comments.php on line 16

Please help.

<?php

if( $_POST )

{

$con = mysql_connect("localhost", "root", "magicfouru");

 

if(!$con)

{

die('Could not connect:' . mysql_error());

}

 

mysql_select_db("testnew", $con);

 

$users_name = $_POST['name'];

$users_email = $_POST['email'];

$users_website = $_POST['website'];

$users_comment = $_POST['comment'];

 

$users_name = mysql_real_escape_string($users_name);

$users_email = mysql_real_escape_string($users_email);

$users_website = mysql_real_escape_string($users_website);

$users_comment = mysql_real_escape_string($users_comment);

 

$articleid = $_GET['id'];

if( ! is_numeric($articleid) )

die('invalid article id');

 

$query = "INSERT INTO `testnew`.`comments` (`id`, `name`, `email`, 

`website`, `comment`, `timestamp`, `articleid`) VALUES (NULL, '$users_name', 

'$users_email', '$users_website', '$users_comment', 

CURRENT_TIMESTAMP, '$articleid');";

 

 

mysql_query($query);

 

echo "<h2>Thank you for your comment!</h2>";

 

mysql_close($con);

}

?>

Staff
17,061 Points
2014-07-25 10:40 am
Hello Charlo,

Thank you for providing detailed information. This may be caused by a user leaving nothing in the comment field.

Try using something like this, which will just fill in the field:

if ($_POST['comment'] != "")
$users_comment = $_POST['comment'];
else
$users_comment = "Your comment was blank!";


I hope this helps. If you have any further questions, feel free to post them below.
Thank you,

-John-Paul
n/a Points
2014-07-27 2:56 am

Thank you for your response.

I have used the code provided and have this parse error: syntax error, unexpected ')' in C/xampp/htdocs/testnew/magae_comments.php on line 18. Is there something I did not do well? Please help me. Thank you.

Staff
28,219 Points
2014-07-27 6:29 pm
Hello Charlo,

Without seeing your exact code, I cannot tell you exactly what to change. However, check all your parentheses to ensure they are in pairs, for ever ( you must have a ). If you have an odd number, then you will experience an error like this.

Kindest Regards,
Scott M
n/a Points
2014-05-30 3:29 am

hello sir can u help me to validate a login section like username and password validation using javascript function in a html page

Staff
9,968 Points
2014-05-30 6:04 am
Hello Sunny, and thanks for your comment.

What did you want to validate your username and password sections against, just that they were filled in? You might have better luck with simply using HTML5 form validation that is now available. For instance you could just use the required option like this:

<input type="text" name="username" required>


For password validation, you might want to try something using a combination of both like this password validation using regular expressions and HTML5.

Please let us know if you had any other questions.

- Jacob
n/a Points
2014-06-25 7:13 am

nice man..good work..i like this article

n/a Points
2014-07-09 11:40 am
Include videos and some other interactive media.
Staff
9,968 Points
2014-07-14 3:34 pm
Hello Gerard, and thank you for your suggestion.

I'll go ahead and add this article to our list of ones that could use an update with some video.

Thanks again.

- Jacob
n/a Points
2014-07-21 2:20 am

hi, 

  please sned me the following code Abt PHp 

Staff
17,061 Points
2014-07-21 10:19 am
Hello Bala,

Thank you for contacting us today. We are happy to help, but I am not sure what you asking for.

Please provide more detailed information, so we can assist you further.

If you have any further questions, feel free to post them below.
Thank you,

-John-Paul
n/a Points
2014-07-23 2:09 am

hello,

    i need to create one Contact us Page using PHP please sendme the sample code 

Staff
5,399 Points
2014-07-23 7:25 am
Hi Bala,

If you need sample code for creating a contact page, I recommend reading the tutorial series we have here: 205: Using PHP to create dynamic pages

You may also find it easier watching a video on how to use PHPMailer or this article about using FormMail.
n/a Points
2014-07-24 12:46 am

thank u verymuch ,its very use full thank u so much  and nice to meet u 

n/a Points
2014-08-17 12:34 am

nice..

n/a Points
2014-07-21 3:24 am

helo please help me?

i can't manage to connect my website to mysq. i install wamp software and created a database that i want to connect to my website but i can't able to connect it help me

Staff
28,219 Points
2014-07-21 9:20 am
Hello Eskinder,

To connect your php to a myswl database, you will want to take a look at our article on Using PHP to insert Mysql

Kindest Regards,
Scott M
n/a Points
2014-07-24 9:40 am

Hello sir,

  i want a code that when i click a submit button it should be submitted and i should get a another comment box to post oyhers also with reply like your comment box.

Staff
11,186 Points
2014-07-24 10:35 am
What you are describing would need a significant amount of code within both the comment box, as well as the way the page is displayed in which we unfortunately cannot develop this entire solution for you.
One known commenting system is Disqus which will handle all of your commenting code for you. Outside of this, you may want to speak to a developer to have it custom coded for you.
n/a Points
2014-07-24 2:13 pm

Thank so much for your kind reply. I did followed the lessons 2-6 through to the final stage , but yet comment from the pages does not register in database and does not show on the pages. Instead I got this Notice: Undefined index: comment in C:/xampp/htdocs/testnew/manage_comments.php on line 16 How do I get this resolve? Please help.

Staff
11,186 Points
2014-07-24 2:21 pm
To identify the issue, could you provide us with the code that you have on line 16 as well as the surrounding lines?
n/a Points
2014-08-09 2:34 am

I might have missed something... its getting really late and ive been staring at code too much for some that doesn't know what they're doing. 

My contact form keeps sending two emails every submission and the context of it is.

 

Message from   Address:   Phone:  Email:  Fax: fax   Red Maple Acer:   Chinese Pistache:   Raywood Ash:

With no date being received from the form.  Any advice is appreciated.  I copied the codes from this support site and use it in conjuction with a dreamweaver php page...

 

Thanks,

n/a Points
2014-08-09 7:55 am
well done, keep it up!
n/a Points
2014-08-09 12:24 pm

I might have missed something... its getting really late and ive been staring at code too much for some that doesn't know what they're doing. 

My contact form keeps sending two emails every submission and the context of it is.

 

Message from   Address:   Phone:  Email:  Fax: fax   Red Maple Acer:   Chinese Pistache:   Raywood Ash:

With no date being received from the form.  Any advice is appreciated.  I copied the codes from this support site and use it in conjuction with a dreamweaver php page...

 

Thanks,

Staff
28,219 Points
2014-08-11 11:05 am
Hello Chris,

This particular article has no code related to sending an email. If you can link to the article where you got our code for the email processing we may be able to take a look and see if there is a mistake where it sends two emails.

Kindest Regards,
Scott M
n/a Points
2014-08-17 2:25 am

cool

n/a Points
2014-08-17 7:15 am
It's already very good.
n/a Points
2014-08-26 11:48 am

nice tutorial how can i make a registration and login form

in html using php and mysSQL

Staff
28,219 Points
2014-08-26 12:11 pm
Hello Ryan,

You can use the same information to create a registration form. Do remember that each page will need to check to see if the visitor is logged on so it will know what information to display.

Kindest Regards,
Scott M
n/a Points
2014-09-04 1:19 am

thank you for sharing.........

n/a Points
2014-09-08 4:29 am

Respected Sir,

 

I want to recieve comments of people in my personal email. how could i do that..

Regards

Awal Khan

Staff
17,061 Points
2014-09-08 9:33 am
Hello Awal,

Thank you for contacting us. Following the above guide will allow people to fill out a page, and it will send the information to your email. Just be sure to update the email information as suggested above.

Also, let us know if you are using a CMS such as WordPress, Joomla, Drupal, or Concrete5. We can then give you an option specific to your software.

If you have any further questions, feel free to post them below.

Thank you,
John-Paul
n/a Points
2014-10-01 9:03 am

kindly provide a php for replaying a post

 

Staff
28,219 Points
2014-10-01 9:06 am
Hello Rocky,

We do not provide custom coding requests, but do try and answer questions you may have. Also, as this is not the topic of the article, please ask a new question here so either we or another community member may be able to better assist.

Kindest Regards,
Scott M
n/a Points
2014-09-25 6:35 am

hii Friends

how to make a comment box ?

when we set any comment in comment box and press comment button then how to show it top of comment box ?

Staff
11,186 Points
2014-09-25 11:02 am
Within this article, there is a link to the bottom in which it will take you to the next article in the series and eventually ends up at how to grab the comments from the database.

I recommend continuing with this series for a full tutorial on implementing a commenting system.
n/a Points
2014-09-26 1:04 pm

I need to know I have created a form in html with php, when sumeone submit. Their data how can I view that, if they submit their data can I get that via my email. How to code for that? If you know any similar ways plz help me

Staff
25,386 Points
2014-09-26 2:30 pm
Ansaf,

My apologies, but I may have left off a tutorial that you can use to accomplish your PHPform. We have a tutorial called Using PHPMailer to send email. This tutorial provides the code and may meet your needs. The PHPmail form basically allows you to create a form that will return to you based on what you have requested with in the form. The data would be returned in email.

I hope this is an easier solution and provides the information that you require. Please let us know if you have any further questions.

Regards,
Arnel C.
n/a Points
2014-09-30 9:04 am

Thanks For Your valuable posting, it was very informative.

n/a Points
2014-10-01 10:28 am

Hello guys! I started coding this website similar to facebook. I had an html corse on w3school, it was helpfull. The question I want to ask is, while I was designing users profile I wanted to add a "what's up box" that will post both photos and videos. I KNOW THE CODE IS VERY LONG AND WILL TAKE MULTIPLE SEPARATED HTM DOCUMENTS BUT PLEASE ATLEAST ATTACH IT FOR ME ON MY E-MAIL ADDRESS WITH FULL DESCRIBTION! Please!!!

Staff
11,186 Points
2014-10-01 10:32 am
Unfortunately, we would not be able to provide the full code for something like this as we do not provide full development services here, only examples that you may use to put together things on your site. There are, however, systems that are made already to generate social media sites, such as BuddyPress for WordPress, but will still take some development skills to create a fully functional site.
n/a Points
2014-10-19 5:11 pm

what i want to know is this when i click on submit which email does it go how do i put in my email to submit insuch a way that when it send i see it .how does the comment show on my webpage

Staff
28,219 Points
2014-10-20 1:20 pm
Hello Frank,

This particular series does not deal with email responses. It is for putting comment data into a database. We do have an article on using php for a comment form. This may help you accomplish what you asked.

Kindest Regards,
Scott M
n/a Points
2014-11-02 7:25 am

how much will it cost to have a dedicated server from inmotion hosting?

Staff
28,219 Points
2014-11-02 5:29 pm
Hello,

You can check out our Dedicated server plans and prices here.

Kindest Regards,
Scott M
n/a Points
2014-11-05 3:26 am

This line of code is wrong:

<textarea name='comment' id='comment' /></textarea>

It should be

<textarea name='comment' id='comment'></textarea>
Staff
28,219 Points
2014-11-05 10:19 am
Hello error finder,

Thank you for finding that, I have made the correction in the article.


Kindest Regards,
Scott M
n/a Points
2014-11-08 5:28 pm

Why do I get invalid article id error.I have a single php page and I want to receive comments one it but I am new on this and I made everything from the tutorials but still nothing ok.please help

Staff
28,219 Points
2014-11-10 11:34 am
Hello Antonio,

We would need to see your page and know the steps you are taking to get the error. If you can provide that we will be happy to see if we can find the error for you.

Kindest Regards,
Scott M
n/a Points
2014-11-16 2:53 am

good work

n/a Points
2014-11-23 6:07 am
Thanks for the sharing.
n/a Points
2014-12-01 3:58 am

very good tips.it is very useful.thanks for share..

n/a Points
2014-12-07 6:15 am

I have read the comments and contribution of the members of this group and i believe that the answer to problem is here. I'm designing a forum but im having a problem opening a specific category generated from a database in another page if the user clicks on it.

 

In brief i want a situation when a user clicks on a category from the home page, it will take you to that category page with all the topic under the category.

I'm using PHP html for the design. please help me.

Thanks

Staff
28,219 Points
2014-12-08 3:12 pm
Hello Eric,

Basically, when clicking the category link, the php will need to pass the category ID on to the next page. That page will then pull the information from the database based on that category ID. We would be happy to help with any specific questions you have if you are getting stuck in implementing this.

Kindest Regards,
Scott M
n/a Points
2014-12-09 4:47 am

It is really a nice and helpful piece of information. I’m happy that you shared this useful info with us. Please keep us informed like this. Thanks for sharing.

n/a Points
2014-12-11 5:42 am

nice tips thanks for share

n/a Points
2014-12-14 3:05 am
idk, make it to where it works!
Staff
28,219 Points
2014-12-15 8:37 am
Hello mr programer,

This article is part of a series, so this particular piece does not create a fully functioning form alone. Have you also followed the other articles in the series? If so, where are you stuck? We are glad to help.

Kindest Regards,
Scott M
n/a Points
2014-12-17 10:53 pm

Many Thanks to you!

n/a Points
2014-12-18 7:21 am

GUYS HELP THE CODE DOES NOT FETCH DATA FROM THE DATABASE

ANY HELP?

 

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title></head><body></style></head><h1 class="page-title" align="center">AVAILABLE READY PASSPORTS</h1>                                       <body></b><hr ><img src="/support/passport@1 (1).jpg" width="318" height="161"/><img src="/support/coat.jpg" width="182" height="161"/><img src="/support/passport@1 (3).jpg" width="330" height="161" />  <img src="/support/passport@1 (1).jpg" width="358" height="161" /><center></center><hr/><table width="1285" background="passport@1 (1).jpg"><tr><td width="194"><a href="/support/passport2.html">HOME</a> </td><td width="247"><a href="/support/administators.html">ADMINISTRATORS</a></td><td width="300"><a href="/support/FORM A.php">APPLICANTS</a></td><td width="246"><a href="/support/availablepassports.php">PASSPORTS</a></td><td width="274"><a href="/support/ABOUT US.html">ABOUT US</a></td></tr></table></p><?php$con=mysql_connect("localhost","root","");if(!$con){    die('could not connect:'.mysql_error());}$sql1 = "CREATE DATABASE IF NOT EXISTS myproject";if (mysql_query($sql1) === TRUE) {echo "Database created successfully";} else  {echo "Error creating database: " . mysql_error();}mysql_close($con)?><?php$con=mysql_connect("localhost","root","");if(!$con){    die('could not connect:'.mysql_error());}mysql_select_db("myproject",$con);$sql3="CREATE TABLE IF NOT EXISTS project(Surname varchar(50) ,Othername varchar(50),DOB varchar(50),email varchar(50),Telephone int(20))";if(mysql_query($sql3,$con)){    $sql="INSERT INTO project VALUES('$_POST[surname]','$_POST[other_name]','$_POST[DOB]','$_POST[email]','$_POST[telephone]')";if(!mysql_query($sql,$con)){    die('error:'.mysql_error());    }elseecho "1 record added";} else  {echo "Error creating table: " . mysql_error();}/*$name=$_POST['surname'];$other_name=$_POST['other_name'];$DOB=$_POST['DOB'];$Email=$_POST['email'];$Telephone=$_POST['telephone'];mysql_select_db("myproject");*/mysql_close($con)?></body></html>

Staff
28,219 Points
2014-12-18 9:02 am
Hello Kigozi,

I see CREATE statements, which creates tables for the database, but there is not a SELECT statement in the code. SELECT is the type of statement needed to get data out of the database.

Kindest Regards,
Scott M
n/a Points
2015-02-24 6:02 am

Can you make a comment box where you can edit the HTML and if you have a certian IP you can edit and/or delete comments ?-Regards 

Staff
28,219 Points
2015-02-24 10:16 am
Hello Jorden,

We do not have any specific code for something like that, but you that is certainly something that can be custom coded. Instead of using IP addresses, most would simply add some kind of membership feature with specific permissions.

Kindest Regards,
Scott M
n/a Points
2015-02-24 4:26 pm

I would like to buy something like that but I would not want a monthly subscription just a 1 time payment, would you guys be able to make something like that ?

Staff
3,905 Points
2015-02-24 11:19 pm
Hello,

Unfortunately that is outside the scope of what we would be able to do as do not provide custom coding to anyone.

Best Regards,
TJ Edens
n/a Points
2014-12-20 8:47 am

it is informative

n/a Points
2014-12-26 8:10 pm

hey there 

n/a Points
2015-01-01 1:55 am

awesom article

n/a Points
2015-01-05 11:23 pm

Awesome!

 

n/a Points
2015-01-13 9:13 am

This blog is very nice.thanks for our sharing.

n/a Points
2015-01-28 1:57 am

Thanks for sharing this blog..

n/a Points
2015-02-01 6:10 pm

Awesome sauce!

n/a Points
2015-02-05 10:08 am

Great! It helped me!

But is there a way that can print the comment with the name on the webpage ?

Thanks

Staff
17,061 Points
2015-02-05 10:51 am
Hello Mudit,

Thank you for your question. The above guide is just Section 3 of a full series on Using PHP to create dynamic pages.

If you follow the class to the end, you will see how to show the comments on the page.

Thank you,
John-Paul
n/a Points
2015-02-06 5:17 am
Thanks a lot for the tutorial. I build the form, but didn't get how to manage so that when someone hits the submit, his/her comment be forwarded to my email address. Could you please guide me.
Staff
11,186 Points
2015-02-06 6:37 pm
What you're looking for sounds like you're trying to create a contact form rather than the comment box that is described in this article.
2015-02-12 5:44 am
Please give all of the codes. I am beginner and liked this comment box very much but I didn't understand all. Is there anybody who can tell the codes that I must write on html? All steps...
Staff
17,061 Points
2015-02-12 12:23 pm
Hello muratnil,

Thank you for contacting us. Have you followed the above guide? It provides the HTML codes you need to create an HTML form.

Is there a step above that you are having trouble with?

Thank you,
John-Paul
n/a Points
2015-02-13 5:42 am

Thanks for  sharing

n/a Points
2015-03-05 7:19 am

Thanks for sharing a nice blog.I really like your post.

n/a Points
2015-03-07 8:59 am

I appreciate your blog post, beautifully expressed and well written.

n/a Points
2015-03-10 2:55 am
Plesase add how we can save the comment
Staff
17,061 Points
2015-03-10 9:31 am
Hello Ankit,

Thank you for your question. This is just Section 3 of a full series on Using PHP to create Dynamic Pages.

Later in the guide, it covers Using PHP to INSERT data into a database.

Thank you,
John-Paul
n/a Points
2015-04-02 7:57 pm

IT DOESN'T WORK!! IT SHOWS BUT WHEN YOU POST NOTHING SHOWS UP!!

Staff
17,061 Points
2015-04-02 8:10 pm
Hello Anonymous123,

Thank you for your question. This guide is "Section 3" of a 7-part series on "Using PHP to create dynamic pages."

Have you completed the other tutorials as well?

Thank you,
John-Paul
n/a Points
2015-04-13 7:02 am

this is a good artical bt is there a way to report this information in a simple way so that say 100 comments can be seen and collated

 

Staff
28,219 Points
2015-04-13 5:11 pm
Hello Chris,

I'm certain that is possible, however we do not have an article that covers such a situation. That would need to be custom coded.

Kindest Regards,
Scott M
n/a Points
2015-04-14 3:25 am

how to get a complete form in html to connect to your database where a user can full out a form and submit it

 

Staff
25,386 Points
2015-04-14 12:17 pm
Hello Star,

The next article answers your question. Please see using PHP. This tutorial series answer your question.

Regards,
Arnel C.
n/a Points
2015-04-20 12:50 pm

How to do comments box for website?

Who con teach me to do comments box?

Thanks.

Staff
28,219 Points
2015-04-20 1:03 pm
Hello noomharn,

Unfortunately we do not provide custom coded solutions here in the Support Center. A comment section such as the one here entails coding much like the one above along with a database and the code for members to log in. You may be able to locate tutorials for each specific step along the way by using your favorite search engine. Other people simply hire a developer to create the functionality for them.

Kindest Regards,
Scott M
n/a Points
2015-04-23 7:59 am

Really a great tips for beginners.I think they will be youlike it and follow you and your website.Please carry on.You should post some more article like it.

n/a Points
2015-04-25 10:01 am

Hi! My english is very bad, but...

Very good tips. :)

How to make comment box so, so all comments saved?  For example, we comment and our comments are saved. How i can do the same in my web page? 

Thanks forward! :))

Staff
28,219 Points
2015-04-27 1:10 pm
Hello One Girl,

To save the comments you would need to add additional code to save the content to a database table.

Kindest Regards,
Scott M
n/a Points
2015-05-05 3:24 am

Hi...

thanks for sharing this blog with us. your content is top of the funnel. always great to receive such brilliant information about such an interesting topic.you have done a great job on this blog.I am impressed with your work.

n/a Points
2015-05-13 2:14 pm

Could anyone assist me? I've set up a mail form in Dreamweaver using PHP. But, when a user fills out the form how do I set it up, so they get a copy of their message? Or even a generated automatic reply from me saying "Thank you for your message, someone will get back to you shortly"

Thanks for your help in advance :)

 

Staff
17,061 Points
2015-05-18 10:36 am
Hello Cheryl,

Thank you for contacting us. You must code/develop a solution with PHP. The above example is part of a full series, where we explain how to accomplish this.

We also provide a working example on our guide How to create a custom PHP contact form with validation.

Thank you,
John-Paul
n/a Points
2015-05-25 7:10 pm

I just copied that code onto my site. It works, but is there any way that i can view the comments afterwards?

Staff
3,905 Points
2015-05-26 10:38 pm
Hello,

You can add an action="mailto:your@email.com" to have the form email you the results.

Best Regards,
TJ Edens
n/a Points
2015-06-03 3:49 am

HEllow Freind

Can anyone please send me the detail code to create and to display the comment box on my website and to get notification that the user had commented on my website please.

Thanks

Staff
25,386 Points
2015-06-03 3:13 pm
Hello Sangay,

Thanks for the question. Unfortunately, we cannot provide you code beyond what has been provided in these tutorials. If you put some of these together, you will get most of what you need. If you require other information, then you may want consult with a programmer or look at other educational sites on using PHP.

I hope that helps to answer your question! If you require further assistance, please let us know!

Regards,
Arnel C.
n/a Points
2015-06-13 7:10 pm

I have a question how do you make a comment that everyone could see, like youtube, tier are comments on youtube that every one could see, and how do you make a reply button.

Staff
28,219 Points
2015-06-15 2:37 pm
Hello Justin,

That would require additional coding. We do not have any readymade scripts on hand for that type of thing at this point. You may want to see if you can find a freelancer to add the additional functionality to your site.

Kindest Regards,
Scott M
n/a Points
2015-07-02 1:01 pm

nic work

 

n/a Points
2015-07-04 3:47 pm

We currently do not have an article for that format, but it does follow the same principles. We are happy to assist with individual questions as you work towards that. This may be a project we take on in the future, however.

I have a question how do you make a comment that everyone could see, like youtube, tier are comments on youtube that every one could see, and how do you make a reply button.

Staff
28,219 Points
2015-07-06 4:04 pm
Due to time constraints I am not able to provide specific code. You would need to code part of the page that pulls the comments from the database.
n/a Points
2015-07-13 7:56 am

nice

n/a Points
2015-07-12 5:25 pm

I'm with Blacky. How do we assign a page an "id" for the form to get?

Staff
28,219 Points
2015-07-13 2:26 pm
Hello Jay,

That is discussed in Step 2 of the previous article in the series.

Kindest Regards,
Scott M
n/a Points
2015-07-28 11:35 pm

Hi, I'm learning to make comments like that, I certainly can, thanks article msangat help.

 

 

 

 

n/a Points
2015-07-28 11:39 pm

I do not currently have an article for the format, but do not follow the same principles.

 

 

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

130 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!