Jump to content

cyberRobot

Moderators
  • Posts

    3,145
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by cyberRobot

  1. You've probably already considered this, but have you looked into CSS media queries? They can be used to format the page after the fact based on the screen size. More information can be found here: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries
  2. @IThinkMyBrainHurts - Note that the original post was made in March 2012. It just bubbled back to the top because of a spam post which has since been removed.
  3. As Muddy_Funster said, it would be helpful to know what you need help with. One thing I noticed, however, is that several of your form fields are using the same name. For example: <input type="checkbox" name="Others,Please Specify" value="Others,Please Specify"> Others,Please Specify<br> <textarea id="text_7" name="Others,Please Specify" rows="2" cols="24"></textarea> The field names need to be unique. Otherwise, only the last field value is sent through the form submission.
  4. It looks like you're trying to call a function that doesn't exist. If you only plan to define the function when $role is set to "doctor", you'll need to also suppress the function call. You could use function_exists(), for example, to see if the function is defined before calling it.
  5. What does the error message say? Could you also post the updated code?
  6. I'm probably missing something, but it sounds like you only want to show a tab if the user's role is "docotor". Is that correct? If so, you could just remove the "else" portion. So basically you would have something like this: <?php //... if($role=='doctor'){ function add_custom_profile_tab3( $downloadtab ) { $downloadtab['download'] = array( 'name' => 'Downloads', 'icon' => 'um-faicon-bookmark', ); return $downloadtab; } } //... ?>
  7. Welcome Torrie! Note that I moved the topic to the Introductions section.
  8. I'm not sure why, but the enctype="text/plain" in the open <form> tag doesn't work with PHP.
  9. Have you looked through the documentation? https://codex.wordpress.org/Function_Reference/get_post_meta
  10. I'm just taking a stab in the dark.
  11. You could look into using MySQL's CONCAT_WS() function: https://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat-ws
  12. Do you want the second combobox to be populated as soon as something is selected in the first combobox? If so, you'll need to utilize a client-side language like JavaScript. Perhaps you can find something useful here: https://www.google.com/search?q=javascript%20populate%20dropdown%20based%20on%20another%20dropdown&rct=j
  13. Have you tried using the full PHP open tag? Try changing this "<?" to "<?php" in the various locations. Note that more information about the PHP tags can be found here: http://php.net/manual/en/language.basic-syntax.phptags.php Also, are you planning to build an entire website using a single PHP script...or are you just experimenting with switch?
  14. Are you looking to display the hardware components as soon as a "listbox" choice is made...or after the form is submitted? Note that if you want to display the hardware components prior to the form being submitted, you'll need to look into a JavaScript / AJAX solution.
  15. I'm not sure if that's true... The following comes from the online documentation for loadHTML():
  16. It looks like you're missing one of the closing parenthesis. Try // Only applicable to certain instances if ( ! in_array( $request['ref'], array( 'publishing_content', 'approved_comment', 'new_forum_topic', 'new_forum_reply' ) ) ) return $run;
  17. Could you provide a little more information on what you're trying to do? Also, it may help to post some code. Note that it will helpful to know how the PDF links currently relate to the form by seeing the code for both parts.
  18. Have you considered using array_chunk() to break apart the table output? http://php.net/manual/en/function.array-chunk.php Here's a quick tutorial: http://www.cyberscorpion.com/2013-08/build-html-tables-dynamically-with-php-part-2-simplify-with-array_chunk/
  19. Just to clarify, the documentation for wp_logout_url() can be found here: http://codex.wordpress.org/Function_Reference/wp_logout_url @kathymack - you could try something like this: print '<a href="' . wp_logout_url( $redirect ) . '">LOGOUT</a>';
  20. Instead of returning $i, you could store it in an array. Then just return the array after the foreach loop is complete.
  21. Hmm...for some reason, I get "2286-11-20 09:46:39". @zlatangu - The documentation for setcookie() recommends that you use the time() function when setting the expiration date. Here is an example provided in the manual: <?php $value = 'something from somewhere'; setcookie("TestCookie", $value, time()+3600); /* expire in 1 hour */ ?>
  22. The code seems to work for me. Do you have cookies disabled? Note that the code could be simplified a bit by calling date() once. $num = rand(1,9).date('Ymdhis');
  23. It looks like you have errors disabled. error_reporting(0); Try turning them on during the debugging process: error_reporting(E_ALL); ini_set('display_errors', 1); Are you seeing any errors? If so, what are they?
  24. It might help to see what you tried. Please surround the code with tags. It's makes your post and code easier to follow. Note that my post didn't change any of the code...I was just pointing out some of the inadequacies.
  25. Try changing this ($_GET['inApp'] == '1') To this (isset($_GET['inApp']) && $_GET['inApp'] == '1')
×
×
  • 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.