rookie looking for help coding a CSS form with PHP


Posted on 16th Feb 2014 07:03 pm by admin

I'm trying to figure out how to add PHP code to my xhtml form so that it is a working form embedded in the contact us page of a website that is still on my pc only. The end goal is to place the PHP into the code below, create a .php file that compliments it (if necessary?) so that when the contact form is submitted, it is pushed through to my gmail account. I'm not sure if the best way to do this is through a CGI or if there is an easier way since the site isn't published yet? Ideally, Id like for someone to add the PHP code my xhtml code below and explain any other details that will make my form work.

I added the <form> tag below but do not know where to go from here. I do not have a file currently called formscript.php but assume I'll need one like it if this is to work.

Did you know?Explore Trending and Topic pages for more stories like this.
From what I've read, I've got a LONG way to go on how this whole process works. I've read through forums yesterday but everything is written for someone with an existing knowledge of PHP or for table based forms. I would appreciate any and all help. Thanks



xHTML:

<form action="formscript.php" method="post">

<div class="contact_form">



<div class="form_row">
<label class="contact">Name:</label>
<input type="text" name="name" class="contact_input" />
</div>

<div class="form_row">
<label class="contact">Email:</label>
<input type="text" name="email" class="contact_input" />
</div>

<div class="form_row">
<label class="contact">Message:</label>
<textarea class="contact_textarea" ></textarea>
</div>

<div class="form_row">
<a href="#" class="read_more">send</a>
</div>

</div>
</form>

CSS:

.contact_form{
width:355px;
float:left;
padding:0px 0 0 5px;
}
.form_row{
width:335px;
clear:both;
padding:10px 0 10px 0;
_padding:5px 0 5px 0;
color:#a53d17;
}
label.contact{
width:70px;
float:left;
font-size:12px;
text-align:right;
padding:4px 5px 0 0;
color:#fff;
}
input.contact_input{
width:253px;
height:18px;
background-color:#857c7c;
color:#FFFFFF;
border:1px #857c7c solid;
float:left;
}
textarea.contact_textarea{
width:253px;
height:50px;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
color:#FFFFFF;
background-color:#857c7c;
border:1px #857c7c solid;
float:left;
}
.contact_info{
width:380px;
float:left;
padding:0 0 0 20px;
color:#FFFFFF;
}
p.adress{
float:left;
padding:10px 0 0 15px;
line-height:13px;
}
No comments posted yet

Your Answer:

Login to answer
194 Like 32 Dislike
Previous forums Next forums
Other forums

Do not allow posting of whitespace
Currently the script below works if the user does not type a name/message, but if i create a whitesp

Saving data from a form into a file
Hey everybody,

Sorry, I am really new to PHP coding and such but a project kind of got thrust

insert Multiple rows into the table from that table data
Hi All,

I have a requirement like to insert mulitple rows into the table from that

When i am Canseling the Billing Document in VF11 I am getting Shortdump
Hi Experts

When i am Canseling the Billing Document in VF11 I am getting Shortdump.

Add a sign-up feature to a flat file login script
I'm working on a flat file login script and I would like to add a sign-up feature to it with a email

HELP with mysql_real_escape_string
I'm looking to remove apostrophes completely when someone enters lyrics but don't have a clue how to

Multidimensional array problems in $_POST
I'm having trouble with a three-dimensional $_POST array. It starts as a two-dimensional array on th

MySQL Primary key gap
Alright, so I have a table with 26 entries in it (id, filename, caption) for my image randomiser (ht

Session is not saving
I am not trying to do anything too fancy, I am just trying to get some $_SESSION data to save and us

function to return url
Hi,

Can you guys help me giving a function that takes all the contents in a particular field

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash