Jump to content

perryc

Member
  • Posts

    71
  • Joined

  • Last visited

Posts posted by perryc

  1. when you post text in joomla, how do you stop it from showing the Details section on the article all that with the email, and print icons?

     

     

    Heres the link to what im talking about perrys design . com

     

     

     

     

     

    Thanks for the help.

     

     

     

     

     

    Thanks,

     

     

     

    Cody Perry

  2. Blank should open the new page in a new window as far as i know im not the most experienced in flash but i use "target _blank" in dreamweaver.

     

     

    Hope this helps.

     

     

     

     

    Thanks,

     

     

     

     

    Cody

  3. Hello everybody im trying to figure out what content management system to use right now im currently taking a class in college on joomla right now, but was not sure if word-press would be better for a graphic design website i planed on making right now.

     

     

     

     

     

    Thanks,

     

     

     

     

    Cody Perry

  4. Hello, i was wondering if somebody could tell me how to pick a color scheme for my layout correctly? I was trying to go off of my logo design and use those kind of color's. I have my layouts already drawn up on paper. Just haveing a really hard time picking my color scheme. Any help would be greatly. Appricated.

     

     

     

     

     

    Thanks,

     

     

     

    Cody Perry

  5. Ok, thanks for the replies. Im pretty sure thats what im going to go with is word-press. I've heard people say word-press is for small sites, Joomla is for medium sized sites, and Drupal is for large to really large sites.

     

     

     

     

     

    Thanks,

     

     

     

     

     

    Cody Perry

  6. Hello, i was wondering how hard it would be to set up a word-press site for my design business i mean like with the plugins and everything im between this and using joomla.

     

     

     

     

     

    Thanks,

     

     

     

     

    Cody Perry

  7. It depends all that you want to be as a web designer/web developer. You could do just the front end stuff, html and CSS. Or the backend things like MySQL and php. Personally for me i am great with graphics and pretty much know html and CSS inside and out to the point where i can just flow through design and use it to get the results i want. Im teaching myself PHP MySQL and then javascript now. Since i know html and CSS plus im taking a class this fall on xhtml, fireworks ect through college. But anyway, It depends on what you want to do. But listen to everyone here and start with html and CSS as the basics and work your way up from there.

     

     

    Hope this helps some.

     

     

     

    Thanks,

     

     

     

     

    Cody Perry

  8. Hey good post, I think that the mobile browser market will continue to grow but i don't think computers will be completely replaced anythime soon. The older generagion does not like the smaller text or anything of that sort. Plus some people like to see everything on the screen at once.

     

     

    Just thought id add that.

     

     

     

    Thanks,

     

     

     

    Cody Perry

  9. Ok so here it goes. Im looking to add the my account web page to my website http://www.legendofdrizzt.com. Here is what i want to do with the my account page.

     

    1. Add a login system and register system for people's accounts.

     

    2. Once in there my account page. I want to integrate word-press or a similar software. So that they can post anything they want. Ex: in a way like Facebook i guess. I want that to be live so that it updates itself changing with peoples friends post.

     

     

    3. I want to add a private messaging system, as well as a friends list, I also want to add something like face-book's live private chat. So people can talk amongst themselves.

     

     

     

    4. I want to give them the ability to upload there own images and videos for everyone else to see. Ex: like Facebook kind of.

     

    5. Later down the road i want to integrate their post's on legendofdrizzt.com with twitter and Facebook possibly.

     

    6. I want to add privacy controls. EX: block annoying people form seeing your account, keep details private if they so wish. And so on.

     

     

     

    So i guess im looking for someone to help me code a lot of this and also someone who can guide me in the planning of this project and we can work hand in hand with each other for this project.

     

     

     

    If anyone is interested send me a private message or just post here i guess.

     

     

     

     

    Thanks,

     

     

     

    Cody Perry

  10. Heres the code

     

     

    <?php

    if (array_key_exists('send', $_POST)) {

    // mail processing script

    // remove escape characters from POST array

    if (PHP_VERSION < 6 && get_magic_quotes_gpc()) {

    function stripslashes_deep($value) {

    $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);

    return $value;

    }

    $_POST = array_map('stripslashes_deep', $_POST);

    }

    $to = 'codyperry65@yahoo.com'; // use your own email adress

    $subject = 'Legend of Drizzt Feedback Message';

     

    // list expected fields

    $expected = array('first_name', 'last_name', 'email', 'comments', 'interests');

    // set required fields

    $required = array('first_name', 'last_name', 'email', 'comments');

    // create empty array for missing fields

    $missing = array();

    // set default values for variables that might not exist

    if (!isset($_POST['interests'])) {

    $_POST['interests'] = array();

    }

     

    // assume that there is nothing suspect

    $suspect = false;

    // create a pattern to locate suspect phrases

    $pattern = '/Content-Type:|Bcc:|Cc:/i';

     

    // function to check for suspect phrases

    function isSuspect($val, $pattern, &$suspect) {

    // if the variable is an array, loop through each element

    // and pass it recursively back to the same function

    if (is_array($val)) {

    foreach ($val as $item) {

    isSuspect($item, $pattern, $suspect);

    }

    }

    else {

    // if one of the suspect phrases is found, set Boolean to true

    if (preg_match($pattern, $val)) {

    $suspect = true;

    }

    }

    }

     

    if ($suspect) {

    $mailSent = false;

    unset($missing);

    } else {

     

     

     

    // process the $_POST variables

    $first_name = $_POST['first_name'];

    $last_name = $_POST['last_name'];

    $email = $_POST['email'];

    $comments = $_POST['comments'];

     

    }

     

    // validate the email address

    if (!$empty($email)) {

    // regex to identify illegal characters in email address

    $checkEmail = '/^[^@]+@[^\s\r\n\'";,@%]+$/';

    // reject the email address if it doesn't match

    if (!preg_match($checkEmail, $email)) {

    $suspect = true;

    $mailSent = false;

    unset($missing);

    }

     

    }

     

    // go ahead only if not suspect all required fields OK

    if (!$suspect && empty($missing)) {

     

     

    // build the messege

    $messege = "First Name: $first_name\r\n\r\n";

    $messege = "Last Name: $last_name\r\n\r\n";

    $messege .= "Email: $email\r\n\r\n";

    $messege .= "Comments: $comments\r\n\r\n";

    $messege .= 'Interests: '.implode(',', $interests);

     

    // limit line length to 150 characters

    $messege = wordwrap($messege, 150);

     

    // create additional headers

    $headers = "From: Feedback from Legend of Drizzt Website<codyperry65@yahoo.com>\r\n";

    $headers .= 'Content-Type: text/plain; charset=utf-8';

    $headers .= 'Cc: codyperry65@yahoo.com';

    if (!empty($email)) {

    $headers .= "\r\nReply-To: $email";

    }

     

    // send it

    ini_set('sendmail_from', 'codyperry65@yahoo.com');

    $mailSent = mail($to, $subject, $message, $headers, '-codyperry65@yahoo.com');

    if ($mailSent) {

    // missing is no longer needed if the email is sent, so unset it

    unset($missing);

    }

    }

    }

    ?>

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <title>Legend of Drizzt - Contact</title>

    <link href="legendofdrizzt.css" rel="stylesheet" type="text/css" /><!--[if IE 5]>

    <style type="text/css">

    /* place css box model fixes for IE 5* in this conditional comment */

    .twoColFixLtHdr #sidebar1 { width: 230px; }

    </style>

    <![endif]--><!--[if IE]>

    <style type="text/css">

    /* place css fixes for all versions of IE in this conditional comment */

    .twoColFixLtHdr #sidebar1 { padding-top: 30px; }

    .twoColFixLtHdr #mainContent { zoom: 1; }

    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */

    </style>

    <![endif]-->

    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

    <link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">

    <!--

    function MM_popupMsg(msg) { //v1.0

    alert(msg);

    }

    //-->

    </script>

    <style type="text/css">

    <!--

    a:link {

    color: #00F;

    text-decoration: none;

    }

    a:visited {

    color: #906;

    text-decoration: none;

    }

    a:hover {

    color: #96F;

    text-decoration: none;

    }

    a:active {

    color: #600;

    text-decoration: none;

    }

    .twoColFixLtHdr #container #mainContent #form1 table tr td strong {

    text-align: center;

    }

    .twoColFixLtHdr #container #mainContent #form1 table {

    text-align: left;

    }

    .twoColFixLtHdr #container #mainContent #form1 table tr td {

    font-weight: bold;

    }

    -->

    </style>

    </head>

     

    <body class="twoColFixLtHdr">

    <yah>

     

    <div id="container"><img src="images/legendofdrizzt05.jpg" alt="Header image for the legend of drizzt website" width="837" height="108" border="0" usemap="#Map" />

    <map name="Map" id="Map">

    <area shape="rect" coords="8,3,842,176" href="index.php" />

    </map>

    <div class="navbar" id="navbar"></div>

    <div id="sidebar1">

    <ul id="MenuBar1" class="MenuBarVertical">

    <li><a href="index.php">Home</a> </li>

    <li><a href="characters.php">Characters</a></li>

    <li><a href="account.php">My Account</a></li>

    <li><a href="forum.php">Forums</a></li>

    <li><a href="books.php">Books</a></li>

    <li><a href="about.php">About</a></li>

    <li><a href="contact.php">Contact</a></li>

    </ul>

    <h3> </h3>

    <!-- end #sidebar1 --></div>

    <div id="mainContent">

    <h1>Contact Form</h1>

     

    <?php

    if ($_POST && isset($missing) && !empty($missing)) {

    ?>

     

    <?php

    } elseif ($_POST && !$mailSent) {

    ?>

     

    <?php

    } elseif ($_POST && $mailSent) {

    ?>

     

     

     

     

     

     

     

    <form id="contact" name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">

    <table width="517" border="0" cellpadding="3" cellspacing="10">

    <tr>

    <th width="212" scope="col"><span class="warning">*</span> First Name:</th>

    <th width="263" scope="col"><label for="first_name"> <?php

    if (isset($missing) && in_array('first_name', $missing)) {

    }

    ?>

     

    </label>

    <input name="first_name" type="text" id="first_name" size="35" maxlength="30" /></th>

    </tr>

    <tr>

    <td><strong> <span class="warning">*</span> Last Name:</strong></td>

    <td><label for="last_name"> <?php

    if (isset($missing) && in_array('last_name', $missing)) {

    }?>

    </label>

    <input name="last_name" type="text" id="last_name" size="35" maxlength="30" /></td>

    </tr>

    <tr>

    <td><span class="warning">*</span> Email Address:</td>

    <td><label for="email">

    <?php

    if (isset($missing) && in_array('email', $missing)) {

    }

    ?></label>

    <input name="email" type="text" id="email" size="35" /></td>

    </tr>

    <tr>

    <td><p> </p>

    <p>I Want to Help With:

    </p>

    <p>(optional)</p></td>

    <td><p>

    <label>

    <input type="checkbox" name="interests[]" value="Advertising" id="interests_0" />

    Advertising </label>

    <br />

    <label>

    <input type="checkbox" name="interests[]" value="Programming" id="interests_1" />

    Programming </label>

    <br />

    <label>

    <input type="checkbox" name="interests[]" value="Designing" id="interests_2" />

    Designing </label>

    <br />

    </p></td>

    </tr>

    <tr>

    <td><p>Additional Comments:</p></td>

    <td><p><br />

    <label for="comments"></label>

    <textarea name="comments" id="comments" cols="30" rows="5"></textarea>

    <br />

    </p></td>

    </tr>

    <tr align="center">

    <td colspan="2"><input type="submit" name="submit" id="submit" value="submit" /></td>

    </tr>

    </table>

    <p><!-- end #mainContent -->

    </p>

    </form>

    </div>

    <div id="footer">

    <!-- end #footer -->Legend of Drizzt © 2010</div>

    <!-- end #container --></div>

    <script type="text/javascript">

    <!--

    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});

    //-->

    </script>

    </body>

    </html>

     

     

    Thanks,

     

     

     

    Cody Perry

  11. I fixed the false statements you said and got the $end error again the only other thing i added was <?php echo $_SERVER['PHP_SELF'] ?> to the action property of the form.

     

     

     

    Still trying to get it right thanks for the help as well kind of stuck not sure whats causing problems.

     

     

     

     

    Thanks,

     

     

     

     

    Cody Perry

  12. Now i have a $end error after i deleted a line of code under the //send it comment. If you guys could look over the code there, its the complete form and see if theres a bracket or semi-colon or something missing. That would be very helpful.

     

     

     

    Anything im missing let me know.

     

     

     

     

    Thanks,

     

     

     

     

    Cody Perry

  13. Heres the link to the page on the server. I keep getting a Parse error: syntax error, unexpected T_VARIABLE in /home/legendo3/public_html/contact.php on line 100

     

    http://www.legendofdrizzt.com/contact.php

     

     

    Here is my code for the final contact form.

     

     

     

    <?php

    if (array_key_exists('send', $_POST)) {

    // mail processing script

    // remove escape characters from POST array

    if (PHP_VERSION < 6 && get_magic_quotes_gpc()) {

    function stripslashes_deep($value) {

    $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);

    return $value;

    }

    $_POST = array_map('stripslashes_deep', $_POST);

    }

    $to = 'codyperry65@yahoo.com'; // use your own email adress

    $subject = 'Legend of Drizzt Feedback Message';

     

    // list expected fields

    $expected = array('first_name', 'last_name', 'email', 'comments', 'interests');

    // set required fields

    $required = array('first_name', 'last_name', 'email', 'comments');

    // create empty array for missing fields

    $missing = array();

    // set default values for variables that might not exist

    if (!isset($_POST['interests'])) {

    $_POST['interests'] = array();

    }

     

    // assume that there is nothing suspect

    $suspect = false;

    // create a pattern to locate suspect phrases

    $pattern = '/Content-Type:|Bcc:|Cc:/i';

     

    // function to check for suspect phrases

    function isSuspect($val, $pattern, &$suspect) {

    // if the variable is an array, loop through each element

    // and pass it recursively back to the same function

    if (is_array($val)) {

    foreach ($val as $item) {

    isSuspect($item, $pattern, $suspect);

    }

    }

    else {

    // if one of the suspect phrases is found, set Boolean to true

    if (preg_match($pattern, $val)) {

    $suspect = true;

    }

    }

    }

     

    if ($suspect) {

    $mailSent = flase;

    unset($missing);

    } else {

     

     

     

    // process the $_POST variables

    $first_name = $_POST['first_name'];

    $last_name = $_POST['last_name'];

    $email = $_POST['email'];

    $comments = $_POST['comments'];

     

    }

     

    // validate the email address

    if (!$empty($email)) {

    // regex to identify illegal characters in email address

    $checkEmail = '/^[^@]+@[^\s\r\n\'";,@%]+$/';

    // reject the email address if it doesn't match

    if (!preg_match($checkEmail, $email)) {

    $suspect = true;

    $mailSent = flase;

    unset($missing);

    }

     

    }

     

    // go ahead only if not suspect all required fields OK

    if (!$suspect && empty($missing)) {

     

     

    // build the messege

    $messege = "First Name: $first_name\r\n\r\n";

    $messege = "Last Name: $last_name\r\n\r\n";

    $messege .= "Email: $email\r\n\r\n";

    $messege .= "Comments: $comments\r\n\r\n";

    $messege .= 'Interests: '.implode(',', $interests);

     

    // limit line length to 150 characters

    $messege = wordwrap($messege, 150);

     

    // create additional headers

    $headers = "From: Feedback from Legend of Drizzt Website<codyperry65@yahoo.com>\r\n";

    $headers .= 'Content-Type: text/plain; charset=utf-8';

    $headers .= 'Cc: codyperry65@yahoo.com';

    if (!empty($email)) {

    $headers .= "\r\nReply-To: $email";

    }

     

    // send it

    ini_set('sendmail_from', 'codyperry65@yahoo.com'

    $mailSent = mail($to, $subject, $message, $headers);

    if ($mailSent) {

    // missing is no longer needed if the email is sent, so unset it

    unset($missing);

    // redirect the page with a fully qualified URL

    header('Location: http://www.legendofdrizzt.com/index.php''>http://www.legendofdrizzt.com/index.php');

    exit;

    }

    }

    }

    ?>

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <title>Legend of Drizzt - Contact</title>

    <link href="../Users/codyperry/Desktop/legendofdrizzt/legendofdrizzt.css" rel="stylesheet" type="text/css" /><!--[if IE 5]>

    <style type="text/css">

    /* place css box model fixes for IE 5* in this conditional comment */

    .twoColFixLtHdr #sidebar1 { width: 230px; }

    </style>

    <![endif]--><!--[if IE]>

    <style type="text/css">

    /* place css fixes for all versions of IE in this conditional comment */

    .twoColFixLtHdr #sidebar1 { padding-top: 30px; }

    .twoColFixLtHdr #mainContent { zoom: 1; }

    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */

    </style>

    <![endif]-->

    <script src="../Users/codyperry/Desktop/legendofdrizzt/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

    <link href="../Users/codyperry/Desktop/legendofdrizzt/SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">

    <!--

    function MM_popupMsg(msg) { //v1.0

    alert(msg);

    }

    //-->

    </script>

    <style type="text/css">

    <!--

    a:link {

    color: #00F;

    text-decoration: none;

    }

    a:visited {

    color: #906;

    text-decoration: none;

    }

    a:hover {

    color: #96F;

    text-decoration: none;

    }

    a:active {

    color: #600;

    text-decoration: none;

    }

    .twoColFixLtHdr #container #mainContent #form1 table tr td strong {

    text-align: center;

    }

    .twoColFixLtHdr #container #mainContent #form1 table {

    text-align: left;

    }

    .twoColFixLtHdr #container #mainContent #form1 table tr td {

    font-weight: bold;

    }

    -->

    </style>

    </head>

     

    <body class="twoColFixLtHdr">

    <yah>

     

    <div id="container">

    <div id="header">

    <h1> </h1>

    <!-- end #header -->

    </div>

    <div class="navbar" id="navbar"></div>

    <div id="sidebar1">

    <ul id="MenuBar1" class="MenuBarVertical">

    <li><a href="../Users/codyperry/Desktop/legendofdrizzt/index.php">Home</a> </li>

    <li><a href="../Users/codyperry/Desktop/legendofdrizzt/characters.php">Characters</a></li>

    <li><a href="../Users/codyperry/Desktop/legendofdrizzt/account.php">My Account</a></li>

    <li><a href="../Users/codyperry/Desktop/legendofdrizzt/forum.php">Forums</a></li>

    <li><a href="../Users/codyperry/Desktop/legendofdrizzt/books.php">Books</a></li>

    <li><a href="../Users/codyperry/Desktop/legendofdrizzt/about.php">About</a></li>

    <li><a href="../Users/codyperry/Desktop/legendofdrizzt/contact.php">Contact</a></li>

    </ul>

    <h3> </h3>

    <!-- end #sidebar1 --></div>

    <div id="mainContent">

    <h1>Contact Form</h1>

     

    <?php

    if ($_POST && isset($missing) && !empty($missing)) {

    ?>

     

    <?php

    } elseif ($_POST && !$mailSent) {

    ?>

     

    <?php

    } elseif ($_POST && $mailSent) {

    ?>

     

    <?php } ?>

     

     

     

     

     

     

    <form id="contact" name="form1" method="post" action="">

    <table width="517" border="0" cellpadding="3" cellspacing="10">

    <tr>

    <th width="212" scope="col"><span class="warning">*</span> First Name:</th>

    <th width="263" scope="col"><label for="first_name"> <?php

    if (isset($missing) && in_array('first_name', $missing)) { ?>

     

    </label>

    <input name="first_name" type="text" id="first_name" size="35" maxlength="30" /></th>

    </tr>

    <tr>

    <td><strong> <span class="warning">*</span> Last Name:</strong></td>

    <td><label for="last_name"> <?php

    if (isset($missing) && in_array('last_name', $missing)) { ?>

    </label>

    <input name="last_name" type="text" id="last_name" size="35" maxlength="30" /></td>

    </tr>

    <tr>

    <td><span class="warning">*</span> Email Address:</td>

    <td><label for="email">

    <?php

    if (isset($missing) && in_array('email', $missing)) { ?></label>

    <input name="email" type="text" id="email" size="35" /></td>

    </tr>

    <tr>

    <td><p> </p>

    <p>I Want to Help With:

    </p>

    <p>(optional)</p></td>

    <td><p>

    <label>

    <input type="checkbox" name="interests[]" value="Advertising" id="interests_0" />

    Advertising </label>

    <br />

    <label>

    <input type="checkbox" name="interests[]" value="Programming" id="interests_1" />

    Programming </label>

    <br />

    <label>

    <input type="checkbox" name="interests[]" value="Designing" id="interests_2" />

    Designing </label>

    <br />

    </p></td>

    </tr>

    <tr>

    <td><p>Additional Comments:</p></td>

    <td><p><br />

    <label for="comments"></label>

    <textarea name="comments" id="comments" cols="30" rows="5"></textarea>

    <br />

    </p></td>

    </tr>

    <tr align="center">

    <td colspan="2"><input type="submit" name="submit" id="submit" value="submit" /></td>

    </tr>

    </table>

    <p><!-- end #mainContent -->

    </p>

    </form>

    </div>

    <div id="footer">

    <!-- end #footer -->Legend of Drizzt © 2010</div>

    <!-- end #container --></div>

    <script type="text/javascript">

    <!--

    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});

    //-->

    </script>

    </body>

    </html>

     

     

    this is the area of the code thats causing a problem.

     

     

     

     

     

    // send it

    ini_set('sendmail_from', 'codyperry65@yahoo.com'

    $mailSent = mail($to, $subject, $message, $headers);

    if ($mailSent) {

    // missing is no longer needed if the email is sent, so unset it

    unset($missing);

    // redirect the page with a fully qualified URL

    header('Location: http://www.legendofdrizzt.com/index.php');

    exit;

    }

     

     

     

    This is the line 100: $mailSent = mail($to, $subject, $message, $headers);

     

     

    if somebody could help that would be great.

     

     

     

    Thanks,

     

     

     

    Cody Perry

  14. But if i keep it this way it shows up right besides the warning messages right now. Could it be because im not viewing it on a server.

     

     

     

     

    // process the $_POST variables

    $first_name = $_POST['first_name'];

    $last_name = $_POST['last_name'];

    $email = $_POST['email'];

    $comments = $_POST['comments'];

     

     

     

    thanks,

     

     

     

    Cody Perry

  15. Can you post the code you are working with? And specifically, what issues are you having?

     

     

     

    <?php

    if (array_key_exists('send', $_POST)) {

    // mail processing script

    // remove escape characters from POST array

    if (PHP_VERSION < 6 && get_magic_quotes_gpc()) {

    function stripslashes_deep($value) {

    $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);

    return $value;

    }

    $_POST = array_map('stripslashes_deep', $_POST);

    }

    $to = 'codyperry65@yahoo.com'; // use your own email adress

    $subject = 'Legend of Drizzt Feedback Message';

     

    // list expected fields

    $expected = array('first_name', 'last_name', 'email', 'comments');

    // set required fields

    $required = array('first_name', 'last_name', 'email', 'comments');

    // create empty array for missing fields

    $missing = array();

     

     

    // process the $_POST variables

    foreach ($_POST as $key => $value) {

    // assign to temporary variable and strip whitespace if not an array

    $temp = is_array($value) ? $value : trim($value);

    // if empty and required, add to $missing array

    if (empty($temp) && in_array($key, $required)) {

    array_push($missing, $key);

    } elseif (in_array($key, $expected)) {

    // otherwise, assign to a variable of the same name as $key

    ${$key} = $temp;

    }

     

    // build the messege

    $messege = "First Name: $first_name\r\n\r\n";

    $messege = "Last Name: $last_name\r\n\r\n";

    $messege .= "Email: $email\r\n\r\n";

    $messege .= "Comments: $comments";

     

    // limit line length to 70 characters

    $messege = wordwrap($messege, 150);

     

    // send it

    $mailSent = mail($to, $subject, $message);

    }

    ?>

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <title>Legend of Drizzt - Contact</title>

    <link href="legendofdrizzt.css" rel="stylesheet" type="text/css" /><!--[if IE 5]>

    <style type="text/css">

    /* place css box model fixes for IE 5* in this conditional comment */

    .twoColFixLtHdr #sidebar1 { width: 230px; }

    </style>

    <![endif]--><!--[if IE]>

    <style type="text/css">

    /* place css fixes for all versions of IE in this conditional comment */

    .twoColFixLtHdr #sidebar1 { padding-top: 30px; }

    .twoColFixLtHdr #mainContent { zoom: 1; }

    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */

    </style>

    <![endif]-->

    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

    <link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">

    <!--

    function MM_popupMsg(msg) { //v1.0

    alert(msg);

    }

    //-->

    </script>

    <style type="text/css">

    <!--

    a:link {

    color: #00F;

    text-decoration: none;

    }

    a:visited {

    color: #906;

    text-decoration: none;

    }

    a:hover {

    color: #96F;

    text-decoration: none;

    }

    a:active {

    color: #600;

    text-decoration: none;

    }

    .twoColFixLtHdr #container #mainContent #form1 table tr td strong {

    text-align: center;

    }

    .twoColFixLtHdr #container #mainContent #form1 table {

    text-align: left;

    }

    .twoColFixLtHdr #container #mainContent #form1 table tr td {

    font-weight: bold;

    }

    -->

    </style>

    </head>

     

    <body class="twoColFixLtHdr">

    <yah>

     

    <div id="container">

    <div id="header">

    <h1> </h1>

    <!-- end #header -->

    </div>

    <div class="navbar" id="navbar"></div>

    <div id="sidebar1">

    <ul id="MenuBar1" class="MenuBarVertical">

    <li><a href="index.php">Home</a> </li>

    <li><a href="characters.php">Characters</a></li>

    <li><a href="#">My Account</a></li>

    <li><a href="#">Forums</a></li>

    <li><a href="#">Books</a></li>

    <li><a href="#">About</a></li>

    <li><a href="#">Contact</a></li>

    </ul>

    <h3> </h3>

    <!-- end #sidebar1 --></div>

    <div id="mainContent">

    <h1>Contact Form</h1>

    <?php

    if ($_POST && !$mailSent) {

    ?>

    <p class="warning">Sorry, there was a problem sending your message.

    Please try again.</p>

    <?php

    } elseif ($_POST && $mailSent) {

    ?>

    <p><strong>Your message has been sent. Thank you for your feedback.

    </strong></p>

    <?php } ?>

     

     

     

     

     

     

    <form id="contact" name="form1" method="post" action="">

    <table width="517" border="0" cellpadding="3" cellspacing="10">

    <tr>

    <th width="212" scope="col">First Name:</th>

    <th width="263" scope="col"><label for="first_name"></label>

    <input name="first_name" type="text" id="first_name" size="35" maxlength="30" /></th>

    </tr>

    <tr>

    <td><strong>Last Name:</strong></td>

    <td><label for="last_name"></label>

    <input name="last_name" type="text" id="last_name" size="35" maxlength="30" /></td>

    </tr>

    <tr>

    <td>Email Address:</td>

    <td><label for="email"></label>

    <input name="email" type="text" id="email" size="35" /></td>

    </tr>

    <tr>

    <td><p> </p>

    <p>I Want to Help With:

    </p>

    <p>(optional)</p></td>

    <td><p>

    <label>

    <input type="checkbox" name="interests[]" value="Advertising" id="interests_0" />

    Advertising </label>

    <br />

    <label>

    <input type="checkbox" name="interests[]" value="Programming" id="interests_1" />

    Programming </label>

    <br />

    <label>

    <input type="checkbox" name="interests[]" value="Designing" id="interests_2" />

    Designing </label>

    <br />

    </p></td>

    </tr>

    <tr>

    <td><p>Additional Comments:</p></td>

    <td><p><br />

    <label for="comments"></label>

    <textarea name="comments" id="comments" cols="30" rows="5"></textarea>

    <br />

    </p></td>

    </tr>

    <tr align="center">

    <td colspan="2"><input type="submit" name="submit" id="submit" value="submit" /></td>

    </tr>

    </table>

    <p><!-- end #mainContent -->

    </p>

    </form>

    </div>

    <div id="footer">

    <!-- end #footer -->Legend of Drizzt © 2010</div>

    <!-- end #container --></div>

    <script type="text/javascript">

    <!--

    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});

    //-->

    </script>

    </body>

    </html>

×
×
  • Create New...