Welcome!

And don't forget to edit your signature & profile.

 

Icon

Statistics

  • Total posts 23319
  • Total topics 4049
  • Total members 5574
  • Our newest member
    ALF5583

TOP POSTERS

Total newbie

All problems and developments related to PHP, Ruby on Rails & Co. are discussed and resolved here.
   

Total newbie

Postby pensyd » Sat Oct 17, 2009 12:49 am

Hi everyone,

First i would like to say that i am a total newbie to designing a web site, that said, it is not stopping me from attempting to make one :lol:

I have pretty much completed the site but i am stuck in one area. That is the form and how to send it along with the data from it to both myself and the person who filled it out.

I have looked at several PHP scripts and tried to follow them to get this to work without much success.
The form i have designed has Textboxes, Multiple Checkboxes and a Textarea in it.

I would also like to know what software should i install on the server that will be hosting the web page? I can install my own application if need be by the looks of it. They also have several options for PHP scripts.

If anyone would like to try to help me i would be greatly appreciative, i can email you a txt file with the html code for the form.

Again thank you for any help and again i apologies for my lack of knowledge in PHP.

David
pensyd
 
Posts: 3
Joined: Sat Oct 17, 2009 12:34 am
   

   

Re: Total newbie

Postby ibernat » Sat Oct 17, 2009 1:32 pm

Post your HTML here (or at least the name of the file and the form code) and I'll set you on your way 8-)
Freelance PHP and CSS developer in love with jQuery and CakePHP. Playing with Django and AppEngine.

Portfolio -PSD to HTML slicing -Twitter
User avatar
ibernat
Smashing <hr />
 
Posts: 54
Joined: Mon Feb 09, 2009 4:07 pm
Location: Zagreb, Croatia / London, UK
   

   

Re: Total newbie

Postby pensyd » Sat Oct 17, 2009 4:51 pm

Thanks ibernat, Greatly appreciated.

