Jump to content

cyberRobot

Moderators
  • Posts

    3,145
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by cyberRobot

  1. Have you tried using an <input> tag that has the type set to "image"? Here's a quick example: http://www.echoecho.com/htmlforms14.htm
  2. When a form method isn't declared, it defaults to GET which attaches the variables to the URL.
  3. Have you tried changing the form so it uses the POST method? <form method="post">
  4. Basically, you only need the following: <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script> <script type="text/javascript"> //ONCE THE PAGE IS LOADED $(document).ready(function() { //SET TIMER setInterval(function() { //run the code to change your ad here... }, 3000); }); </script> Of course, the jQuery-specific code could also be removed...unless you're planning to use for more than just determining when a page has loaded.
  5. Have you tried right-clicking the footer in a desktop browser and clicking Inspect Element to see what styles are applied to the footer? Perhaps that will give you a hint as to what's going on.
  6. Since it sounds like you figured out the issue, I have marked the thread as solved. If you need further assistance, please mark the thread as unsolved...or you can start a new thread if the problem is unrelated to the topic.
  7. It looks like you're already testing for when the form is submitted, so you could use an else: if(!empty($_POST['submit'])){ //... //ELSE...FORM WASN'T SUBMITTED } else { $emailInbox = $userInfo['emailInbox']; } Also, it's recommended that you show all errors when developing PHP scripts. You can do that by adding the following to the top of your script: <?php //REPORT ALL PHP ERRORS error_reporting(E_ALL); ini_set('display_errors', 1); ?> Of course, you'll want to remove the code to show errors before going live with the page.
  8. I tried the code and the text seems fine on my desktop computer in Chrome and my iPhone. What mobile device(s) are you using? Have you tried adding text to other portions of the page to see if the "large" text only appears in the footer? Have you compared other websites on your desktop / mobile devices?
  9. Are you looking to randomly choose one of the images to display? If so, you could load the four images into a PHP array and then use array_rand() to pick the random image. http://www.php.net/array-rand
  10. I would imagine that the query should return results which have "Code" equal to $code and "Status" equal to 'A'...or "FriendCode" equal to $code and "Status" equal to 'A'. If that's the case, you'll want to add parenthesis around Code and FriendCode: $sql = "SELECT * FROM friends WHERE (Code = '$code' OR FriendCode = '$code') AND Status ='A'";
  11. If the textareas always look the same, you could use str_replace(): http://www.php.net//manual/en/function.str-replace.php
  12. Hmm...I'm not sure why it wouldn't you do that. Anyways, Barand's suggestion is not marked as the solution.
  13. To be honest, I don't have a definitive answer. I just remember needed to add slashes to the end of tags like <input>, <br>, etc. when making the switch from HTML 4 to XHTML. The slash was added to conform to XML standards. Since we're going back to an HTML standard, I just assumed the slash was no longer needed with HTML 5.
  14. The self-closing <input> tag: ...pattern="(\d{5})?" /> Note the space and slash at the end.
  15. You could use a form field label instead: <label>Zip Code: <input type="text" maxlength="5" name="zip" value="" pattern="(\d{5})?" /></label> It looks like you're using XHTML, so this next suggestion may not work. But you could also use HTML 5's placeholder attribute: <input type="text" maxlength="5" name="zip" value="" pattern="(\d{5})?" placeholder="Zip Code">
  16. I'm not sure if this will work in your case, but I have an easier time posting code to the forum if I preview it first. To preview your post/code, you can click the "More Reply Options" button at the bottom (next to "Post").
  17. Note that there are a few errors in Ch0cu3r's code. It should look more like the following: <?php if(isset($_POST['day'])) { echo 'You selected: ' . $_POST['day']; } $days = array('Monday', 'Tuesday', 'Wednesday', 'etc...'); ?> <form action="" method="post"> <select name="day"> <?php foreach($days as $today) { echo "<option>$today</option>"; } ?> </select> <input type="submit" value="Go" /> </form>
  18. Note that the following line from Psycho's code has some extra characters: ec$projectList .=ho "</form><br>\n"; It should be: $projectList .= "</form><br>\n";
  19. You could use in_array(). <?php echo in_array($user_data['group_id'], array(GROUPS_ADMIN, GROUPS_MOD, GROUPS_MEMBER)) ?
  20. @RadioMetaverse - Please don't hijack posts. If you have a question, please start your own thread. Otherwise, it becomes very difficult to tell who's answering what question.
  21. As the initial code stands... <?php echo $user_data['group_id'] == GROUPS_ADMIN ? '<form method="post" action="<?php echo get_url(\'/products/\', $product[\'category_id\'], $product[\'product_id\'], $product[\'product_name\']); ?>?action=review">' : ''; ?> ...you're just going to get the following form tag: <form method="post" action="<?php echo get_url('/products/', $product['category_id'], $product['product_id'], $product['product_name']); ?>?action=review"> Note the PHP code within the action attribute. I imagine you want to execute the get_url() function so that it's output is used for the action attribute. In order for the function to execute, the function call needs to be made outside of a PHP string. So it seems like you need to use a solution like the one mentioned in Reply 2.
  22. Why not just convert everything to lowercase? <?php if(isset($_GET['user'])&&!empty($_GET['user'])) { $user = mb_strtolower($_GET['user']); echo $user; } ?> Note that your <form> tag has two action attributes. This: <form action="t.php" action="GET"> Should be changed to this: <form action="t.php" method="GET">
  23. That should work.
  24. The undefined variable message is coming from your humancheck.php script. Is the SESSION variable being read into that script? Side note: $HTTP_SESSION_VARS has been deprecated; you'll want to use $_SESSION instead. More information can be found here: http://www.php.net/reserved.variables.session.php
  25. To be honest, I thought the same thing. It took me longer than it should to realize that was a concatenation character between $newCode and rand(). I thought the OP was attempting to mix JS and PHP.
×
×
  • 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.