Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MrDaveTwister

Members
  • Joined

  • Last visited

Everything posted by MrDaveTwister

  1. I went in and set register globals to off and it solved the problem! Thank you so much!
  2. I'll look into that. But what about that die() problem. When I add it to the php, the rest of the page seems to die as well, even all of the html outside of the php block
  3. Also, I tried adding else { die() } after the if statement, but this caused the rest of the page to die. Not sure why????
  4. Below is a sample of a very simple form with one drop down menu. The form posts back to itself, with some php to process the user entry. When the user select "2", I want the variable "test" to be set. But when the user selects "1" I do not want the variable to be set. This works fine when I test it on my local host, but when I upload it to my production server, the variable is always set. If the user selects "1", $test is set to "1" despite the fact that my "if" statement include &&($_POST['test']!="1")!!! Any ideas?? <body> <?php if (isset ($_POST['test'])&&($_POST['test']!="1")) { $test=$_POST['test']; } echo $test ?> <form method="post" action="testing.php"> <select name="test"> <option value="1">1</option> <option value="2">2</option> </select> <input name="submit" type="submit" value="GO!" /> </form> </body>
  5. I did some further testing and found that when I try to make a default array (in the event that no boxes were checked) the array seems not to be created. Here's my code: if (isset($_POST['haystack'])) {$haystack=implode(",",$_POST['haystack']);} else {$haystack=array('None Selected');} When testing to see if that second array is formed, it comes back false.
  6. I am using the if in_array function to select checkboxes on my form that the user has previously selected (in order to repopulate the form after a captcha error, etc) but I am receiving an error saying I have the wrong data type for the second argument (the haystack presumably). Here's the code: <?php if(in_array("needle", $haystack)) {echo 'checked';} ?> Before the form I call some PHP to create the array if (isset($_POST['haystack']) {$haystack=$_POST['haystack'];} I noticed that the error goes away once I actually select a check box and submit the form (without filling in the capthaca so as to trigger the form repopulating) I thought then that the problem might happen when there is no array to check, so I created an empty array called $haystack in the event that no checkboxes were selected (as is the case when the page is first loaded) but this did not seem to work.
  7. thanks! That did it
  8. I have a simple one page form submission that returns and SQL syntax error whenever one of the form fields contains a quote or double quote. Any suggestions? Here's the form processing code. $name = $_POST['name'] ; $location = $_POST['location'] ; $comment = $_POST['comment'] ; mysql_connect("server", "username", "password") or die(mysql_error()); mysql_select_db("database") or die(mysql_error()); mysql_query("INSERT INTO table (name, comment, location) VALUES ('$name', '$comment', '$location')") or die(mysql_error()); header("location:index.php#anchor") ;
  9. And just deal with the fact that any shadows will not have a gradient . . . I might be able to live with that. But having two style sheets? Re-writing the whole sheet? hmmm . . . I dunno
  10. Well, can you explain how to design a site using png24's that degrades? Do you suggests ditching the png's. If so, that seems like a major surrender to the inadequacies of IE6.
  11. Well, at the moment it does not degrade well. Almost every layout image is png24, and the nasty grey boxes obscure important things.
  12. Umm . . . what? Do they have ANY good reasons why they don't like this? Do they have a company policy to make their webmaster's life difficult? Unless it'll get you fired, I say do it anyway.
  13. So . . . nobody knows? Or maybe this issue causes people too much pain that they want to avoid it like the plague? I have been fiddling with DD_belatedPNG with little success, although the autor claims it fixes the issues of background-position when using AlphaImageLoader. Any one else know how to have sprites AND png24s and not make IE6's head explode.
  14. Hi all, So, I recently used (with great succes) the unitpng javascript to fix that pesky PNG issue in IE 6 and earlier. But, I also recently began redesigning my site using sprites, and wouldn't you know it, I just found out that the fix does not support background-position (rather important for sprites, don't you think?). So my question to the wise programers out there is, what is the latest fix, and is there one that works with css sprites. If no, is there a button I can push to eliminate IE6 from the planet?
  15. This doesn't seem to be working. Do I need to include the square brackets in the name of the array, i.e. <input type="checkbox" name="inputname[]"<?php if(in_array('inputname[]',$_POST){echo 'checked;} ?>>
  16. And just to follow up on odmassive's original question, I second the motion of putting the checkboxes into one array as sunwukung sugests. Then I like to break it down in the form processor like this <?php if (isset($_POST['checkboxGroup'])) { $checkboxGroup = implode (", ",$_POST['checkboxGroup']) ; } else { $checkboxGroup='None selected' ; } ?> That gives you a nice string of all the check box values that were selected separated by comas.
  17. I have a question on the same topic. How can you repopulate the selected checkboxes when the user is redirected to the form (say, after a failed captcha entry). I already know how to dynamically change the value of input and text field using the $_POST array, but how about checkboxes and radio buttons?
  18. Thanks, that is all very helpful information. I'll give it a try!
  19. Ok, this may be a total nube question, but here goes, Can you have a header point back one page? Is there such a thing as 'header("location:history.back()")' or something? The reason I ask is because my form processing page is all php. At the top of the form I need to check for an error in the form, and send the user back in that case. I can't echo the javascript:history.back because that messes up another header I have further on down the page directing the user to the succes page.
  20. Thanks, that did the trick!
  21. Go to www.seriousaboutfun.com/gallery.php to see the problem in action. It only happens in Firefox! When you click on the photos in the middle of the page, notice how the one on the right jumps down to the bottom. Each photo is contained in its own div. The divs are floated left and right to make columns. I have done some testing and found that the jumping effect goes away when there is additional content within the div AFTER the </a> tag (not before). Even just one letter after the </a> tag will solve the problem. But of course I don't want to go putting in invisible letters to solve this issue. Any ideas?
  22. HOLY COW!!! I HATE when it turns out to be something like that. Thank you, thank you, a thousand times thank you!
  23. Ok, I am now dumfounded!! I included the style right in the document and it worked fine. But with the identical styles placed in the linked style sheet it did not work!
  24. goto www.seriousaboutfun.com I have MAMP for testing, but I also use this domain as a staging ground for some projects. the code I showed you should place a logo in the upper left corner. To see what it should look like, you can visit www.3RingEntertainers.com. This is a completed (but with messy code) version of the site
  25. I copied this code into my site exactly as you have it here. On my testing server it did not work! I am at the end of my rope!

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.