Jump to content

cyberRobot

Moderators
  • Posts

    3,145
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by cyberRobot

  1. The following quote is from the manual (http://php.net/manual/en/function.strtotime.php):
  2. This can be accomplished with PHP. You would just re-display the form if there were errors, populate it with the information submitted, and display the necessary error notices. The only benefit of using a client-side solution, like JavaScript, is that the page doesn't need to be reloaded before the errors are displayed. JavaScript could display the errors on the fly. Just be aware that JavaScript can be turned off, so it's a good idea to also validate using a server-side solution like PHP.
  3. Perhaps the path to the 768.css and 480.css files isn't correct? Your first two responsive stylesheets are linked using document-relative links. The 768 and 480 stylesheets use root-relative links. Try removing the slash before "css" in the following lines: <link rel="stylesheet" media="only screen and (max-width: 768px) and (min-width: 481px)" href="/css/768.css"> <link rel="stylesheet" media="only screen and (max-width: 480px)" href="/css/480.css">
  4. Have you looked into creating a separate page template? http://codex.wordpress.org/Page_Templates
  5. Did you have the code where you tried fixing the issue? Note: when posting code here, please surround it with tags. It makes the post and code easier to read. To fix the issue, you could try the following: $postThumbInfo = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); if ( $i < 3 ) { echo '<li class="margin_r"><div class="port_tn"><a href="<?php echo $postThumbInfo[0]; ?>" rel="prettyPhoto[portfolio-gallery]">'; echo the_post_thumbnail( array (40,40, true, "title" => "")); echo '</a></div></li>'; $i= $i+"1"; } else { echo '<li class="no_margin"><div class="port_tn"><a href="<?php echo $postThumbInfo[0]; ?>" rel="prettyPhoto[portfolio-gallery]">'; echo the_post_thumbnail( array (40,40, true, "title" => "")); echo '</a></div></li>'; $i = "0"; }
  6. For what it's worth, the <label> tags need to be attached to the form fields. For more information, see: http://www.cyberscorpion.com/2012-02/making-html-forms-more-accessible-and-improving-usability-with-the-label-tag/ Also, there is a specific filter for email addresses: http://php.net/manual/en/filter.examples.validation.php
  7. Is this something you can pass using GET/POST variables?
  8. I don't have any personal recommendations, but you could try out the PHP Freelancing section: http://forums.phpfreaks.com/forum/20-php-freelancing/ Note that you could also post your updated code and perhaps someone here can help. Note that we'll likely need to see more of the code than just the link.
  9. I think the answer can be found here: http://codex.wordpress.org/Function_Reference/the_post_thumbnail#Post_Thumbnail_Linking_to_Large_Image_Size So basically, you would do something like the following: <?php $postThumbInfo = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); ?> <a href="<?php echo $postThumbInfo[0]; ?>" rel="prettyPhoto[portfolio-gallery]"><?php the_post_thumbnail( array (40,40, true, "title" => "")); ?></a> More information about the wp_get_attachment_image_src() function can be found here: http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src
  10. Try changing ["amount"] to $_POST['amount']
  11. There needs to be a space after all open PHP tags. So code like the following: <?}?> ...needs to be changed to something like <?php } ?>
  12. Where does $image[0] come from? Also note that the following: <a href="<?php echo $image[0]; ?>" rel="prettyPhoto[portfolio-gallery]">'; echo the_post_thumbnail( array (40,40, true, "title" => "")); echo '</a> ...should be <a href="<?php echo $image[0]; ?>" rel="prettyPhoto[portfolio-gallery]"><?php the_post_thumbnail( array (40,40, true, "title" => "")); ?></a> Note that I added the PHP tags around the call to the_post_thumbnail(). I also removed the "echo" since the_post_thumbnail() function automatically outputs the result. More information about the function can be found here: http://codex.wordpress.org/Function_Reference/the_post_thumbnail
  13. I have marked the topic as solved. If you need anything else, please mark it as unsolved...or start a new topic.
  14. Perhaps the value is getting reset somewhere. Or maybe there is something else going on. If you need further assistance, we'll need to see some code.
  15. I would look into storing a timestamp of when user 1 submits their report. The script would then check the timezone before doing anything else.
  16. Have you considered using AJAX? Perhaps something here will help: https://www.google.com/search?q=call+php+function+with+ajax
  17. And what would that action be? Perhaps there is a JavaScript solution. Or maybe you could use CSS media queries. It all depends on what you're looking to do.
  18. What are you trying to accomplish? What do you need the browser window width for? Perhaps we can direct you down a different path.
  19. Instead of using document-relative paths, have you considered root-relative? For example, you could do something like the following: <?php include "{$_SERVER['DOCUMENT_ROOT']}/includes/egl_inc.php"; ?> With this, you won't need to change the include code from page to page.
  20. Perhaps the following will help: http://overit.com/blog/canonical-urls
  21. The way I read that is the ability to enable Google Analytics from within Segment.io is being depreciated. Based on a cursory look through the web, I didn't see any references to server-side Google Analytics being shut down.
  22. Have you tried doing something like this: <a href="sub_item.php" class="icons_button<?php if($page == 'index') echo ' selected'; ?>"><i class="icon-tablet"> </i> Sub Item Example</a>
  23. You'll need to use something like PHP or JavaScript to process the text box.
  24. As AbraCadaver suggested, you should look into the alternatives for mysql_ functions since they are depreciated. More information about the alternatives can be found here: http://www.php.net/manual/en/mysqlinfo.api.choosing.php In the meantime, mysql_error() will show if the query is causing errors. An example showing how to use the function can be found here: http://php.net/manual/en/function.mysql-error.php
  25. What are you looking to do with the script? Perhaps there's an alternative solution that we could suggest if we knew more.
×
×
  • 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.