Jump to content

hcdarkmage

Members
  • Posts

    326
  • Joined

  • Last visited

Everything posted by hcdarkmage

  1. Let's take this one step at a time. Going back over some of your code, I have seen some mistakes (i.e. missing end tags), but have faith. We are working on your problem. For your index.php, it should look similar to this: <?php include "menu.inc.php"; function menu($_menu){ $str = ''; foreach($_menu as $url => $name){ $sel = ($_GET['page'] == $url ) ? ' id="selected" ' : ''; $str .= "<li ". $sel ."><a href=" . $url . " >" . $name . "</a>\n"; } echo $str; } $page = ( isset($_GET['pg']) ? $_GET['pg'] : ((isset($_GET['page']))? $_GET['page']:'home')); $file = basename($page).'.php'; $html_path = "php/"; define('TITLE', 'This is the page title.'); include('./php/header.php'); ?> <div id="main-content"> <div id="left-column"> <div id="logo"> <img src="img/logo.png" alt="" width="150" height="150" align="left" /> <span class="logotxt1">Health</span> <span class="logotxt2">Basics</span> <span class="logotxt3">TM</span><br /><span style="margin-left:15px;">The website of Andrea Stevens, M.S., C.N.S., C.M.T.A. Clinical Nutritionist</span> </div> <div class="box2"> <p><center>Using Whole Food Nutrition and Digestive System Health to Achieve your Health Goals Naturally</center></p> <ul style="margin-top:10px;"> <li>Consultations specializing in Digestive System Dysfunction and Children with Neurological and Developmental Disorders</li> <li>Educational Programs focusing on Natural, Whole Foods and Wellness</li> </ul> </div> <?php if (file_exists($html_path.$file)) include $html_path.$file; ?> </div> <div id="right-column"> <div id="main-image"><img src="img/andrea.jpg" height="240px" width="240px" alt="" /></div> <div class="sidebar"> <ul id="menu"> <? #include $html_path."menu.html"; menu($_menu); ?> <h3>Contacts</h3> <p> Health Basics LLC<br /> Toll Free: +1 877 HBNET 50<br /> Phone: +1 610 857 1399<br /> Fax: +1 815 550 1543<br /> Email: <a href="mailto:contact@healthbasics.net">contact@healthbasics.net</a><br /> Skype: health.basics </p> <h3>Subscribe</h3> <form method="post" action="http://healthbasics.net/blog/"> <input type="hidden" name="ip" value="<?=$_SERVER['REMOTE_ADDR']?>" /> <p> Your email:<br /> <input type="text" name="email" value="Enter email address..." size="20" onfocus="if (this.value == 'Enter email address...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Enter email address...';}" /> </p> <p> <input type="submit" name="subscribe" value="Subscribe" /> <input type="submit" name="unsubscribe" value="Unsubscribe" /> </p> </form> <p> <!-- comment out paypal <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="10802546"> <input type="image" src="img/paypal.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> --> </p> <p> </p> <p> <!-- comment out amazon <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2F&tag=healbasi07-20&linkCode=ur2&camp=1789&creative=9325" target="_blank"><img src="img/amazon.gif" alt="" width="200px" height="26px"/></a> --> </p> </div> </div> </div> <?php include('./php/footer.php'); ?> header.php will look something like: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title><?php echo TITLE ?></title> <link rel="shortcut icon" href="img/favicon.ico" /> <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-language" content="en-us" /> <meta http-equiv="imagetoolbar" content="false" /> <meta name="author" content="Adroon Design | www.adroon.com" /> <meta name="copyright" content="Copyright (c) Health Basics LLC 2010" /> <meta name="description" content="Andrea Stevens is a clinical nutritionist specializing in consultations on digestive system dysfunction and children with neurological and developmental disorders as well as educational programs focusing on natural whole foods and wellness. Health Basics is an international distributor of natural health products, vitamins and supplements." /> <meta name="keywords" content="metabolic typing, body ecology, body ecology diet, digestive problems, digestive disorders, food sensitivities, dysbiosis, autism, asperberger syndrome, aspergers syndrome, asperger's syndrome, asperger, aspergers, asperger's, ASD, spectrum disorder, GI problems, GI disorders, gastrointestinal problems, gastrointestinal disorders, whole foods nutritionist, natural nutritionist, functional nutritionist, functional healthcare, organic foods, organic, holistic healing, holistic healthcare, digestive system disorders, candidiasis, candida, candida related problems, yeast related problems, yeast overgrowth, infant feeding, infant feeding problems, failure to thrive, children eating problems, children neurological problems, neurological problems, eating problems, seizures, behavior problems, learning problems, learning disabilities, learning disability, attention deficit disorder, ADD, attention deficit disorder, attention deficit hyperactivity disorder, ADHD, hyperactivity, hyperactivity disorder, DAN Protocol, leaky gut, crohns, crohn's, crohns disease, crohn's disease" /> <meta name="mssmarttagspreventparsing" content="true" /> <meta name="robots" content="index, follow, noarchive" /> <meta name="revisit-after" content="7 days" /> <meta name="google-site-verification" content="LLvcG6P8wvTcKL-RrhBEs7w0uMFrax06UrzaExDYvEY" /> <!--[if lt IE 7]> <script type="text/javascript" src="css/unitpngfix.js"></script> <![endif]--> </head> <body> <div id="wrapper"> <div id="header"> <div id="nav"> <a style="float:left" href="http://www.healthbasics.net/"><big><b>Health Basics™</b></big></a> <a href="<?php echo $_SERVER['PHP_SELF'].'?page=home'?>">Home</a> | <a href="<?php echo $_SERVER['PHP_SELF'].'?page=calendar'?>">Calendar</a> | <a href="http://shop.healthbasics.net/">Online Store</a> | <a href="./blog/">Blog</a> </div> <div id="bg"></div> </div> And footer.php something like: <div id="footer"> <div id="footer_copy"> © 2010 <a href="http://healthbasics.net">Health Basics LLC</a>. All rights reserved. Developed by <a href="http://adroon.com">Adroon Design</a><br/> <a href="http://shop.healthbasics.net/pages/disclaimer">Disclaimer</a> </div> <div id="footer_links"> <a href="http://www.facebook.com/pages/edit/picture.php?success=1&id=243139889898#/pages/Health-Basics/243139889898" target="_blank"><img src="img/facebook.png" alt="" /></a> <a href="http://twitter.com/HealthBasicsLLC" target="_blank"><img src="img/twitter.png" alt="" /></a> <a href="http://www.linkedin.com/profile?viewProfile=&key=61284894&authToken=Ic-E&authType=name" target="_blank"><img src="img/linkedin.png" alt="" /></a> </div> </div> </div> </body> </html> This should help you see how it works with the separation of the files. Your constants on all pages are header.php and footer.php.
  2. Simple way to combat that: Simply change the line I pointed out to: $str .= "<li ". $sel ."><a href=" . $url . " >" . $name . "</a>\n"; And change the menus to: 'index.php?page=biography' => 'Biography', and set the Google menu to: 'http://www.google.com' => 'Google', And you should be able to set up any other external links that you like.
  3. Take a look at this: http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-glossy.htm
  4. Actually ken, if you go to the link he supplied and look at the page source, you'll see that his whole code is messed up. Travel, could you please show the code you have for all three pages, and make sure you use the code tags for your code. That way we can help you out. There are many inconsistencies that need to be fixed and that may be what is causing your problems. Just post the current code by doing something like: header.php code here main code code here footer.php code here
  5. It may help if we can see the code to footer.php. There maybe some CSS styling or inline styling in there that is causing the problem. pLease post more code in the [ code ][ /code ] tags so we can help you out more.
  6. Try this <?php // Address error handling. ini_set ('display_errors', 1); error_reporting (E_ALL & ~E_NOTICE); // Validate the age. if ($age >= 18 || $age < 35) { // Here is the change, but it may be if($age >= 18 && $age < 35) print '<p>Youth Message!</p>'; } else { $age .=$age; } // End of 1st conditional. if ($age >= 35) { print '<p>Generic Message!</p>'; } else { $age .=$age; } // End of 2nd conditional. ?>
  7. Do you see the problem you are creating with this code here? $query = "INSERT INTO capture ('$Name', '$Ad1', '$Ad2', '$City', '$State', '$Zip5', '$Zip4', '$Email', '$AreaCode', '$Phone3', '$Phone4', '$Ext', '$Item01Qty', '$Item02Qty', '$Item03Qty', '$Item04Qty', '$Item05Qty', '$Item06Qty', '$Item07Qty', '$Item01Total', '$Item02Total', '$Item03Total', '$Item04Total', '$Item05Total', '$Item06Total', '$Item07Total','$Total_Purchase', '$NJ_Tax', '$SH_Charge', '$Amount_To_Pay', '$CC1', '$CC2', '$CC3', '$CC4', '$Expires' ) VALUES ('$Name', '$Ad1', '$Ad2', '$City', '$State', '$Zip5', '$Zip4', '$Email', '$AreaCode', '$Phone3', '$Phone4', '$Ext', '$Item01Qty', '$Item02Qty', '$Item03Qty', '$Item04Qty', '$Item05Qty', '$Item06Qty', '$Item07Qty', '$Item01Total', '$Item02Total', '$Item03Total', '$Item04Total', '$Item05Total', '$Item06Total', '$Item07Total', '$Total_Purchase', '$NJ_Tax', '$SH_Charge', '$Amount_To_Pay', '$CC1', '$CC2', '$CC3', '$CC4', '$Expires' )"; I doubt that the fields that you are trying to put data in are named with the data that the user sends. Take a look and try again.
  8. It is not inserting the values because it doesn't know where to put them. I believe the proper syntax for this would be $query = "INSERT INTO tablename (columns) VALUES (data)"; If your first column is auto incrementing, then I suggest you just skip to Name in the columns section and do the same for the values. Putting the ' ' in the values is a bad idea. In your case it would look like $query = "INSERT INTO capture ('Name', 'Ad1', 'Ad2', . . .) VALUES ('$Name', '$Ad1', '$Ad2', . . .)";
  9. Another thing you can try is modify your DB so that it has a column like "used" with a default value of 0. When that user is used you set the value to 1. Then in your query, you just check to see if "used = 0". Just a thought. But, then again, you would have to change the query if you wanted them to be displayed again . . .
  10. that is a browser issue. I doubt there is anything you can do on your site itself to stop that from happening. EDIT: You could just select the "Never For This Site" Button.
  11. I had a similar problem using random. I don't know if this helps but try looking at http://www.phpfreaks.com/forums/index.php/topic,149411.0.html that is the topic I started and it helped a lot.
  12. You actually had 2 extra } in there. Here is the cleaned code: <?php class weather { public static $response; public static $location; public static $current; public static $nextdays; public static $error = false; public function weather() { $this->location = 'Pickering, ON'; } public function get() { if (empty($this->location)) { $this->error = true; return false; } $requestAddress = "http://www.google.com/ig/api?weather=".trim(urlencode($this->location))."&hl=en"; $xml_str = file_get_contents($requestAddress,0); $xml = new SimplexmlElement($xml_str); if (!$xml->weather->problem_cause) { $this->response = $xml->weather; $this->parse(); }else{ $this->error = true; } } public function parse() { foreach($this->response as $item) { $this->current = $item->current_conditions; foreach($item->forecast_conditions as $new) { $this->nextdays[] = $new; } } } public function display() { echo '<table border=1 cellpadding=2 align=center>'; echo '<tr align=center>'; foreach($this->nextdays as $new) { echo '<td>'; echo '<div class="weatherIcon">'; echo '<h2>'.$new->day_of_week['data'].'</h2>'; echo '<img src="http://www.durhamit.ca/test/' .$new->icon['data'] . '"/><br/>'; echo '<br />Min: '.$this->convert($new->low['data']).' &#38;#38;#38;#8451;'; echo '<br />Max: '.$this->convert($new->high['data']).' &#38;#38;#38;#8451;'; echo '<br />'.$new->condition['data'].' '; echo '</div>'; echo '</td>'; } echo '</tr>'; echo '</table>'; } public function convert($value, $unit = "C") { switch($unit){ case "C": return number_format(($value - 32)/1.; }; } }
  13. It helps if you keep your tags in the proper order. Try this: public function display() { echo '<table border=1 cellpadding=2 align=center>'; echo '<tr align=center>'; foreach($this->nextdays as $new) { echo '<td>'; echo '<div class="weatherIcon">'; echo '<h2>'.$new->day_of_week['data'].'</h2>'; echo '<img src="http://www.durhamit.ca/test/' .$new->icon['data'] . '"/><br/>'; echo '<br />Min: '.$this->convert($new->low['data']).' &#38;#8451;'; echo '<br />Max: '.$this->convert($new->high['data']).' &#38;#8451;'; echo '<br />'.$new->condition['data'].' '; echo '</div>'; echo '</td>'; } echo '</tr>'; echo '</table>'; }
  14. You could google php tutorials to help you out. Or better yet you can go to http://www.w3schools.com. OR even better, if you want someone to do the work for you, you can ask to have this moved to the freelance forum.
  15. Don't forget to mark the thread as solved.
  16. Try this: <?php if (isset($_POST['redirect'])){ header("Location: http://www.website.com/".$_POST['redirect']."submit.php"); exit(); } ?> <form method="post" action=""> <select name="redirect"> <option value="vodka">Vodkas</option> <option value="bourbons">Bourbons</option> <option value="rum">Rums</option> <option value="gin">Gins</option> <option value="brandy">Brandy</option> <option value="tequila">Tequila</option> <option value="whiskey">Whiskey</option> </select> <input type="submit" value="Go!"> </form>
  17. I agree with you, and I was just offering a suggestion, lol. I was thinking along the same lines and it seems that you would be stuck without a solution unless you encrypt everything. Especially if they have the ability to modify the files to remove the lic.php file.
  18. You could put in your "lic.php" file a variable like: $sugar = "needed"; Then in your other pages use an if statement to see if that variable is found. If the variable is missing, then exit the page or show an error.
  19. This may explain why: http://www.w3schools.com/css/pr_text_text-decoration.asp. It shows you what options you can put in the text-decoration tag.
  20. ignace is right. I keep forgetting about firebug, .
  21. One more suggestion, I guess. In the area that you want to put your code try putting in something like <p>This is test text to see if it shows.</p> See if anything shows up that way.
  22. Check your CSS file. I see that you are pulling one. All you have to do is see if there is a body { color: #000000; } or something similar in the CSS file.
  23. It may be that you have the text color the same as your body color. You may want to check that out.
×
×
  • 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.