473,320 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Guestbook using php

I am doing a project on guestbook using php.so i required some information on that.please suggest me

How can we create a guestbook application in PHP?
Feb 23 '08 #1
2 5044
Markus
6,050 Expert 4TB
First of all, you need a server and one that runs php.
It'd also be helpful if this server had a database which you could use, i.e. mysql.

The Logic:
You have a form, on a html or php page that has method set to POST (html/php doesnt really matter - it does if you're not planning on processing on a seperate page though..), you give the user some fields to fill in, ie. name, website, email, comment; you then give a submit button.
This submit button takes you to a page (for examples sake: process.php). On process.php you have a php script that takes the user input through the POST super global. You then process this and sanatise it (see mysql_injection), after sanatising you save the data into a mysql table.

guestbook.php
You connect to mysql and select the relevant database.
Using a mysql function like mysql_fetch_array() you print out the data using a while loop, in the format you'd like.

Reading:
To get you going -
http://tizag.com/ - Packed full of php and mysql tutorials.
http://www.w3schools.com/php/ - also a crowd favorite.

Once you've got yourself going and written something of your own, come back code in hand and we'll help you further.

Markus.
Feb 23 '08 #2
ronverdonk
4,258 Expert 4TB
Look at this tutorial for you: Creating A Guestbook Using PHP and MySQL

Ronald
Feb 23 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Dariusz | last post by:
I am a beginner in PHP and MySQL, and am working through a book and various online tutorials on PHP and MySQL and now stuck - installed everything on "localhost" and it all works fine. My question...
1
by: varois83 | last post by:
Hi I am new to PHP and am working on creating a guestbook from scratch to experiment. I am using several tutorials online. I have a question about dealing with entries made to my guestbook as...
14
by: pcchong | last post by:
I use a free database-driven ASP guestbook. I want to add a IP address blocking filter to it( just to block one particular guest). What is the easiest way to do so? Thanks. pcchong
2
by: Chris Wilkinson | last post by:
Hi there, I wish to create a guestbook for a small business website I made. The guestbook will be your standard 'form page' with button click to 'send' type thing, plus another link to view the...
1
by: Rune Runnestø | last post by:
Hi, I have made a small program that doesn't work quite the way it should. It is a guestbook for the web, where visitors can write back their greetings. The program consists of 3 files: -...
6
by: DigitalRick | last post by:
I have been running CDONTS in my ASPpages to send emails to me sent from my guestbook. It had been working fine untill I upgraded to Server 2003 (I am also running Exchange 2003) all locally. I...
1
by: Viken Karaguesian | last post by:
Hello everyone, Just wanting some advice. I'd like to start removing the Microsoft-generated guestbook (a feature of FrontPage) on my websites but I'm not sure if it can be done just using HTML....
0
by: http://www.free-guestbook.net/gbook.php?u=21740 | last post by:
http://www.free-guestbook.net/gbook.php?u=21740 http://www.free-guestbook.net/gbook.php?u=21741 http://www.free-guestbook.net/gbook.php?u=21742 http://www.free-guestbook.net/gbook.php?u=21743
4
by: infoseekar | last post by:
HI Guys I am a beginner. I am trying to create a guestbook. I have the code for it and it is in three parts. Part 1 "dp.php" to open database and make connection Part 2 "index.php" which will...
5
Thekid
by: Thekid | last post by:
Hi, I'm using xampplite and I'm trying to make a guestbook and a forms page where you can post to the guestbook with PHP & MySQL. I got the code from a website but it wasn't working so I tinkered...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.