Code: Select all
<style type="text/css">
<!--
.style3 {color: #0033FF}
.style4 {
   font-size: xx-large;
   font-weight: bold;
   color: #FFFFFF;
}
body {
   background-color: #000000;
}
-->
</style>
</head>

<body>
<form id="form" name="form" method="post" action="mailto:(enquirery@giftboxcreations)">
  <div align="center">
    <p class="style4">Order Form</p>
    <table width="586" border="1">
    <input name="FormFieldNameEditList" type="hidden" value=
                "test78, captcha, hot, ~ |
                 email2, attraction, ~">
      <tr>
        <td width="177" bgcolor="#CC66FF">Name:</td>
        <td width="393" bgcolor="#CC66FF"><input name="name" type="text" id="name" size="60" /></td>
      </tr>
      <tr>
        <td bgcolor="#CC66FF">Address:</td>
        <td bgcolor="#CC66FF"><input name="address" type="text" id="address" size="60" /></td>
      </tr>
      <tr>
        <td bgcolor="#CC66FF">Email:</td>
        <td bgcolor="#CC66FF"><input name="email" type="text" id="email" size="60" /></td>
      </tr>
      <tr>
        <td bgcolor="#CC66FF">Confirm Email:</td>
        <td bgcolor="#CC66FF"><input name="confemail" type="text" id="confemail" size="60" /></td>
      </tr>
      <tr>
        <td bgcolor="#CC66FF">Phone:</td>
        <td bgcolor="#CC66FF"><input name="phone" type="text" id="phone" size="25" /></td>
      </tr>
      <tr>
        <td bgcolor="#CC66FF">Qty:</td>
        <td bgcolor="#CC66FF"><input name="qty" type="text" id="qty" size="15" /></td>
      </tr>
      <tr>
        <td bgcolor="#CC66FF">Bases:</td>
        <td bgcolor="#CC66FF"><label>
          <input type="radio" name="standard" value="Standard" id="Bases_0" />
Standard</label>
          <br />
          <label>
          <input type="radio" name="box" value="Box" id="Bases_1" />
Box</label>
          <br />
          <label>
          <input type="radio" name="chupa" value="Chupa Chups" id="Bases_2" />
Chupa Chups</label>
          <br />
          <label>
          <input type="radio" name="chocolate" value="Standard Chocolate" id="Bases_3" />
Standard Chocolate</label>
          <br />
          <label>
          <input type="radio" name="ferrero" value="Ferrero Chocolate" id="Bases_4" />
Ferrero Chocolate</label>
          <br />
          <label>
          <input type="radio" name="cadbury" value="Cadbury Favourites" id="Bases_5" />
Cadbury Favourites</label></td>
      </tr>
      <tr>
        <td bgcolor="#CC66FF">Add Ons:</td>
        <td bgcolor="#CC66FF"><label>
          <input type="radio" name="foil" value="Foil Spray" id="AddOns_0" />
Foil Spray</label>
          <br />
          <label>
          <input type="radio" name="glitter" value="Glitter Number Spray" id="AddOns_1" />
Glitter Number
       
        Spray</label></td>
      </tr>
      <tr>
        <td bgcolor="#CC66FF">Balloons Coloured Qty</td>
        <td bgcolor="#CC66FF"><input name="balloonqty" type="text" id="balloonqty" size="15" />
        Request your colour/s in Special Instructions</td>
      </tr>
      <tr>
        <td bgcolor="#CC66FF">Balloons Printed</td>
        <td bgcolor="#CC66FF">Wording on Balloon
        <input name="wording" type="text" id="wording" size="40" /></td>
      </tr>
      <tr>
        <td bgcolor="#CC66FF">Foil Balloons</td>
        <td bgcolor="#CC66FF"><p>
          <label>
          <input type="radio" name="foil45" value="4.5"" id="RadioGroup1_0" />
4.5"</label>
          <br />
          <label>
          <input type="radio" name="foil9" value="9"" id="RadioGroup1_1" />
9"</label>
          <br />
          <label>
          <input type="radio" name="foil18" value="18"" id="RadioGroup1_2" />
18"</label>
          <br />
          <label>
          <input type="radio" name="megashaped" value="Mega Shaped" id="RadioGroup1_3" />
Mega Shaped</label>
        </p>        </td>
      </tr>
      <tr>
        <td bgcolor="#CC66FF"><p>Letter &amp; Number</p>
            <p>Balloons</p></td>
        <td bgcolor="#CC66FF"><p>
          <label>
            <input type="radio" name="letter7" value="7"" id="RadioGroup2_0" />
            7"</label>
          <br />
          <label>
            <input type="radio" name="letter9" value="9"" id="RadioGroup2_1" />
            9"</label>
          <br />
          <label>
            <input type="radio" name="mega40" value="Mega 40"" id="RadioGroup2_2" />
            Mega 40"</label>
          <br />
        </p></td>
      </tr>
      <tr>
        <td bgcolor="#CC66FF">Filling in Balloons</td>
        <td bgcolor="#CC66FF"><p>
          <label>
            <input type="radio" name="air" value="Air" id="RadioGroup3_0" />
            Air</label>
          <br />
          <label>
            <input type="radio" name="helium" value="Helium" id="RadioGroup3_1" />
            Helium</label>
          </p>
          <p><span class="style3">All Helium filled balloons will be filled with High  Float, to prolong their floatability</span><br />
          </p></td>
      </tr>
      <tr>
        <td bgcolor="#CC66FF">Instructions:</td>
        <td bgcolor="#CC66FF"><textarea name="instructions" cols="55" rows="5" id="instructions"></textarea></td>
      </tr>
      <tr>
        <td bgcolor="#CC66FF">Payment options</td>
        <td bgcolor="#CC66FF">Paypal, Direct Deposit, Cash</td>
      </tr>
      <tr>
        <td height="24" bgcolor="#CC66FF"><p>Security Question</p>
        </td>
        <td bgcolor="#CC66FF">Winter is Cold, Summer is
        <input type="text" name="test78" id="summer" /></td>
      </tr>
      <tr>
        <td bgcolor="#CC66FF">Office use, Do Not Ues</td>
        <td bgcolor="#CC66FF"><input type="text" name="email2" id="email2" /></td>
      </tr>
    </table>
    <table width="586" border="1">
      <tr>
        <td bgcolor="#000000"><div align="center">
          <input type="submit" name="submit" id="submit" value="Submit" />
          <input type="reset" name="Reset" id="Reset" value="Reset" />
        </div></td>
      </tr>
      <tr>
        <td bgcolor="#FFFF66"><div align="center"><font size="2" face="Arial, Helvetica, sans-serif">Copyright
        2009 GiftBoxCreations.com All right reserved</font></div></td>
      </tr>
    </table>
    <p>&nbsp;</p>
  </div>
</form>
</body>
</html>



Thank you again
pensyd
 
Posts: 3
Joined: Sat Oct 17, 2009 12:34 am
   

   

Re: Total newbie

Postby ibernat » Sat Oct 17, 2009 6:25 pm

Here is the simple way:

  • Rename the file to whatever.php
  • Change the form action to whatever.php (same file)
  • Add the following code before any HTML

Code: Select all
<?php
if(!empty($_POST)) {
$content = print_r($_POST, true);
mail('enquirery@giftboxcreations.com', 'New contact', $content);
}
?>


This is only to get you started, it doesn't check weather the form is empty or not. It's midnight here, I'll post a more detailed answer in the morning. ;)
Freelance PHP and CSS developer in love with jQuery and CakePHP. Playing with Django and AppEngine.

Portfolio -PSD to HTML slicing -Twitter
User avatar
ibernat
Smashing <hr />
 
Posts: 54
Joined: Mon Feb 09, 2009 4:07 pm
Location: Zagreb, Croatia / London, UK
   

   

Re: Total newbie

Postby pensyd » Sat Oct 17, 2009 6:53 pm

Thank you for your help.

Will give it a try
pensyd
 
Posts: 3
Joined: Sat Oct 17, 2009 12:34 am
   

   

Re: Total newbie

Postby ibernat » Tue Oct 20, 2009 5:37 pm

You might like to take a look at the tutorial now :thumbsup:
Freelance PHP and CSS developer in love with jQuery and CakePHP. Playing with Django and AppEngine.

Portfolio -PSD to HTML slicing -Twitter
User avatar
ibernat
Smashing <hr />
 
Posts: 54
Joined: Mon Feb 09, 2009 4:07 pm
Location: Zagreb, Croatia / London, UK
   


Return to Server-side Scripting



Who is online

Users browsing this forum: No registered users and 1 guest