Jump to content

gristoi

Members
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by gristoi

  1. try: <ul> <?php $result = mysql_query("SELECT * FROM pages INNER JOIN parent_pages ON pages.parentID=parent_pages.ID WHERE pages.parentID=parent_pages.ID"); while ($row = mysql_fetch_assoc($result)):?> <li class="mainnav"><a rel='nofollow' href='view.php?id=<?php print $row['ID'];?>'><?php print $row['Name'];?></a> <ul> <li class="subnav"><a rel='nofollow' class="sublink_nav" href='viewpage.php?pageid=<?php echo $row['pageID'];?>'><?php print $row['pageName'];?></a></li> </ul> </li> <?php endwhile;?> <?php $result2 = mysql_query("SELECT * FROM parent_pages WHERE pageID='0'"); while ($row2 = mysql_fetch_assoc($result2)):?> <li class="mainnav"><a rel='nofollow' href='view.php?id=<?php print $row2['ID'];?>'><?php print $row2['Name'];?></a></li> <?php endwhile;?> </ul>
  2. is your new database table definitely called webestat_site and not webstats_site. And the table called stats?
  3. Have you even attempted this on your own? you will be hard pushed to find someone who will write an entire script for you from scratch. If you have attempted this then please post some of your code
  4. Google is your friend: http://dev.mysql.com/doc/refman/5.0/en/join.html
  5. there is a bult in function in mysql that allows you to pass in an array as a parameter: $array = (1,2,3,4); SELECT *, CONCAT(locations.zip_code, ' ', locations.city) as location from locations, locations_associations where locations.zip_code = locations_associations.zip_code AND client_id IN ($array);
  6. <table style="width:700px;display:none;">
  7. you could use the google webmaster tools. this will show you all traffic data etc for your site. Also it allows you to upload you sitemap, which could increase your ranking and searchability. https://www.google.com/accounts/ServiceLogin?service=sitemaps&passive=true&nui=1&continue=https://www.google.com/webmasters/tools/&followup=https://www.google.com/webmasters/tools/&hl=en
  8. firstly, try not to use sum as a field name. this is a reserved word in mysql. You can try something like this: INSERT INTO table (Date, Value, TotalSum) VALUES ('$date', '$value', (SELECT SUM(value) FROM table WHERE Date < '$date')) Note that i am presuming your ID is auto incimenting so i havent included it
  9. err? your missing part and email from your post declarations
  10. Drag and drop, sortable lists on the fly without page reloading......................... the list goes on
  11. firstly,try to learn the an Object Oriented approach to your coding. Other languages to think of are Ext JS, Extjs Touch( mobile), also read up on Design Patterns
  12. It is escaping the string for you. because you are using double quotes within double qoutes then without them your echo would output: <a href= onely, and the rest would be ignored / thrown error
  13. foreach($_SESSION as $product => $quantity) { INSERT INTO table1 (product_id, quantity) VALUES ('$product', '$quantity') ....... } looks like the session is holding a key-pair array of data, so a simple foreach loop will extract what you need
  14. use some javascript on the client side and then some further validation on the server side: pop an id into each of the field tags and try something like var hpl = document.getElementById('hpl')
  15. what is the data type for your dob field? If you used a date type then you can just do it all in one query SELECT * FROM detail WHERE dob = CURDATE() and if you use a datetime datatype: SELECT * FROM detail WHERE DATE(dob) = CURDATE() and if you wanted to get everyone who had a birthday tomorrow: SELECT * FROM detail WHERE DATE(dob) = DATE_ADD(CURDATE(), INTERVAL 1 DAY); etc.....................
  16. The exception is telling you that you have a syntax error in your query. This could be due to an escape character being passed into the user variable. Try doing: $query = "SELECT * FROM `users` WHERE `username` = '".$user."' AND `password` = '".$pw."'"; Also try and echo out $query to see what the query looks like
  17. If you have access to setup up cron jobs then set a cron to run mysqldump -u<your username> -p< your password> <database name> | <compression type e.g gzip> > location
  18. youve got the div's style set to hidden. So it wont diplay enything until you add the display block to it
  19. Remove any whitespace
  20. Mjdamato is right, the php.net manually is a life saver. A great reference
  21. You have your database insert sitting outside of your error logic. So no matter what you are executing the query. Move the query into the else statement
  22. Try ($num = 10; $num >= 1; $num--)
  23. Try sending a static email to test if the actual email functionality is working mail('youremailaddress@somewhere','test subject','test message'); If that dosent send then you need to ensure your web hosting has email functionality enabled. Otherwise you need to echo out each of the variables. Your 'from' is a header parameter and should be in the correct format 'From : [email protected]'
  24. For starters you haven't added the message into the Mail function. secondly, are you testing this from your localhost, and if so do u have an email server installed?
×
×
  • 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.