Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
  1. #1
    Junior Member
    Join Date
    Jan 2009
    Posts
    7
    Member #
    18113
    hi there.
    Thank You for a brilliant forum. As you can see its my first post, so please accept my apologies if i don't make sense.
    Ok I'm trying to setup a website. I am using an open source template and i have altered it to my specification. Now there are a couple of issues which i'm sure that an expert can fix them in no time, but for me its been giving me a headache for a few days.
    1. I've altered the menu and added my own wording. But for some reason its gone out of alignment and i've tried everything, but can seem to bring it back to the correct alignment.
    2. I am looking for free to use photos/cliparts of pc repairs or any good pc pictures for my website, but have had any luck.
    3. Even though the template has a contact form, I have been told that I need some coding called PHP, so could anyone help here?
    NOTE: I actually need someone to physically fix it and would be most grateful if some kind soul could spare a few mins??? :-\
    Thank You

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Welcome to WDF.

    I've altered the menu and added my own wording. But for some reason its gone out of alignment and i've tried everything, but can seem to bring it back to the correct alignment.
    Can we see this page in action? How is it supposed to look?

    I am looking for free to use photos/cliparts of pc repairs or any good pc pictures for my website, but have had any luck.
    Try this or Google is your friend

    Even though the template has a contact form, I have been told that I need some coding called PHP, so could anyone help here?
    Again, it would be great to see your contact form. PHP is everywhere on the web, you should be able to find information on it, but would you not rather learn what the PHP code is doing?

  4. #3
    Junior Member
    Join Date
    Jan 2009
    Posts
    7
    Member #
    18113
    thank u for help bfsog.
    you see i haven't uploaded any of the pages as yet. I was hoping that someone could remotely take control or i could add them as msn messenger friend and then send them the files??

  5. #4
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Someone could do that, but what if you wanted some changes done in the future? You would be reliant on always having "someone" to turn to.

    Also I would be wary of letting a random person take contrpl of your PC, unless you trust them.

    If you have a webhost you should upload what you do have as of now and then we can help you further.

  6. #5
    Junior Member
    Join Date
    Jan 2009
    Posts
    7
    Member #
    18113
    This is a one-off website and majority of the stuff i can do myself. My only problems are as mentioned above.
    Since you've requested, I've uploaded it..link is at the bottom.
    Please note that its still in early stages and I'm editing it as I spk.
    I will BBL...hope to see a reply soon!
    Thank YOU!!!
    http://ispyonu.equiphase.net/

  7. #6
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Hello again.

    On this page you have a contact form. You want to e-mail the values your website visitors enter to a predefined e-mail address, correct?

    First of all, heres the current HTML:
    HTML Code:
    <form action="#" method="get">
     <div class="form">
     <label for="name">Name</label>
     <input class="text" name="name" id="name" type="text" />
     <div class="clear2"></div>
     
     <label for="email">Email</label>
     <input class="text" name="email" id="email" type="text" />
     <div class="clear2"></div>
     
      <label for="website">Website</label>
     <input class="text" name="website" id="website" type="text" />
     <div class="clear2"></div>
     
     <label for="comment">Comment</label>
     <textarea class="text" name="comment" id="comment" cols="45" rows="5"></textarea>
     <div class="clear2"></div>
    
     <input class="button" name="Submit" type="button" value="Submit"  />
     ADD A TELEPHONE FIELD, &amp; BEST TIME TO CALL FIELD
     </div>
     </form>
    See the action value is a #? This should point to a PHP file which processes this form, such as contact.php, send.php - anything you like really. Note: Some people decide to have the PHP code that does the e-mailing inside the same file that displays the form.

    Also notice that you have your method set to GET (which means the values are transferred via the website address [such as page.php?name=Geoorge&age=50&etc=etc]), which is a bit of a bad idea seeing as the amount of data that could be submitted could be quite large. A better option is to use method="post".

    Moving on, you want 4 pieces of information from the user: name, email, website and comment. You will see that the above are called name, email, website and comment respectively. These are important, soon I will show you why.

    Lastly you have the submit button. Now, this is a personal preference, but I always use a <input type="submit" /> control to submit my forms. While your code may just work fine, to me a type of submit makes sense as the action or event that will occur when it is clicked is indicated in its type, whereas a button click could do all manner of things, but again, personal preference.

    So, onto the PHP part. I always check that my form is submitted first like so:

    PHP Code:
    if(isset($_POST['submit'])))
    {
     ...

    Note: I used $_POST because my forms method was set to post. If my forms method was set to get I would have to use $_GET.

    Now that we know the form is submitted lets declare some variables such as where the e-mail is going, who it came from and the subject of the e-mail

    PHP Code:
      $toAddress "youraddress@yourhost.com";
      
    $fromAddress "visitor@yourhost.com";
      
    $subject "New email sent from [yourWebsiteName]"
    Now we assign the values that a user enters via the form to some PHP variables. Again note that the use of S_POST is important as is the names of the form controls defined in the HTML form. I also create a new variable $comment which combines the fields the user entered.

    PHP Code:
      $visitorName $_POST['name'];
      
    $visitorEmail $_POST['email'];
      
    $visitorWebsite $_POST['website'];
      
    $visitorComment $_POST['comment'];
      
    $comment "You have received a new comment via your website from $vistorName\n\n";
      
    $comment .= "$visitorName's e-mail address is $visitorEmail, their website is $visitorWebsite and their comment is below.\n\n";
      
    $comment .= $visitorComment
    Now we have got a hold of what the user wishes to send us, so lets do just that.

    PHP Code:
    if(mail("$toAddress""$subject""$comment""From: $fromAddress"))
    {
     
    // e-mail was sent


    Put that altogether we get

    PHP Code:
    <?php
    if(isset($_POST['submit'])))
    {
      
    $toAddress "youraddress@yourhost.com";
      
    $fromAddress "visitor@yourhost.com";
      
    $subject "New email sent from [yourWebsiteName]";

      
    $visitorName $_POST['name'];
      
    $visitorEmail $_POST['email'];
      
    $visitorWebsite $_POST['website'];
      
    $visitorComment $_POST['comment'];
      
    $comment "You have received a new comment via your website from $vistorName\n\n";
      
    $comment .= "$visitorName's e-mail address is $visitorEmail, their website is $visitorWebsite and their comment is below.\n\n";
      
    $comment .= $visitorComment;

      if(
    mail("$toAddress""$subject""$comment""From: $fromAddress"))
      {
       
    // e-mail was sent
      
    }
    }

    ?>
    Untested, but that is a good start for you.

  8. #7
    Junior Member
    Join Date
    Jan 2009
    Posts
    7
    Member #
    18113
    thank u so much for helping me Bfsog...you have given me a lot of info. Do you want an honest answer though? I'm not sure what all this means as i'm not a coder.
    All i can do is basic altering of html and css, but other than that i don't have an ounce of clue.
    Also i did anyone look at the grey submenu problem i mentioned earlier? It in the SERVICES page.
    I hope i haven't wasted ur time making you type all that reply, so i am sorry mate.

  9. #8
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Dont worry, if or when the times come when you do the info I posted it should still be there then.

    What menu are you talking about? The one with the links "Home", "About", "Products" etc etc?

    How is it meant to be aligned, it looks okay to me.

    Regarding the contact form, if you take the below code snippet and save it as contact.php and place it in the same directory as the contact.html file, then change the action of your form from # to contact.php and try filling in the form.

    PHP Code:
    <?php
    if(isset($_POST['submit'])))
    {
      
    $toAddress "youraddress@yourhost.com";
      
    $fromAddress "visitor@yourhost.com";
      
    $subject "New email sent from [yourWebsiteName]";

      
    $visitorName $_POST['name'];
      
    $visitorEmail $_POST['email'];
      
    $visitorWebsite $_POST['website'];
      
    $visitorComment $_POST['comment'];
      
    $comment "You have received a new comment via your website from $vistorName\n\n";
      
    $comment .= "$visitorName's e-mail address is $visitorEmail, their website is $visitorWebsite and their comment is below.\n\n";
      
    $comment .= $visitorComment;

      if(
    mail("$toAddress""$subject""$comment""From: $fromAddress"))
      {
       echo 
    "<p>E-mail sent.</p>";
      }
    }

    ?>
    If you plan to do more and more web design/development it might be an idea visiting a local book shop and seeing what they have. The Sams are generally good as are O'Reilly

    As ever, if you have any other questions WDF is your first port of call.

    Edit: Remember to change certain lines of the code snippet.

  10. #9
    Junior Member
    Join Date
    Jan 2009
    Posts
    7
    Member #
    18113
    i'm referring to SERVICES.HTML - the submenu (grey), just underneath the Main menu (black buttons) - its out of alignment as half is going onto the white background. The reason for this as far as i know is because the Black and Grey is a picture and the submenu originally was supposed to only hold one line of buttons.
    Now if i somehow i could use "picture" buttons (like the black menu) instead of <LI> tags then that would be much better. I'm too scared as one touch can mess the whole thing.
    Would u be able to help me? my first point of call is MSN MESSENGER. I have sent you a PM with the details.
    thanks!

  11. #10
    Junior Member
    Join Date
    Jan 2009
    Posts
    7
    Member #
    18113
    can anyone help me here? pls?

    thanks


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:58 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com