Basic Code (I think)

I need some basic php code (looks bit like a blog). With 2 pages: 1-html form and 2-page with divs
On the first page should be a form with :

  • Title (textfield)
  • Url (textfield)
  • Color (dropdown menu)
  • post + reset button

When filled in and posted, I want it to create a new div on the (2- page with divs) page.
The CSS would be like:

html, body { margin: 0; padding: 0; }
div { width: 20px; height:20px; float:left; }
a.linking { display:block; height:100%; width:100%; text-decoration:none; }
red { background-color: red; }
green { background-color: green; }
yellow { background-color: yellow; }
blue { background-color: blue; }

etc. with the colors.

So when posted,
Title should define the title=“whatwasfilledinatthetitlepart”
Url should define the href=“
Color should define the class=“colorselected”
And when posted, it should create the div infront of the earlier divs.

Any one any ideas? :smiley:

Even have some (small amount) gift on paypal for any one who can make me do this :smiley:


How should the posts be stored?

Uhm I host at godaddy.
I can make databases (mysql thingy) so?

I’m not sure lol.

It should stay on the page forever, so if it writes on the html page it would be fine to (if this is even possible xD)


I’d suggest making a database

For the info you’ve mentioned you need a table



You need one page with a form (simple html), form action=“url to php file that should process the form” method=“post”


One page catching the form data and inserting it into your database


And one page querying the database for posts and displaying them.


Please come back with any errors/problems you may be having :slight_smile:

okay, I would love to do this. But how do I actually code this ? :stuck_out_tongue:

I know nothing about php. Well I’m trying to learn some from sites like w3schools but they only cover the basics xD

Thanks again :slight_smile:

You just have to start in some end.


Create page with form
don’t need to style it exactly like you want it, it does exactly the same without the styling so when developing you don’t even need the theme/template

Create database table
id should be an auto incrementing number and primary key. the rest should be strings (text may have to be a bigger text field, depending on how much you want to store)

Create the file for saving posts (ie savePost.php)
get data that have been posted from the form
save them to the db
redirect user to the posts list (?)

Create the file for listing posts (ie posts.php)
get posts from the database
echo post data


The above can be done a huge number of ways. But everything should be easily found on google. You will probably find thousands of tutorials on php/mysqli or php/pdo for database interaction.

Okay I gave it a try lol, but gave up. Going to fiverr and see if someone can do it for me lol.
I should stick to html, css and wordpress haha.

Thanks for your help anyways :smiley:

Sponsor our Newsletter | Privacy Policy | Terms of Service