Jump to content

mindapolis

Members
  • Posts

    361
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

mindapolis's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

1

Community Answers

  1. Hi, I'm working on mediaservicesunlimited.com/bixler/homepage.php and I'm not understanding why the background color of the dropdown menu stops right after the word. I have played with the width of the list but it's not helping. if I could get some guidance, I would really appreciate it! <?php function headerInfo() { return <<<HEREDOC <header> <nav> <ul> <li><a href="#">Home</a></li> <li><a href="#">About Us</a> <ul> <li class="submenu"><a href="#">Agents </a></li> <li class="submenu"><a href="#">Locations</a></li> </ul> <li><!--end of about us menu list --> <li><a href="#">Services</a></li> <li><a href="quote.php" tabindex="4" accesskey="Q">Get A Quote</a></li> <li><a href="#">Contact</a> <ul> <li class="submenu"><a href="pay-my-bill.php">Pay My Bill</a></li> <li class="submenu"><a href="contact.php">Cotasct Us</a></li> </ul> </nav> <figure id="logo"> <img src="assets/bixlerlogo.png" width="304" height="88" alt=""/> </figure> <h3>Service Beyond The Contract </h3> </header> HEREDOC; }?> * { margin:0; padding:0; } body { Height:100%; width:100%; background-color:#cccb99; } nav { background-color:#000000; padding-top:2%; width:40%; height:27px; margin-top:2%; margin-left:auto; margin-right:auto; padding-left:3%; } nav a { color:red; } nav ul { list-style-type:none; } nav > ul > li { background-color:#000000; position:relative; } nav > ul li a { background-color:#000000; } nav li { float:left; margin-right:3%; } nav > ul > li > ul { display:none; position:absolute; } nav > ul > li:hover > ul { display:block; } nav ul ul li { display:block; width:60px; } .submenu { width:200px; } .submenu a { padding-top:4%; display:inline-block; } .submenu a:hover { background-color:red; color:#000000; } /*.menuArrow { position:absolute; top:15px; right:700px; }*/ #logo { width:304px; margin-left:auto; margin-right:auto; margin-top:2%; margin-bottom:2% } h3 { color:#E10D0C; /*#763c3c;*/ text-align:center; margin-bottom:2%; } #contactInfo { float:left; } #servicesList, #eocialMedia { float:right; width: 33%; } article { float:left; width:35%; height:45%; margin-left:10%; margin-bottom:6%; background-color:#FFFFFF; } aside { float:right; width:30%; height:35%; margin-right:10%; background-color:#FFFFFF; } footer { background-color:#000000; overflow:auto; Width:100%; padding-left:10%; padding-top:2%; padding-bottom:2%; color:#C4C4C4; clear:both; } /*phone size*/ @media screen and (max-width:320px) { } /*tablet size */ @media screen and (min-width:321px) { }
  2. I have been working with it and, first I did put the opening and closing tags in the functions file. I'm sorry, that was my error. But it 's like it 's not seeing the function file. The file is http://www.mediaservicesunlimited.com//bixler/functions.php which is the same directory as the template.php so the require statement should be require_once('functions.php'); right?
  3. Hi, I'm getting this error Fatal error: Call to undefined function headerInfo() in /web/html/mediaservicesunlimited.com/bixler/template.php on line 18 functions.php is uploaded and headerInfo is spelled the same in the functions and the template file so I can't figure out what 's wrong. if I can get some help that would be great! Thanks template.php <php require_once('functions.php'); ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> <meta name="keywords" content=""> <meta name="description" content=""> <link rel = "stylesheet" href = "Bixler.css"> <style type="text/css"> </style> </head> <body> <?php headerInfo(); ?> <article> </article> <aside> </aside> </body> </html> functions.php function headerInfo() { echo "<header>"; echo "<nav>"; echo "<ul id=\"drop-nav>\">"; echo "<li><a href=\"#\">Home /a></li>"; echo "<li><a href=\"#\">About Us</a>"; echo "<ul>"; echo "<ul>"; echo "<li><a href=\"#\">About Bixler</a></li>"; echo "<li><a href=\"#\">Agents</a></li>"; echo "<li><a href=\"#\">Locations</a></li>"; echo "<li><a href=\"#\">Testimonies</a></li>"; echo "<li><a href=\"#\">News & Resources </a></li>"; echo "</ul>"; echo "</li>"; echo "<li><a href=\"#\"> Services</a>"; echo "<ul>"; echo "<li><a href=\"#\">Personal</a></li>"; echo "<li><a href=\"#\">Life</a></li>"; echo "<li><a href=\"#\">Commercial</a></li>"; echo "<li><a href=\"#\">Health</a></li>"; echo "<li><a href=\"#\">Senior Benefits</a></li>"; echo "<li><a href=\"#\">Farm</a></li>"; echo "</ul>"; echo "</li>"; echo "<li><a href=\"#\">Get A Quote</a></li>"; echo "<li><a href=\"#\">Contact</a>"; echo "<ul>"; echo "<li><a href=\"#>\">General Inquiries</a></li>"; echo "<li><a href=\"#\">Pay My Bill</a></li>"; echo "</ul>"; echo "</li>"; echo "</ul>"; echo "</nav>"; echo "<figure id=\"logo\">"; echo "<img src=\"assets/bixlerlogo.png\" width=\"304\" height=\"88\" alt=\"logo\"/>"; echo "</figure>"; </figure> echo "<h3>Service Beyond The Contract </h3>"; echo "</header>"; } /*end of headerInfo function */ /*start of footerInfo function */ function footerInfo() { echo "<footer>"; echo "<div id=\"contactInfo">"; echo "Bixler Insurance <br/>"; echo "1043 South 13th St. <br />"; echo "Decatur, IN 46733<br />"; , echo "Phone: (260)-724-3438"; echo "</div>"; echo "<div id="eocialMedia">"; echo "social media icons"; echo "</div>"; echo "<div id="servicesList">"; echo "list of services"; echo "</div>"; echo "</footer>"; } /*end of footerInfo function */
  4. Look, I have been dealing this issue for several days and I have done A LOT of research! If someone could be nicer and help me with this I would really appreciate it.
  5. I kind of got it working. if the first name textbox is empty, but the last name is fliled in, it displays the error message but it does 't keep the last name input. I thought the whole purpose of sticky forms is to keep the form data intact while showing what information is still needed. <!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> </head> <body> <?php $problem = false; if(isset($_POST['submit'])) { if(empty($_POST['fname'])) { $problem = true; echo "Please enter your first name"; } } ?> <form action="sticky2.php" method="post"> <label> <input id="fname" type="text" name="fname" size="15" placeholder="First Name" value ="<?php echo $_POST[fname];//if(isset($_POST['fname'])) echo $_POST['fname'];?>" > <input type="text" name="lname" size="20" placeholder="Last Name"><?php //echo !empty($error['lname']) ? $error['lname'] : '';?> </label> <input type="submit" name="submit" value="Contact Me!"> </form> </body> </html>
  6. I figure it out on a smaller scale! Hopefully I can transfer it on o the bigger form.
  7. I dont understand this at all. I took out all the SQL code out temporary so I could get just this part to work. I'm following an example from an old PHP book, but it is not working and I'm getting really frustrated. When i try to display the form on the webpage, all I get is a blank page. if someone could PLEASE help me, I would really appreciate it. <?php ini_set('display_errors', 'On'); error_reporting(E_ALL); require_once('functions.php'); $errors=array(); //validate user's input if(isset($_POST['submit'])) { validateInput(); if(count($errors) != 0) { display_form(); } else { display_form();} function validateInput() { global $errors; if($_POST['fname'] == "") { $errors['fname']="Please enter your first name"; } /*if($_POST['lname'] == "") { $errors['lname']="Please enter your last name"; $status = false; } return $status;*/ }} //end user validation ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Untitled Document</title> <style type="text/css"> .error { color: #FF0000; } </style> </head> <body> <?php function display_form() { global $errors; ?> <form action="stickyForm.php" method="post"> <label> <input id="fname" type="text" name="fname" size="15" placeholder="First Name" value ="<?php echo $_POST[fname];//if(isset($_POST['fname'])) echo $_POST['fname'];?>" > <input type="text" name="lname" size="20" placeholder="Last Name"><?php //echo !empty($error['lname']) ? $error['lname'] : '';?> <input type="text" name="orgName" placeholder="Organization's Name"maxlength="50"> </label><br /> <label> <!--new row --> <input id="address" type="text" name="address" size="15" placeholder="Street Addresss" maxlength="50"> <input id="city" type="text" name="city" placeholder="City" size="10" maxlength="25"> <select id="state" name="state" placeholder="State" value=""> <option value ="">Please choose a state</option> <?php states($state); ?> </select> <input id = "zipcode" type="number" name="zipcode" placeholder="Zip Code" size="5" maxlength="5"> </label><br /> <label> <!--new row --> <input type="text" name="phone" placeholder="Phone Number:(including area code)" size="10" maxlength="10"> <input type="text" name="fax" size="10" placeholder="Fax Number: (including area code)" maxlength="10"> </label><br /> <label> <!--new row--> <input type="text" id = "email" name="email" placeholder="Email Address" /> <input type="text" id = "confirmEmail" name="confirmEmail" placeholder="Confirm Email Address" /> </label><br /> <label> <!--new row --> What would you like help with? <table id="projectOptions"> <tr span=2> <td><input type="checkbox" name="projectOptions[]" id="projectOptions[]" value="socialMedia">Social Media</td> <td><input type="checkbox" name="projectOptions[]" id="projectOptions[]" value="webContent">Web Content Management</td> </tr> <tr> <td><input name="projectOptions[]" type="checkbox" checked="checked" id="projectOptions[]" value="marketingMaterial">Marketing Material Creation</td> <td><input type="checkbox" name="projectOptions[]" id="projectOptions[]" value="seo">SEO (Search Engine Optimization)</td> </tr> <tr> <td><input type="checkbox" name="projectOptions[]" id="projectOptions[]" value="videoEditing"> Video Editing</td> <td><input type="checkbox" name="projectOptions[]" id="projectOptions[]" value="webDesign">Web Design</td> </tr> </table> </label> Overview about the project:<textarea rows="5" cols="10" placeholder="Overview of Project"></textarea><br /> If you are not a robot, what year is it? <input type="text" name="year" size="4" maxlength="4"><br /> <input type="submit" name="submit" value="Contact Me!"> <input type="reset" name="reset" value="Cancel"> </form> <?php } ?> </body> </html>
  8. Does it matter if the doctype come before or after the bulk of the PHP?
  9. will you be around tonight for any questions?
  10. wait, your code can't be right can it? THe doctype is at the bottom of the page.
  11. I uploaded your code and it dilsplays a blank page.
  12. so put function display_form() { global $errors; before ?> <!doctype html> ?
  13. Again, I apologize for my mistake. I corrected that mistake and now the form won't display at all. it's just a blank page. if someone could nicely point me in the right direction, I would really appreciate it. <?php ini_set('display_errors', 'On'); error_reporting(E_ALL); require_once('functions.php'); function outputErrors($sql_errors) { foreach($sql_errors as $name => $msgs) { echo('<h4 class="error">' . $name . ': ' . $msgs . '</h4>' . PHP_EOL); } } $errors=array(); //validate user's input if(isset($_POST['submit'])) { validateInput(); if(count($errors) != 0) { display_form(); } else { display_form(); } function validateInput() { global $errors; $status = true; if($_POST['fname'] == "") { $errors['fname']="Please enter your first name"; $status = false; } if($_POST['lname'] == "") { $errors['lname']="Please enter your last name"; $status = false; } return $status; } //end user validation $sql_errors = array(); $mysqli = databaseConnection(); if(!$stmt = $mysqli->prepare("INSERT INTO clients(fname, lname, orgName, address, city, state, zipcode, phone, fax, email, confirmEmail, projectOptions, projectOverview, year) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")) { $sql_errors["Prepare"] = $mysqli->error . PHP_EOL; } else { if(!$stmt->bind_param('ssssssiiissisi', $_POST["fname"], $_POST["lname"], $_POST["orgName"], $_POST["address"], $_POST["city"], $_POST["state"], $_POST["zipcode"], $_POST["phone"], $_POST["fax"], $_POST["email"], $_POST["confirmEmail"], $_POST["projectOptions"], $_POST["projectOverview"], $_POST["year"])) { $sql_errors["bind_param"] = $stmt->error . PHP_EOL; } else { if(!$stmt->execute()) { $sql_errors["execute"] = $stmt->error . PHP_EOL; } $stmt->close(); } } $mysqli->close(); header('contactTest.php'); } ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Untitled Document</title> <style type="text/css"> .error { color: #FF0000; } </style> </head> <body> <?php if(isset($sql_errors) && sizeof($sql_errors) > 0) outputErrors($sql_errors); function display_form() { global $errors; ?> <form action="stickyForm.php" method="post"> <label> <input id="fname" type="text" name="fname" size="15" placeholder="First Name" value ="<?php if(isset($_POST['fname'])) echo $_POST['fname'];?>" > <input type="text" name="lname" size="20" placeholder="Last Name"><?php echo !empty($error['lname']) ? $error['lname'] : '';?> <input type="text" name="orgName" placeholder="Organization's Name"maxlength="50"> </label><br /> <label> <!--new row --> <input id="address" type="text" name="address" size="15" placeholder="Street Addresss" maxlength="50"> <input id="city" type="text" name="city" placeholder="City" size="10" maxlength="25"> <select id="state" name="state" placeholder="State" value=""> <option value ="">Please choose a state</option> <?php states($state); ?> </select> <input id = "zipcode" type="number" name="zipcode" placeholder="Zip Code" size="5" maxlength="5"> </label><br /> <label> <!--new row --> <input type="text" name="phone" placeholder="Phone Number:(including area code)" size="10" maxlength="10"> <input type="text" name="fax" size="10" placeholder="Fax Number: (including area code)" maxlength="10"> </label><br /> <label> <!--new row--> <input type="text" id = "email" name="email" placeholder="Email Address" /> <input type="text" id = "confirmEmail" name="confirmEmail" placeholder="Confirm Email Address" /> </label><br /> <label> <!--new row --> What would you like help with? <table id="projectOptions"> <tr span=2> <td><input type="checkbox" name="projectOptions[]" id="projectOptions[]" value="socialMedia">Social Media</td> <td><input type="checkbox" name="projectOptions[]" id="projectOptions[]" value="webContent">Web Content Management</td> </tr> <tr> <td><input name="projectOptions[]" type="checkbox" checked="checked" id="projectOptions[]" value="marketingMaterial">Marketing Material Creation</td> <td><input type="checkbox" name="projectOptions[]" id="projectOptions[]" value="seo">SEO (Search Engine Optimization)</td> </tr> <tr> <td><input type="checkbox" name="projectOptions[]" id="projectOptions[]" value="videoEditing"> Video Editing</td> <td><input type="checkbox" name="projectOptions[]" id="projectOptions[]" value="webDesign">Web Design</td> </tr> </table> </label> Overview about the project:<textarea rows="5" cols="10" placeholder="Overview of Project"></textarea><br /> If you are not a robot, what year is it? <input type="text" name="year" size="4" maxlength="4"><br /> <input type="submit" name="submit" value="Contact Me!"> <input type="reset" name="reset" value="Cancel"> </form> <?php } ?> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.